Local development
Use Node.js 24.13.0 and npm, matching CI. The database uses built-in
node:sqlite. The following npm scripts work in Windows and macOS shells.
npm ci
npm run dev
dev optionally reads .env.local, migrates .local/suite.db and starts
Next with the Node SQLite runtime. dev:test optionally reads .env.test
and uses .local/suite-test.db. Neither command needs a remote D1 binding or
connects to the shared Oracle test database.
Both enable loopback-only test authentication: open /api/auth/login to
sign in as the local test administrator. These shortcuts are refused for
production and non-loopback requests. Keep the development server local.
An ephemeral session secret is generated if none is supplied; restarting then
invalidates local cookies.
Set SUITE_DATABASE_PATH to use another local SQLite file. The default public
origin is http://localhost:3000; set NEXT_PUBLIC_SITE_URL to your loopback
origin when choosing a different port. Use local environment files for current
Suite settings, not old provider credentials. .env.prod is no longer read
by dev.
The shared test service is https://suite-test.sabrobotix.com, running on
Oracle; production is https://suite.sabrobotix.com.
Fly a SITL from the local Suite
npm run dev:sitl runs the Suite against an ArduPilot SITL on this machine,
through the same onboard runtime a vehicle runs:
SITL ──TCP──► socat ──pty──► telemetry agent ──► gateway ws://127.0.0.1:8081
▲
Suite dev on http://localhost:3000
It needs, next to this repository:
- a
jetson-aicheckout, withnpm cirun injetson-ai/lte; - an ArduPilot checkout with the helicopter SITL built
(
./waf configure --board sitl && ./waf heli); socat(brew install socat), because the telemetry agent reads only a serial port.
The command uses the dev:test database, switches Drone Control on, and
adds the drone SITL01 with its connection to the local gateway. It
signs gateway tokens with an Ed25519 pair kept in .local/, and the gateway
trusts its public half, so requests are authorised as on a vehicle. It then
starts the SITL, the bridge, the gateway, the telemetry agent and the Suite,
and stops them all together. Sign in at /api/auth/login and choose SITL01 in
Drone Control. Telemetry, parameters, missions, flight mode and Guided "go
here" go through the gateway as they do over LTE. There is no video.
| Option | Meaning |
|---|---|
--frame lizard | the heli model, the default |
--frame bulldog | the heli-dual model, with two main rotors, and SITL01 typed BUL |
--home lat,lng,alt,yaw | the start location |
--no-sitl | attach to a SITL already running, read on 127.0.0.1:5762 unless --mavlink says otherwise |
--mavlink host:port | the SITL TCP port the bridge reads |
--jetson <dir>, --ardupilot <dir> | other checkouts than ../jetson-ai/lte and ../ardupilot |
Pass options after --: npm run dev:sitl -- --frame bulldog.
If another SITL already holds 5760, as a Docker one published on
127.0.0.1:5760 does, the SITL moves to the next free instance (5770,
5780, …). The command prints which one it used.
The Suite cannot arm or take off. Do that from a ground station or a script
on the SITL's second port, printed at start (tcp:127.0.0.1:5762 on
instance 0), for example
mavproxy.py --master tcp:127.0.0.1:5762. RC overrides are accepted only
from system id 255, the ground-station default. A helicopter arms with the
motor interlock (RC8) low, then needs RC8 high to spool its rotor before
taking off.
Build and start
npm run build
npm start
These produce and run the standalone Node server used on Oracle. Supply the database path, runtime secrets and public build variables as described in Node server settings. Production deployment uses the Bash script described in Deployment.
Documentation
npm ci --prefix docs-site
npm run docs:start
npm run docs:build
The local documentation site runs on port 3001. Its Cloudflare Worker hosting is independent of the Suite application's Oracle runtime.
External services
MediaMTX, gateways and simulators start separately, except under
dev:sitl above.
mediamtx.dev.yml is a local MediaMTX sample. Media uploads require R2 S3
credentials and bucket settings; they are not configured by local development.
The gateway runtime lives in SAB-GROUP-SRL/jetson-ai under lte/.
See Testing for gateway contract tests.
Tests
npm run test:models
npm run test:integration
npm test
Model and integration suites use their own test stores. See Testing for coverage.