Atrium — workspaces, storage, and the Ward boundary

Atrium — workspaces, storage, and the Ward boundary An architecture diagram generated by Archify. Browser · installable PWA · Architecture component Browser installable PWA Caddy · gandolh.ro :443 · One origin — sub-paths, no subdomains Caddy gandolh.ro :443 apps/web · React + Vite · One origin — sub-paths, no subdomains · Reading Room apps/web React + Vite Reading Room apps/api · Fastify + Knex · One origin — sub-paths, no subdomains › atrium's own state · guard runs app-wide apps/api Fastify + Knex guard runs app-wide Ward · identity, grants · One origin — sub-paths, no subdomains · no accounts here Ward identity, grants no accounts here packages/typeset · LaTeX engine, worker thread · One origin — sub-paths, no subdomains › atrium's own state packages/typeset LaTeX engine, worker thread SQLite · metadata, via Knex · One origin — sub-paths, no subdomains › atrium's own state SQLite metadata, via Knex Files on disk · uploads, covers, output · One origin — sub-paths, no subdomains › atrium's own state Files on disk uploads, covers, output HTTPS /atrium /atrium-api cross-origin, CORS enumerated introspect + grant check profile-scoped SQL compile (no I/O) bytes One origin — sub-paths, no subdomains atrium's own state Legend Frontend Backend Database Cloud Security External

Four workspaces

  • • apps/web — React, the Reading Room language, an installable PWA
  • • apps/api — Fastify + Knex, six domain modules, one app-wide guard
  • • packages/shared — the contracts web and api both compile against
  • • packages/typeset — a LaTeX-subset compiler written here, in TypeScript

Two kinds of storage

  • • SQLite holds metadata; the bytes are files on disk
  • • So a database dump alone is not a backup of atrium
  • • Progress, notes and preferences are profile-scoped in SQL, not after

What the Ward cutover removed

  • • No users table, no sessions table, no password hashes
  • • profiles carries an opaque subject and no foreign key to anything
  • • Referential integrity for the subject is Ward's, not atrium's