ARCHOS 525 BLUEPRINT · /d/dgm_int-ledger-store
Ledger / Double-Entry Store Internals (Serializable Journal & Checks)
6 COMPONENTS · 6 FLOWS · UPDATED 2026-11-24
GITHUB README / PR PREVIEW CARD
[](https://archos.sageideas.dev/d/dgm_int-ledger-store) *Interactive architecture diagram powered by [ArchOS Studio](https://archos.sageideas.dev/d/dgm_int-ledger-store)*
NOTION / DOCS / CONFLUENCE EMBED
<iframe src="https://archos.sageideas.dev/embed/dgm_int-ledger-store" width="100%" height="580" style="border:1px solid rgba(240,236,225,0.14);border-radius:6px;" loading="lazy" title="Ledger / Double-Entry Store Internals (Serializable Journal & Checks) — Interactive in ArchOS"></iframe>
PORTABLE MERMAID SPEC (GITHUB / NOTION / RFC)
flowchart LR
client_0["Ledger API Services"]
n1_1["Tx Coordinator"]
n2a_2["Balance Invariant"]
n2b_3[("Account Balance Row")]
n3_4[("Immutable Journal")]
downstream_5["Downstream & OTel"]
client_0 -->|"1. Begin tx · SQL"| n1_1
n1_1 -->|"2a. Verify 0 · SQL"| n2a_2
n1_1 -.->|"2b. Upd bal · SQL"| n2b_3
n2a_2 -->|"3a. Insert leg · SQL"| n3_4
n2b_3 -->|"3b. Sync · Control"| n3_4
n3_4 -.->|"4. Emit / · OTLP/API"| downstream_5COMPONENT STACK (6)
- Ledger API ServicesSTATELESSDebits & credits transactions
- Tx CoordinatorSTATELESSIdempotency key + sorted locks
- Balance InvariantSTATELESSCheck overdraft & zero-sum
- Account Balance RowSTATEFULMaterialized posted/pending
- Immutable JournalSTATEFULAppend-only hash-chained log
- Downstream & OTelSTATELESSConsumers, metrics & SLOs
REQUEST & DATA FLOW (6)
- Ledger API Services → Tx Coordinator (Begin tx)[SQL]
- Tx Coordinator → Balance Invariant (Verify 0)[SQL]
- Tx Coordinator → Account Balance Row (Upd bal)[SQL]
- Balance Invariant → Immutable Journal (Insert leg)[SQL]
- Account Balance Row → Immutable Journal (Sync)[Control]
- Immutable Journal → Downstream & OTel (Emit /)[OTLP/API]