RRRithvik Ronaldoinrithvikronaldo.dev·May 30 · 8 min readTeaching a Postgres ledger to rewindThe naive thing — what a ledger demo usually looks like Most ledger demos are screenshots with a button on them. A few balances. A transaction list. A chart that doesn't move. Maybe a "Try the API" cu30
RRRithvik Ronaldoinrithvikronaldo.dev·May 16 · 8 min readAdding multi-tenancy to a Postgres ledger without a rewriteFor three weeks, every row in this ledger has had org_id = 1. That was a Week 1 decision. Build the schema, the double-entry invariants, the snapshots, the FX layer — all under a single hardcoded org.20
RRRithvik Ronaldoinrithvikronaldo.dev·May 10 · 6 min readStreaming a ledger without melting ReactWeek 3 of 6 · Building a Double-Entry Ledger The naive approach When I built the live clock for my dashboard's header, the first thing I reached for was a single useState: const [now, setNow] = useSt00
RRRithvik Ronaldoinrithvikronaldo.dev·May 3 · 7 min readWhat was my cash balance on March 15? In dollars?The naive answer to "what was my cash balance on March 15?" is one line of SQL: SELECT SUM(...) FROM entries WHERE account_id = $1 AND created_at <= '2026-03-15'; That works for one currency. In doll00
RRRithvik Ronaldoinrithvikronaldo.dev·Apr 26 · 7 min readWhy I enforce my ledger's invariant twice The naive approach When I started thinking about how to track balances, the first thing I reached for was a single UPDATE: UPDATE accounts SET balance = balance + 100 WHERE id = 42; It works. Unt50