Development ​
Layout ​
fxmanifest.lua globs only: a module never edits it
shared/lib/ NpMech global, bridge selection, bus, helpers, locale, brand registry accessor
shared/brands.lua generated by tools/logos/build_registry.py
shared/config/ 00_core, 01_items, shops, parts, then one file per module
shared/locales/{en,de}/ 00_core, 01_catalog, one file per module
bridge/framework/{client,server}/ esx | qbx | qb | standalone
bridge/inventory/server/ np | ox | qb | none
integrations/ one adapter per sibling, both sides
server/core/ schema, db, RPC, events, hooks, timers, ledger, notify, shops, catalogue, vehicles,
orders, staff, money, items, stock, sync, API, np_menu compat
server/modules/ tuner, workshop, repair/, underground/, business, roadside, phone
server/boot.lua last: schema, stores, ready
client/core/, client/modules/ the client half of the core and of every module
web/ React NUI: index.html (screens) + phone.html (np_phone app)
web/images/ item images
assets/brands.json, assets/logos/ lore brand registry and logos
sql/install.sql schema (also applied at start)
tests/ plain-Lua harness, one process per tests/test_*.lua
tools/items/, tools/logos/ item image renderer, logo pipeline
A feature module is a set of new files: its config, both locale files, a server and a client file, a screen folder
in web/src/screens/<module>/ and a test suite. The manifest picks them up through its globs.
Building ​
cd web
npm install
npm run build # logos, FiveM backdrop guard, typecheck, Vite build → web/dist/index.html, web/dist/phone.html
npm test # contract check (RPCs, screens, mocks) + vitest
npm run dev # http://localhost:5187/?screen=tuner&variant=carmeet&locale=de
npm run build copies assets/logos to web/public/logos, then fails when CSS uses backdrop-filter without the
FiveM guard. npm test runs scripts/check-contract.mjs, which checks that every RPC, screen and NUI action named in
the code exists on the other side.
Browser mock ​
npm run dev runs every screen without FiveM, with mock data:
| Parameter | Values |
|---|---|
screen |
tuner, workshop, workshop.install, workshop.invoice, repair, repair.bill, underground, underground.knock, underground.inspect, business, business.jobs, business.rate, roadside, phone, kit (the component gallery) |
variant |
A mock variant, e.g. tuner: carmeet, bennys, engine, wheels, body, finetune, underground, locked; phone: request, jobs, active, service, roadside, rate |
locale |
en, de |
scene |
garage (default), street, dim |
The np_phone app also runs on its own: web/dist/phone.html?variant=jobs (vite preview), with the mocks of
web/src/phone/mock.ts.
Tests ​
tests/run.sh # luac -p on every Lua file, then every suite (plain Lua 5.4, no game needed)
tests/run.sh flow # one suite
VERBOSE=1 tests/run.sh core
23 suites, each in its own process:
| Suite | Covers |
|---|---|
test_core |
es_extended + np_inventory + np_hud / np_phone / np_menu / np_character / np_payments: RPC options, shops, catalogue, vehicles and props in owned_vehicles, orders, staff, money, items, stock, timers across a restart, sync, notify, phone, np_menu compat, API |
test_qbx, test_qb, test_standalone |
qbx_core + ox_inventory, qb-core + qb-inventory, nothing. Each ends with a smoke test of every module's main RPCs on that combination |
test_flow |
An end-to-end day on ESX + np_inventory with every sibling: tune → install → collection, crash → tow → repair → invoice, Benny's reorder → delivery, underground fit → tip-off → chop, police inspection, then a restart and everything still there |
test_<module>, _qbx, _client |
Every module (tuner, workshop, repair, underground, business, roadside, phone), on a second framework / inventory and the client half with stubbed natives |
test_client |
The client core with stubbed natives |
test_integrations |
Reads the sibling repositories next to this one and fails when a declared export or event no longer exists |
test_project |
Locales, labels, the manifest, the SQL, item images, the brand registry, no ACE, and that the documented exports, hooks and events match the code both ways |
The harness fakes oxmysql, es_extended (+ esx_addonaccount), qb-core, qbx_core, np_inventory, ox_inventory,
qb-inventory, np_hud, np_phone, np_menu, np_character, np_identification, np_payments, np_gangs and np_drugs, plus
vehicles and a fake clock. A test fails on any thread error, nil SQL parameter or unserialisable payload.
Screenshots ​
web/scripts/screenshots.sh # every screen and variant → web/screenshots/<id>[@<variant>].png
web/scripts/screenshots.sh tuner # only ids starting with "tuner"
The script builds when needed, serves the build with vite preview and renders each screen with headless Chrome at
1920×1080 (CHROME= points to another Chrome binary). The list of screens comes from the running app, so a new screen
folder is picked up by itself. The screenshots on this site are synced from there with npm run sync:images in the
docs repo.
Item images and logos ​
node tools/items/build_images.mjs # web/images/*.png (after cd web && npm install)
Item images are a grey Nimbus tile with a white Font Awesome glyph. The lore logos come from a pipeline in
tools/logos/ (download, vectorise, build the registry assets/brands.json / shared/brands.lua); it needs Pillow and
vtracer. The logos are Rockstar Games' fictional GTA brands for use in GTA V roleplay; don't redistribute them outside
FiveM.