See It Flow

Splitwise System Design — Visual Journey

Watch three friends and a shared dinner bill evolve into a production expense-ledger architecture — split math, debt simplification, idempotency, optimistic concurrency, transactional outboxes, balance projections, multi-currency isolation and payment settlement.

30 scenes · 30 narrated steps · interactive, self-paced

Splitwise — Shared Expense Manager

Splitwise — Shared Expense Manager
A long-form engineering design session — watch split math, ledger invariants, debt simplification, idempotency and concurrency evolve into a production expense-sharing architecture.
Maximize to view synchronized narration and navigate between explanation steps.

What You Should Understand Now

  • An expense is not a payment — it records who paid and who benefited; a balance is only the arithmetic consequence of recorded expenses and settlements, never a thing moved directly.
  • Every split must sum to the expense total exactly, in integer minor currency units — never floating point — with a deterministic, documented rule for any rounding remainder.
  • Net balance = amount paid on behalf of others minus allocated personal share, adjusted by settlements; within one closed currency ledger, every participant's net balance always sums to zero.
  • Debt simplification preserves everyone's net position but not the original pairwise provenance — it is a suggestion that reduces transaction count, never an automatic transfer or cancellation of obligations.
  • Corrections and deletes never silently overwrite financial history — they are reversal-plus-replacement events, so the full audit trail is always reconstructable.
  • A transactional outbox plus idempotent, event-ID-keyed consumers make at-least-once event delivery safe — the immutable ledger stays the single source of truth, with balance projections as fast, rebuildable, honestly-versioned views of it.

Concepts in This Visual

Expenses, Splits & Net BalanceEqual / Exact / Percentage / Share SplitsDebt SimplificationImmutable Ledger & Zero-Sum InvariantIdempotent Expense CreationOptimistic Concurrency ControlVersioned Corrections & ReversalsTransactional Outbox & Event BusBalance Projections & Read-Model StalenessMulti-Currency Isolation & Payment Settlement

Go Deeper