See the rules of the road. Configure any vessel's situation, see her lights from any bearing, and read the exact rule paragraph that says so.
Searoom is an interactive study tool for the COLREGS — starting with navigation lights (Part C), aiming at the whole rules of the road: day shapes, sound signals, conduct rules, and eventually scenario ("ROR sim") training. International rules first; US Inland, Canada, and EU CEVNI are modelled for and land as the data does.
Live demo: https://mark-brannan.github.io/searoom/ — sandbox, identify, quiz, rules reference, and the signposted breadth surface, from sprint 1. The product design is docs/design.md; the sprint's own notes are docs/self-review.md.
Searoom is the consumer face of a small stack, each piece its own package:
| package | role |
|---|---|
| colregs | the rules as language-neutral data — paragraphs, lights, applicability, fixtures |
| colregs-engine | evaluation: predicates → entries → relations → lawful displays |
| nav-wright | SVG rendering: vessels, lights, arcs, scenes |
| searoom | the app: study, quiz, identify, reference |
Engine and renderer were built inside this repo first and extracted later,
not designed as standalone packages up front. Decisions for the whole
family are ADRs in colregs docs/adr/, one sequence; a bare ADR NNNN
here means colregs, and this repo keeps no ADRs of its own.
npm run dev starts Vite's dev server; npm run build && npm run preview
serves a production build. Either prints the URL it's listening on — pass
--port if the default is taken, which it usually is when more than one
worktree is running at once:
npx vite preview --port 4181
Working in a git worktree (.claude/worktrees/<name>)? Run the command from
inside it — Vite serves whatever worktree it's launched from, not main.
To try a pull request, paste the one command under its Try it heading: it
fetches the PR's head into a worktree of its own and serves it on port
10000 + PR number.
A holding branch, hold/<name>, is also deployed beside the live site at
https://mark-brannan.github.io/searoom/preview/<name>/ once its CI run
finishes, and comes down when it merges or is deleted; preview/ lists the
ones up. .github/workflows/deploy.yml says how.
Searoom is a study tool. It is not navigation equipment and must not be used to make collision-avoidance decisions at sea.
AGPL-3.0. The layered licensing is deliberate: the data (colregs, MIT) and the evaluator stay permissive so the ecosystem can build on them; the app and renderer are AGPL so derivatives stay open. The rules of the road themselves are public law and carry no copyright claim here.