Skip to content

System architecture

The app also reaches Shackworks Net over an optional, signed, best-effort connection. Flex radios, Hamlib rigs and WSJT-X talk to their bridge, never to the server directly.

Component Location
Instance app server/, web/ and shared/
Supervisor and hosting panel supervisor/ and admin/
Radio bridge The shackworks-bridge repository
Shackworks Net The shackworks-net repository

shared/ holds types and pure logic, with no database, network or clock access. Callers pass times in. The server, web app, panel and supervisor all use it. It contains the contest engine, the ham helpers, roles, time zones, the theme API, band plans and text.json.

Some files exist as copies that must stay identical. shared/brand.ts matches src/lib/brand.ts in Net, and a script copies shared/design/foundation.css into Net. Never edit the copy.

All state lives under /data: the database, config.json, logs, backups, and the Net key and state. The app and the panel listen on separate ports, and the panel is bound to the machine only. Bridges connect outward, so radios need no inbound port. A custom reverse proxy must pass WebSocket upgrades for /api/ws and /api/radio/bridge and set the forwarded headers.

  1. The request arrives as POST /api/contacts or as a bridge post.
  2. createContact() in server/lib/contact-create.ts is the only code that writes a contact. It validates the contact and scores it into the in-memory contest state. Then, in one transaction, it writes the contact and its contact_extras (POTA data, for example), closes matching open spots, credits the spotter for contest contacts, and writes audit_log.
  3. After the commit, the server publishes the change to the realtime hub.
  4. A callsign lookup fills in blank fields. It is capped at four seconds and never makes the save fail.