resham_acharya.exe000%
Compiling experience...
All Projects
Full Stack2022 · Tech Lead

Event-sourced ledger for SaaS billing

01Overview

Every financial change is an immutable event. Projections are pure functions of the event log; rebuilding a corrupted projection takes a single CLI command.

Powers the billing pipeline for a multi-tenant SaaS doing eight-figure ARR.

02The Problem

A row-level mutation in the existing billing schema once cost a four-day forensic audit. Never again.

03Approach
  • Append-only event log in PostgreSQL with optimistic concurrency on aggregate version.
  • Deterministic, replayable projections for the read side.
  • Generated invoices are signed and stored as content-addressed PDFs.
04Outcome
Closed the books 6 days faster every month.
Two financial audits passed without a single follow-up question.