Skip to content

Contributing workflow

You need Node 24 (see .nvmrc) and Docker to test the container. The bridge repository also needs .NET 10 and Python 3.

npm install
npm run dev

Vite listens on port 5173 and proxies /api and the WebSocket to the API on port 3003. scripts/dev.env sets placeholder keys and DEV_AUTH_BYPASS_USER, which refuses proxied requests and non-localhost hosts. Put overrides in .env.local and data in .dev-data, and both are gitignored. scripts/seed-demo.sh seeds demo data.

Command What it does
npm test Runs Vitest for the server, web app, shared code and supervisor.
npm run typecheck Type-checks the web app, server and panel.
npm run lint Runs oxlint. CI adds --deny-warnings.
npm run build, build:admin, build:server Builds the web app, the panel and the server bundle.
npm run db:migrate Applies the schema.
npm run contest:replay -- --template <id> --cabrillo <log> Scores a past log offline.
npm run build:schema Regenerates the template JSON Schema. Commit the result.
npm run build:theme-schema, build:example-theme Builds the theme manifest schema and the example package.
npm run build:maps Regenerates web/public/maps/*.json. Commit the result.
node scripts/build-cty.ts <cty.csv> <version> <date> Rebuilds the country snapshot.

The drift tests fail on purpose. They cover the template schema, design tokens, auth touchpoints, text keys and brand names. Regenerate the file instead of bypassing the test.

In Net, use npm run dev, test, check and migrate:local. In the docs, use npm run dev and build.

  1. Put no club-specific values in code. Those are instance settings.
  2. Never read process.env directly. Add a setting to server/config.ts.
  3. Import no provider outside server/lib/auth/ and web/src/lib/auth/.
  4. Never hard-code the product name. Use BRAND, or {product} in shared/text.json.
  5. Keep outside services off the critical path.
  6. Add no native dependencies, and use only AGPL-3.0 compatible licenses.
  7. Put no secrets or personal data in the repository, including tests and fixtures.
  8. Write contests as v1 JSON templates with no code, and keep the reserved hooks.
  9. Keep server/lib/auth/TOUCHPOINTS.md current.
  10. Add new data or imagery sources to the Licenses page.
  11. Audit mutations inside their transaction, and publish realtime events after the commit.
  12. Put long text in shared/text.json.
  13. Add a golden test for any scoring change.

A pull request must pass typecheck, lint at zero warnings, tests, the web and admin builds, and the image and Compose smoke tests. Work for a later release is an issue in that milestone.

Bump version in shared/version.json for user-facing releases and leave build to CI. If production needs anything when it moves to a new version, such as a setting, a migration or a data fix, put it in the cutover notes in the same pull request. Do not act on it without a maintainer’s go-ahead.

To add Start at
A setting SETTINGS in server/config.ts, a label in shared/text.json under settings, then the Settings reference.
A migration A new server/migrations/NNNN_name.sql, STRICT with CHECK. Never edit a migration that has been applied.
A route A sub-app in server/routes/ with a permission check, an audit row in the transaction, and a test.
A permission shared/roles.ts (and ADMIN_AREA_PERMISSIONS), a description in shared/text.json, and tests.
A contest A template with embedded tests in shared/contest-engine/templates/. See Contest engine.
A program like POTA shared/programs/ and server/routes/programs.ts.
A theme Model it on scripts/example-theme/. Never commit one.
A radio type Hamlib covers most radios. A native backend changes the protocol. See Radio bridge.
A docs page A file in src/content/docs/ plus an entry in the sidebar in astro.config.mjs.
  • Update the tests, and make sure npm test, typecheck and lint pass.
  • Check that the diff and any screenshots contain no real names, callsigns, hosts, paths or secrets.
  • Regenerate generated and mirrored files.
  • For a user-visible change, note which docs pages it affects.
  • For a scoring change, add a golden test. For a sign-in change, test both providers.