HighlightBuilding an Accounting Ledger · Day 10
An invoice is a state machine where transitions have side effects on the ledger. Draft→Sent is the commit point — after that, corrections are new documents (void entries, credit notes), never edits. Idempotency matters: one transition, exactly one entry.