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 asunmappedinstead 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 on | For |
|---|---|
| Bank8:Ledger | the committed postings it projects from - read only, over the public API |
| Bank8:Reporting | statutory 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
| Area | What it covers | Scope family |
|---|---|---|
| GL accounts | chart of accounts | bank8:accounting:gl:* |
| Mapping | product-to-GL rules | bank8:accounting:mapping:* |
| Journal | projected entries | bank8:accounting:journal:* |
| Statements | trial balance, P&L, balance sheet | bank8:accounting:statements:* |
| Periods | close, reopen | bank8:accounting:periods:* |
| FX | rates and revaluation | bank8: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.