SplitSmart
Shared-expense settlement with an auditable ledger
A shared-expense platform where the hard part is not the arithmetic but the invariants: members join and leave over time, four different split modes have to agree, and every mutation has to stay auditable.
- Year
- 2026
- Status
- Building
- Stack
- Next.js · React · TypeScript · Prisma · PostgreSQL
Engineering challenge
Keeping settlement correct while group membership changes over time, and keeping every correction traceable rather than silently overwritten.
Approach
Modelled membership as a timeline rather than a flag, so an expense is always apportioned against the members active at its date. Balances are reduced with a greedy debt-simplification pass, and every mutation is written to an append-only audit log with JSON old/new value diffs.
Client
Users
Authenticated group members acting on shared state.
Engineering detail
- 10-model PostgreSQL schema covering groups, members, expenses, splits and audit history
- Active/inactive member timeline invariant, so historical expenses are never reapportioned
- Four expense split modes — equal, exact, percentage and share-weighted
- Greedy debt simplification that collapses circular balances into the fewest transfers
