Development ​
Layout ​
fxmanifest.lua globs only: a module adds files, never edits the manifest
shared/lib/ 00_npbanking (NpBank namespace, bridge selection, bus, boot / ready hooks)
01_util (helpers, validators, money) · 02_locale · 03_banks · 04_sha256
shared/config/ 00_core · banks · accounts · cards · items (core)
phone · atm · branch · robbery (one per module)
shared/locales/{en,de}/ core.lua + phone / atm / branch / robbery
bridge/np_admin.lua vendored np_admin lib (byte-identical copy of np_admin/lib/np_admin.lua)
shared/np_admin_settings.lua editable settings, permission nodes, staff fallback
bridge/framework/{client,server}/{0_common,1_esx,2_qbx,3_qb,9_standalone}.lua
bridge/inventory/server/{0_common,1_np,2_ox,3_qb,9_none}.lua
integrations/ 00_registry + one adapter per sibling (both sides)
server/core/ 00_init 01_schema 02_rpc 03_events 04_ledger 05_accounts 06_cards 07_credit
08_ticks 09_fraud 10_api 11_rpc_bank 12_admin
server/modules/ phone · atm · branch · robbery (server/modules/<module>/*.lua)
server/boot.lua last server file: schema, boot hooks, ready
client/core/ 00_state 01_nui 02_rpc 03_points 04_hud 05_peds 06_blips 07_api
client/modules/ phone · atm · branch · robbery
sql/install.sql same CREATE statements as server/core/01_schema.lua (optional import)
tests/ plain-Lua harness + suites (tests/run.sh)
web/ React 18 + TypeScript + Vite 5 + zustand: index.html, atm.html, phone.html
assets/banks/ lore bank logos (SVG), banks.css, banks.json
design/ Nimbus UI tokens and CSS (never edited)
Files load alphabetically inside a glob; the numbered prefixes fix the order. Globals are NpBank, Config,
Locales and npAdmin, nothing else. Code resolves NpBank.* when it is called, so modules may use any core function
from their handlers. Four modules sit on the core (phone, ATM, branch, robbery). They talk to each other only through
NpBank.* tables looked up at call time and through an internal bus, so a module can be removed and the others keep
working. Every money move goes through the ledger.
Build ​
cd web
npm install
npm run build # copies the bank logos, FiveM guard check, tsc --noEmit, vite build → web/dist/{index,atm,phone}.html
npm test # vitest: core, ATM, branch, phone and robbery logic
npm run dev # the UI in the browser with mock data, port 5188
npm run build first copies assets/banks/ into web/public/banks/ (scripts/sync-banks.mjs) and runs
scripts/check-fivem-guard.mjs, which keeps backdrop-filter off in FiveM: a blurred surface renders as a black box
over the game.
Browser mock ​
npm run dev serves the three pages with mock data. URL parameters pick what to show:
| Page | Parameters |
|---|---|
phone.html |
tab=accounts | payments | cards | savings | more, streamer=1, locale=de, island=… |
atm.html |
bank=maze | fleeca | …, screen=idle | insert | pin | menu | withdraw | deposit | transfer | statement | changepin | dispensing | take_card | take_cash | done | retained | out_of_order | hacked, outofcash=1, forgotten=1, balance=1, passive=1 |
index.html |
screen=branch&mock=<service | teller> for the counter (a service id like boxes, loans, gold, or the teller console); screen=heist_hud,robbery_hack (comma list) for the robbery screens |
The screenshots on these pages (web/screenshots/) come from the mock mode. Set Config.Phone.devUrl = 'http://localhost:5188/phone.html' to load the Bank app from the dev server inside np_phone.
Tests ​
bash tests/run.sh # luac -p on every Lua file, then every tests/test_*.lua suite (Lua 5.4+)
bash tests/run.sh atm branch # only some suites
VERBOSE=1 bash tests/run.sh # with the resource's log lines
Every suite runs in its own process, because the bridges are chosen at load. tests/harness.lua loads the real files
in manifest order with a coroutine scheduler, an in-memory oxmysql fake and fakes of es_extended, qbx_core, qb-core,
np_inventory, ox_inventory, qb-inventory, np_hud, np_phone, np_payments, np_identification, np_discord, np_mdt and
np_admin.
| Suite | Covers |
|---|---|
test_e2e |
One character through every module on ESX + np_inventory + np_phone + np_payments |
test_e2e_qbx |
The main flows on Qbox + ox_inventory |
test_boot_esx / _qb / _qbx / _standalone |
Bridge selection and start per framework |
test_ledger, test_accounts, test_cards, test_schema |
Core money rules, roles, cards and PINs, migrations |
test_atm, test_atm_client, test_branch, test_phone, test_phone_bridge, test_robbery, test_robbery_atm |
The modules |
test_payments_contract |
np_payments' real banking bridge against np_banking (when ../np_payments exists) |
test_api_doc |
The resource's API list against the code, both ways |
test_project |
Locales (en / de keep the same keys) and the vendored np_admin lib against ../np_admin |
In game ​
Nothing has been run on a live server yet. Before opening:
- Tune the ATM screen corners per model with
Config.Debug = trueand/atmdebug(ATMs → Tuning). - Check the branch points (
ped,counter,console,vault) and the heist targets against your map and MLOs. - Point the Union Depository heist at your MLO before enabling it.