Ward in the estate

Ward in the estate An architecture diagram generated by Archify. Browser · one origin, many paths · Architecture component Browser one origin, many paths Caddy · gandolh.ro :443 · Hetzner VPS — one origin, no subdomains · handle_path strips the prefix Caddy gandolh.ro :443 handle_path strips the prefix Ward UI · ward.<domain> — Vite + React · Hetzner VPS — one origin, no subdomains · login · verify · console Ward UI ward.<domain> — Vite + React login · verify · console Consuming apps · atrium · prm · newspapper · sports-app · Hetzner VPS — one origin, no subdomains · each vendors shared-library Consuming apps atrium · prm · newspapper · sports-app each vendors shared-library Ward API · /ward-api — Fastify, 127.0.0.1:8791 · Hetzner VPS — one origin, no subdomains › loopback only — Caddy is the sole way in Ward API /ward-api — Fastify, 127.0.0.1:8791 SQLite · better-sqlite3, WAL · Hetzner VPS — one origin, no subdomains › loopback only — Caddy is the sole way in · accounts · grants · refresh rows SQLite better-sqlite3, WAL accounts · grants · refresh rows Ed25519 signing key · held by Ward alone · Hetzner VPS — one origin, no subdomains › loopback only — Caddy is the sole way in Ed25519 signing key held by Ward alone HTTPS ward.<domain>/ — static SPA /atrium, /prm, … /ward-api GET /session (cookie at /ward-api) OIDC sign-in · POST /session-status GET /oidc/jwks synchronous reads and writes EdDSA sign Hetzner VPS — one origin, no subdomains loopback only — Caddy is the sole way in Legend Frontend Backend Database Cloud Security External

The topology is the constraint

  • • Every project is a sub-path on one origin — there are no subdomains
  • • Ward's cookies stay under /ward-api; apps sign in through OpenID Connect
  • • Same origin is one security context: sub-paths do not sandbox

What a session is

  • • 15-minute EdDSA access token, read only by Ward's own pages
  • • 30-day opaque refresh row, rotated on every use — the app's ward_sid
  • • Revoking is one write; apps notice within their 30-second cache

What Ward owns

  • • Credentials, account identity, and (subject, app, roles) grants
  • • The one Ed25519 private key — apps only ever see the public half
  • • Apps keep their own rows, keyed on an opaque subject