Legacy Banking
Overview
What legacy-banking is and what it provides.
legacy-banking — Bayview Bank
Bayview Bank is the banking system for the Legacy suite. It provides a windowed desktop banking UI, ATM interactions, a companion lb-phone app, and a full server-side money model.
Features
- Personal Checking — a synthetic account that reads/writes live through your framework's
bankaccount balance. It has no row inlegacy_banking_accounts. - Personal Savings — real accounts stored in
legacy_banking_accounts(kind = 'savings'). - Physical debit cards — order, freeze, report lost, change/view PIN, and in-person deposit/withdraw against a card's linked account. Cards are backed by a
debit_cardinventory item whose metadata (card_id,last4,design,expiry,linked_label,description) is the source of truth the ATM reads from. - ATM withdrawals — per-card-tier fees, daily withdrawal limits, denomination-rounded amounts, and a max wrong-PIN-attempt lockout.
- Shared (joint) accounts — up to
Config.Shared.MaxMembersmembers, four permission levels (full,withdraw_deposit,deposit_only,view). - Society (job) treasury accounts — department bank accounts for boss deposit/withdraw flows, plus a Renewed-Banking compatibility export shim.
- IBAN-only transfers — recipients are always resolved by IBAN; there is intentionally no phone-number or citizen-id lookup.
- Full transaction ledger — every balance change that goes through
LB.Tx.Logis recorded and powers the UI's charts (balance history, income/expense, spending heatmap) and the Discord webhook alerts. - Admin location tool — an in-world raycast placement tool (default command
/bankmanage) for placing bank teller peds/blips, persisted todata/locations.json. - lb-phone app — a separate React/Vite build that talks to its own
legacy-banking:phone:*server callback namespace.
Architecture at a glance
- Client (
client/): ATM/teller world-prop targeting via legacy-lib's Target bridge, the windowed desktop/ATM/admin UI lifecycle, and lb-phone custom-app registration. - Server (
server/): a globalLBnamespace (accounts, cards, atm, shared, society, transactions, transfer, locations) fronted by ox_lib callbacks (server/callbacks.lua) and public FiveM exports (server/exports.lua). - Shared (
shared/): permission-level (LBPerms) and role (LBRoles) constants plus predicate helpers (LBCanRead,LBCanDeposit,LBCanWithdraw,LBCanManage), loaded on both sides. - Web UIs:
web/(desktop banking UI) andphone/(lb-phone app) are independent Vite/React/TypeScript projects, each built separately. - Database: MySQL tables under
legacy_banking_*(see Installation for the full list), money stored as whole-unitINT(no decimals/cents).