Skip to main content

Bank8:Branch - branch operations and cash control

Office hierarchy and staff, tellers with cash limits, cashier sessions with server-generated shift summaries and recorded variance, cash allocation and settlement, vault position and cash in transit.

Branch is what makes a physical drawer an accountable position. The drawer balance is computed by the service from the recorded movements - the app supplies only the physical count, so a shift cannot reconcile against a number it made up.

Use cases​

Cash operations​

  • One drawer, one shift - at most one open cashier session per teller, enforced by a partial unique index. It is a database guarantee, not an application convention, so a second concurrent open cannot slip through.
  • Expected cash computed server-side - the service sums the recorded movements by direction. The teller supplies the counted cash; the variance is always produced, including zero, because a zero is an explicit assertion that the drawer balanced.
  • Cash cannot move unposted - every cash movement carries a ledger posting id, and is at-most-once per idempotency key. A retried deposit cannot inflate the drawer.
  • Per-transaction and per-shift limits - validated before any posting, so authority is structural rather than discovered afterwards.

Branch structure​

  • Office hierarchy as a path - offices store a dot-path, so a subtree query is a prefix scan rather than a recursive walk.
  • Deactivation guard - an office cannot be deactivated while it has open sessions or active staff.

Vault and transit​

  • Vault position and transfers - vault-to-vault and vault-to-logistics, where funds land only on receipt. An unreceived transfer stays visible and aged rather than disappearing.
  • Terminal is terminal - a received or cancelled transfer never transitions again, so a transfer cannot be double-received.

How it fits​

Depends onFor
Bank8:Ledgerevery cash movement is a posting against cash, clearing or suspense
Bank8:Accountingdrawer and vault positions appear in the GL via the projection

Scope surface​

AreaWhat it coversScope family
Officeshierarchy and staffbank8:branch:offices:*, bank8:branch:staff:*
Tellerstellers and limitsbank8:branch:tellers:*
Cashier sessionsopen, close, shift summarybank8:branch:cashiers:*
Cashmovements and allocationsbank8:branch:cash:*
Vaultposition, transfers, cash in transitbank8:branch:vault:*

Further reading​

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