Codebase Exploration Path

A sequenced path for getting from "what does this thing even do" to "I can confidently make a change."

Total time: ~1 day if focused, ~3-5 days at a relaxed pace. Each step relies on what came before.


Project at a glance


Day 1 — Domain and shape (~3 hours)

Step 1: Understand the product (~30 min)

The domain dictates everything else. Read in this order:

  1. README.md — dev-onboarding view. Skip the setup steps; focus on the "Testing Locally" section — it tells you the real-world entities (BaaS providers, KYC, direct deposits, loans, EWA).
  2. PERKS.md — the central domain concept. "Perks" (loans, Save, EWA, Pay Me Now) are the actual product. Eligibility, pre-eligibility, opt-in flows. If you don't understand perks, nothing in packages/server/src/perks/ will make sense.
  3. packages/server/prisma/models.prisma — the data model. Skim, don't memorize. Pay attention to: User, Organization, Perk, PerkTemplate, PerkInstance, LinkedAccount, RoutedTransaction, FinancialAccount. The 5,650-line schema is the system.

Step 2: Map the monorepo (~30 min)

Run ls packages/*/src for each package and skim. The mental model:

client/          ← Preact SPA (the user-facing app)
  └─ talks toserver/          ← Express API + the Prisma client lives here
  └─ enqueues to ↓
worker/ + queue  ← async jobs (notifications, payroll syncs, BaaS reconciliation)
  └─ all share ↓
shared/          ← types, zod schemas, helpers, the dayjs/decimal/zod wrappers
notifications/   ← email/SMS rendering (separate so it can be previewed locally)
prisma-generator-zod/  ← custom Prisma → Zod schema generator (the "magic")
prisma-superset/       ← Prisma schema preprocessor for mixins

Where activity actually lives: server (6,240 commits) and client (6,001 commits) are nearly tied — full-stack team. Other packages are much smaller.

Step 3: The unusual conventions you must know (~30 min)

These will confuse you if you don't know them upfront:

Step 4: Run it (~1 hour)

Skim README.md "Initial Setup" — but don't try to run the full thing if you're just exploring. Instead:

# Just to see code health:
pnpm install
pnpm run types       # type-check everything
pnpm run lint
pnpm run test        # vitest

The seed data section of the README tells you which test users to log in as if you do bring up the dev server (x go).


Day 2 — Vertical slice through one feature (~3 hours)

Pick EWA (Earned Wage Access) — it's the heart of the product and was the last thing being actively worked on. Trace it end-to-end:

  1. Schema: find Perk, PerkInstance, PerkType in models.prisma. Look for EarnedWageAccess-related models.
  2. Server logic: packages/server/src/perks/earned-wage-access.ts — has the recent PerkUseReason survey field.
  3. HTTP endpoint: packages/server/src/endpoints/ — find the route that creates an EWA instance.
  4. Routing & money movement: packages/server/src/routing/index.ts and packages/server/src/routing/routed-transaction.ts — this is where ACH effective-date logic lives. Recent commits all touched these.
  5. BaaS integration: packages/server/src/services/baas/solid/index.ts — how transactions actually get sent to the bank.
  6. Worker job: packages/server/src/queue/jobs/ — find the job that processes routed transactions.
  7. Client UI: packages/client/src/perks/earned-wage-access-submit.tsx.
  8. Tests: packages/server/src/routing/index.spec.ts — commit f24ed748f added 171 lines of tests here. Read these. Tests are documentation.

After this slice, you'll know how a single user action becomes money in someone's bank account.


Day 3 — Subsystems by importance (~half-day each, pick one)

By now you understand a vertical slice; pick the subsystem most relevant to whatever you're going to work on.

A. Auth & sessions

B. The async queue

C. Notifications (email/SMS/push)

D. BaaS abstraction

E. Frontend architecture


Day 4+ — What to skip or defer

Don't bother with these until you have a reason:


Tactical tips


Suggested 1-week schedule

Day Focus Goal
1 README, PERKS.md, schema, monorepo layout, conventions Could explain the product to a new hire in 5 min
2 EWA vertical slice end-to-end Could trace what happens when a user clicks "Submit EWA"
3 One subsystem deep dive (whichever you'll work on) Could make a small change confidently
4 Run it locally; click through the seeded users Felt the product, not just the code
5 Pick a recent PR and read it fully Understand how the team writes/ships changes

Recent context (as of last commit Nov 2024)

The project went quiet in mid-November 2024. The last few weeks of activity clustered into four themes:

  1. ACH effective-date routing (PRs #1904, #1905, #1907) — paychecks now wait for an effective date and are routed at most 1 day before it.
  2. Onboarding reminder predicate fix (PR #1906) — small bug fix with test.
  3. "Reason for using perk" survey field (PR #1900) — schema went through enum → strings → JSON object before landing.
  4. Operational analysis + seed updates — Jupyter notebook for tracking how much capital is fronted from the operational account.

If you're picking up where the team left off, paycheck routing and the BaaS abstraction were the active frontier.