Practice: Design Splitwise
Shared expense tracker inspired by Splitwise: a ledger where expenses and net balances commit in one transaction, cached balances, debt simplification into the fewest payments, notifications, receipts and search. A teaching design.
Build this system yourself on the canvas below. Add components, connect them, and run traffic simulations to see where your design holds up and where it breaks.
Functional requirements
- Users can create groups and add members via email/phone.
- Users can log expenses within a group, specifying amount, description, payer, and split method (equal, percentage, exact).
- System automatically computes and displays each user's net balance with every other member.
- Users can settle up (record a payment) to reduce outstanding balances.
- Users receive push/email notifications when an expense is added or a payment is received.
- Users can attach receipt photos to expenses.
- Users can view full expense history for any group.
Non-functional requirements
- Balance read latency: p99 < 100ms (served from cache).
- Expense creation latency: p99 < 200ms (write to DB + async notification).
- Notification delivery: within 10 seconds of expense creation.
- Availability: 99.9%+; expense creation and balance reads must stay up even if notifications fail.
- Scale: 50M registered users, 10M DAU, 5M expenses/day.
- Receipt image serving: p99 < 50ms via CDN.
- Data durability: expenses and balances must never be lost — ACID transactions on settlement.