Skip to main content

Bank8:Accounting - the book of account

A governed chart of accounts, declarative product-to-GL mapping, a replayable double-entry journal projected from committed postings, trial balance and statutory statements, period close with retained earnings, and an FX catalogue with period-end revaluation.

Accounting never reads the ledger's tables. It projects from the ledger's public journal API and posting:created events, so the two services stay independently deployable and the journal can be rebuilt from genesis.

Use cases​

Financial control​

  • Statutory statements - trial balance, profit and loss, and balance sheet straight from the projection, with the invariant enforced per entry: SUM(debits) == SUM(credits). A trial balance that does not balance returns 409 rather than presenting a broken book as a statement.
  • Chart of accounts - an asset / liability / equity / income / expense tree with normal balance and parent-child structure. Deactivating an account is refused while it has posted entries, because those entries must remain explainable.
  • Product-to-GL mapping - a mapping rule binds (ledger product_type, instruction_type) to a debit and a credit GL account. When no rule matches, the entry is recorded as unmapped instead of being guessed into an account.

Period close​

  • Close and lock - closing a period rolls profit and loss into retained earnings and locks the period against further posting. Close runs are idempotent per period, so a retried close converges.
  • Reopen, audited - a reopen is an explicit, audited action rather than a silent edit.

Multi-currency​

  • Effective-dated FX rates - append-only per currency pair. A duplicate rate for the same effective date is refused, not overwritten, so a historical revaluation can always be reproduced.
  • Period-end revaluation - posts unrealized FX movement from the position and the rate delta. A dry run is the default.

How it fits​

Depends onFor
Bank8:Ledgerthe committed postings it projects from - read only, over the public API
Bank8:Reportingstatutory returns are generated from these statements

Accounting is the book of account, not the book of record. The ledger holds the money positions; accounting holds their financial-statement presentation. That separation is why a chart-of-accounts change is a data operation and never a ledger migration.

Scope surface​

AreaWhat it coversScope family
GL accountschart of accountsbank8:accounting:gl:*
Mappingproduct-to-GL rulesbank8:accounting:mapping:*
Journalprojected entriesbank8:accounting:journal:*
Statementstrial balance, P&L, balance sheetbank8:accounting:statements:*
Periodsclose, reopenbank8:accounting:periods:*
FXrates and revaluationbank8:accounting:fx:*, bank8:accounting:revaluation:*

Further reading​

  • DESIGN.md - architecture, schema and the projection pipeline.
  • BUSINESS.md - business requirements and the control narrative.
  • SECURITY.md - threat model and the isolation guarantees.