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 on | For |
|---|---|
| Bank8:Ledger | every cash movement is a posting against cash, clearing or suspense |
| Bank8:Accounting | drawer and vault positions appear in the GL via the projection |
Scope surface
| Area | What it covers | Scope family |
|---|---|---|
| Offices | hierarchy and staff | bank8:branch:offices:*, bank8:branch:staff:* |
| Tellers | tellers and limits | bank8:branch:tellers:* |
| Cashier sessions | open, close, shift summary | bank8:branch:cashiers:* |
| Cash | movements and allocations | bank8:branch:cash:* |
| Vault | position, transfers, cash in transit | bank8: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.