A Splitwise-class group expense tracker — split bills, track who owes whom, settle up.
Stack: TypeScript end-to-end · pnpm + Turborepo monorepo · NestJS + Prisma + PostgreSQL · React + Vite + Tailwind + shadcn/ui · Docker Compose + Traefik on a VPS · GitHub Actions CI/CD.
Status: Phase 0–4 complete (skeleton, auth, groups, invites, expenses with all four split types, multi-payer UI with live preview). Phases 5–8 (balances, settle-up, multi-currency, Google OAuth, prod hardening) are scoped in the implementation plan. See
MVP scopebelow.
Prereqs: Node 20+, pnpm 9+, Docker.
# 1. Install dependencies
pnpm install
# 2. Bring up Postgres
cp .env.example .env
docker compose -f infra/docker-compose.yml up -d postgres
# 3. Apply migrations & seed currencies
pnpm --filter @bill-splitter/api prisma:migrate:dev
pnpm --filter @bill-splitter/api seed
# 4. Start API + web
pnpm dev- API: http://localhost:3000 · Swagger UI: http://localhost:3000/docs
- Web: http://localhost:5173
apps/
api/ NestJS + Prisma + Postgres
web/ Vite + React + Tailwind + shadcn-style
packages/
shared/ zod schemas + money math + simplify-debts algorithm (used by api & web)
eslint-config/ flat ESLint config
tsconfig/ base / node / react TS configs
infra/
docker-compose.yml local development
docker-compose.prod.yml prod overlay (Traefik, GHCR images, Let's Encrypt)
deploy/deploy.sh SSH deploy entrypoint
.github/workflows/
ci.yml · deploy.yml
docs/
architecture.md
adr/ Architecture Decision Records (MADR format)
- Money is always
BigIntminor units (cents). Floats never appear. Seepackages/shared/src/money/. - Schemas (zod) live in
packages/shared/src/schemas/— single source of truth for validation on both API and web. - Conventional Commits are enforced by commitlint + Husky. PRs target
main. - Tests — Vitest + fast-check for shared/, Jest + supertest for api/, Vitest + Testing Library for web/, Playwright for e2e.
- Auth: email/password + JWT access (15m) + refresh-token-cookie (30d, rotated on refresh)
- Groups + invite-by-link
- Multi-member groups, owner permissions
- Expenses backend supports all split rules (EQUAL / PERCENT / AMOUNT / SHARES) — Phase 3
- Web: equal-split expense form + list + soft-delete — Phase 3
- Web: SplitEditor (all 4 modes, live preview via shared
computeShares) + multi-payer — Phase 4 - Balances + settle-up suggestions (debt simplification) — Phase 5
- Multi-currency with FX snapshot at expense time — Phase 6
- Google OAuth — Phase 7
- Production hardening: Traefik + Let's Encrypt, throttler, helmet, Sentry hook — Phase 8
The settle-up algorithm and money allocator are already implemented and property-tested in packages/shared/src/settle/ and packages/shared/src/money/ — they are wired in during Phase 5 and 4 respectively.
- Architecture overview
- ADR — Money as BigInt cents
- ADR — zod as single source of truth
- ADR — Soft-delete for expenses & settlements
- ADR — FX snapshot policy
- ADR — Debt simplification algorithm
- Contributing guide
MIT — see LICENSE.