A local-first, multi-tenant maintenance-tracking app: Svelte SPA client + Python/Litestar server, joined by a hand-rolled event-sourced sync protocol (HLC ordering + per-field LWW). Architecture is fixed by the ADRs under docs/adr/; read the relevant ADRs before making non-trivial changes.
uv sync— install Python deps fromuv.lock.just bootstrap-dev— apply migrations, create theDevelopmenttenant, and provision theadmin/adminuser. Idempotent.just serve— start the API onhttp://localhost:8000.cd src/js/web && npm install && npm run dev— start the SPA.
Production deployments run the equivalent commands in an init container; there is no environment-conditional code in the server itself.
uv run novamoc tenant create --display-name "<Display Name>"
uv run novamoc user create <username>
uv run novamoc user add-to-tenant <username> <tenant-uuid>The auth cookie is HttpOnly and SameSite=Lax; the SPA never touches the token directly.
Browser: navigate to /login. The layout's boot-time /auth/me probe redirects unauthenticated requests to /login automatically.
Scripts / curl: persist the cookie jar.
curl -c cookies.txt -X POST http://localhost:8000/auth/login \
-H 'Content-Type: application/json' \
-d '{"username": "admin", "password": "admin"}'
curl -b cookies.txt http://localhost:8000/auth/me/openapi, /problems/*, and /auth/login are unauthenticated; every other route returns 401 tenant_not_resolved without a valid session.