trafficbot

Working on Trafficbot

Repository map

Implementation rules

Development and validation

Use Node 22+; install with npm ci and npm ci --prefix apps/desktop. Native packaging also needs Bun, Rust and the host Tauri prerequisites.

npm run build
npm run lint
npm run check:artifacts
npm --prefix apps/desktop run build
npm --prefix apps/desktop test

Backend tests include Redis-dependent suites. Set REDIS_URL to a disposable Redis instance before npm test -- --runInBand. Do not use a production database. Opt-in suites include test:control, test:browser, test:redis, test:campaigns, test:lifecycle and test:android; inspect their environment requirements before running them. scripts/test-desktop-integration.cjs requires an empty dedicated REDIS_TEST_URL database and local Chrome, and performs destructive queue cleanup in that database.

Run checks appropriate to the change. Document unverified platforms and signing limitations; a local unsigned build is not evidence of a production-ready signed release. Keep runtime changes and documentation aligned.

Local state and signing

.env, sessions/, logs/, .local/, build outputs and dependency directories are private/generated state. Local updater keys may be kept under .local/signing/; preserve them and never print their contents. CI receives signing material through secrets. The public updater key lives in apps/desktop/src-tauri/tauri.conf.json.

Do not push, tag or publish unless authorized by the user. Check staged paths before a commit and use npm run check:artifacts to catch generated or sensitive files.