A minimal HTTP server written in Zig using http.zig, with a SvelteKit frontend in web/.
See docs/endpoints.md for the list of HTTP endpoints this service serves.
By default, the server reads config.yaml from the working directory:
port: 5882
debug: trueportis required; the server fails to start if it or the config file itself is missing.debugis optional (defaults tofalse). Whentrue, the server logs every handled request (method, path, status). The defaultconfig.yamlused for local development has it on.
zig build && ./scripts/test_e2e.shzig build runThis blocks the terminal. In a separate terminal:
curl http://localhost:5882/choicesOverride the config path with --config:
zig build run -- --config /etc/rmc/config.yamlzig build fmtThe frontend lives in web/ — a SvelteKit app (TypeScript, Tailwind CSS, Vitest).
Requires Node >= 20. Install pnpm via Corepack (bundled with Node):
corepack enableCorepack reads the exact pnpm version to use from web/package.json's packageManager field — keep that field in place. Without a pin, Corepack's own "latest" pnpm resolution currently hits an unrelated upstream bug (nodejs/corepack#342).
Then install dependencies:
cd web && pnpm installcd web && pnpm run testcd web && pnpm run check
cd web && pnpm run lintcd web && pnpm run dev --opencd web && pnpm run buildChecks run on every PR:
- fmt (
.github/workflows/fmt.yml) —zig fmt --checkonbuild.zig,build.zig.zon, andsrc/. - e2e (
.github/workflows/e2e.yml) — runszig build && ./scripts/test_e2e.shnatively on the runner, the same way it's run locally. - commit-order (
.github/workflows/commit-order.yml) — requires each PR's commits to progress documentation → tests → implementation, without an earlier stage appearing after a later one. Bypass it for a PR that doesn't fit the pattern by applying theskip-commit-orderlabel. - web (
.github/workflows/web.yml) — only runs whenweb/changes; runs lint, typecheck, test, and build for the frontend, the same way they're run locally.
One more check runs after a merge to main:
- docker-e2e (
.github/workflows/docker-e2e.yml) — builds and runs the Dockertesttarget below, to catch packaging issues the nativee2echeck can't see.
Two build targets, sharing one builder stage. docker build fails if a dependency below is missing, so this list doesn't drift from what's really needed.
builder:
- Zig 0.16.0
jqgitcurl
docker build --target test -t rmc:test .
docker run --rm rmc:testdocker build --target runtime -t rmc:runtime .
docker run --rm -p 5882:5882 rmc:runtimeThis blocks the terminal. In a separate terminal:
curl http://localhost:5882/choices