Skip to content

Building & tests ​

Layout ​

Path Holds
config/ Every config file (see Configuration)
shared/ Pure modules shared by client and server: schema, permissions, URL providers, playback maths, locks, the vendored np_admin lib. shared/ext/ holds the pure logic of each feature (cinema, presenter, edit sessions, Surface manager, cast)
server/ Storage, migrations, the board store, playback authority, media service, presenter lock, placement, commands. server/ext/ holds one file (or group) per feature
client/ Board registry, DUI pool, renderers (quad and render target), audio, interaction, remote, editor, placement. client/ext/ mirrors server/ext/
locales/ en and de, one file per feature (<feature>.<lang>.lua), merged into one table
web/editor/ The shell and the whiteboard editor (React, TypeScript, Vite, Fabric.js)
web/remote/, web/admin/, web/presenter/, web/hud/, web/audio/ The other player UIs, plain HTML / JS, copied into the build
web/viewer/ The in-world screen page (plain, loaded directly)
web/phone/ The np_phone Cast app (plain, loaded directly)
web/shared/ Fonts, Font Awesome and the Nimbus UI design system

See NUI contract for how the pages talk to each other.

Building ​

From the repo root:

sh
npm ci
npm run build    # type-check, then the production build into web/editor/dist

Run the build again after any change under web/editor/src/ or the other player UIs. The viewer and the phone app are loaded directly and need no build.

Tests ​

sh
lua tests/run.lua                    # Lua unit suite: pure modules and wiring, no FiveM needed
npm test                             # vitest: editor, collaboration, history, templates, NUI router, remote, presenter
npm run build                        # type-check + production build
selene shared client server config   # lint

CI runs all four, plus a syntax check of config/config.lua and config/surfaces.lua. selene skips those two because its parser can't read FiveM's backtick hash literals, so CI replaces the backticks with joaat("…") and loads the files instead.

The tests cover the pure logic of every feature (permissions, playback, clock sync, cinema rules, showtimes, the presenter, edit sessions, cast, the Surface manager) with stubbed natives. None of it replaces a test on a live server, see Limitations.

Working on the UI in a browser ​

Every player UI runs in a browser with mock data, no FiveM needed:

Page How
Whiteboard editor npm run dev, then open the dev server. It opens a mock board with two mocked collaborators. URL flags: ?panel=history|layers, ?template=<id> (&apply=1), ?draft=1, ?solo=1, ?locale=de, ?select=1, ?tool=<tool>
Remote Open web/remote/index.html directly
Cinema tab web/remote/tabs/cinema.dev.html
Surface manager Open web/admin/index.html directly (or with ?dev=1)
Viewer web/viewer/index.html?dev=1 for overlay buttons, ?state=<name> for one fixed frame
Cast app web/phone/dev.html, with a mock phone