Skip to main content

Onboarding to DemozPay

Welcome. This folder is the front door for a developer who knows nothing about the codebase.

It is written with brutal honesty about what is built vs. what is planned. If you read something here that says Live, it works today. If it says Planned, it is a roadmap claim only — there is no code for it yet. The legend lives in docs/STATUS_LEGEND.md.

Read these in order

You can finish the whole suite in ~2 hours. Each file stands alone but they build on each other.

#FileWhat you'll learnTime
0This READMEThe map5 min
101-what-is-demozpay.mdWhat the platform actually does in plain English, then how the code maps to it15 min
202-running-locally.mdClone, start Postgres, run migrations, boot the API, hit a real endpoint20 min hands-on
303-the-codebase-tour.mdEvery folder explained: why it exists, what's in it, what's stubbed20 min
404-how-the-backend-works.mdNestJS modular monolith + Go ledger; request flow; money flow; event flow25 min
505-the-frontend-apps.mdThe five Next.js apps and what they show today (honest: all mocks)10 min
606-status-matrix.mdOne table: every capability × status × what blocks it from Live10 min
707-rules-and-patterns.mdThe seven non-negotiables and the patterns you must use15 min
808-how-to-add-things.mdRecipes: a new endpoint, a new event, a new migration, a new domain20 min reference
909-common-mistakes.mdWhat goes wrong and how to debug it10 min reference

Different paths for different roles

If your time is limited, here are the minimum-viable reading paths:

RoleRead at minimum
Backend engineer01, 02, 03, 04, 06, 07, 08, 09
Frontend engineer01, 02, 05, 06, 08
DevOps engineer01, 02, 03 (services/, infra/), 04 (operational flow), 06, 07, 09
Product manager01, 05, 06
Fintech auditor01, 04, 06, docs/adr/ADR-013, SECURITY_CONTROLS.md
Intern (June 2026 cohort)All 10 + INTERN_PROGRAM.md

The seven non-negotiable rules at a glance

These are enforced at code-review, lint, migration or runtime. Detail in 07-rules-and-patterns.md.

  1. Money is integer santim (NUMERIC(20,0)). Never floats. (ADR-005)
  2. Ledger is the sole source of money truth. No balance columns on financial-tier tables. (ADR-006)
  3. Idempotency-Key required on every money-moving POST. (ADR-007)
  4. Audit + outbox event commit in the same DB transaction as the state change. (ADR-008)
  5. No DELETE on financial rows. Reversals only. (ADR-009)
  6. Tenant scoping mandatory — Postgres RLS, fail-closed. (ADR-013)
  7. Two-language ceiling. TypeScript + Go only. (ADR-010)

If you find yourself wanting to violate one of these, stop and write an ADR first. No exceptions.

Where else to read

After this suite:

Tone of these docs

This suite is descriptive, not aspirational. When something isn't built, we say so. When something works only on the developer's laptop and not in production, we say so. This avoids the most common onboarding failure mode in fintech: a new engineer reads "the ledger guarantees X" and writes code that assumes X is live, when in fact only the schema for X is live and the Go server is compile-only.

If a doc here ever drifts from reality, fix the doc in the same PR as the code. The status tag is more important than the prose.