Close and return to the grid
All projects
2025 · Lead engineer

Ledger Engine

Double-entry accounting core with deterministic replay.

Numbers

40M
Entries replayed
11ms
p99 write

Overview

An append-only ledger where every balance is a fold over immutable entries. Reads are served from projections that can be dropped and rebuilt from the event log at any point, which turned month-end reconciliation from a manual audit into a command.

The interesting constraint was ordering: entries arrive out of band from four upstream systems, so the engine assigns a total order at write time and refuses any entry that would leave an account unbalanced, rather than repairing it later.

Stack

TypeScriptPostgreSQLKafkaDocker

Links