diff --git a/vue/src/router/index.js b/vue/src/router/index.js
index 4e82a11..bf270e1 100644
--- a/vue/src/router/index.js
+++ b/vue/src/router/index.js
@@ -60,6 +60,12 @@ const router = createRouter({
name: "cheap-hotels",
component: () => import("@/views/hotels/CheapHotels.vue"),
},
+ {
+ path: "architecture",
+ name: "architecture",
+ component: () =>
+ import("@/views/architecture/Architecture.vue"),
+ },
// /shrines and the shrines under it are canvas pages, made
// from the admin panel's Pages tab and served by the catch-all
// below. The old hand-written ones (views/home/shrines/) are
diff --git a/vue/src/views/architecture/Architecture.vue b/vue/src/views/architecture/Architecture.vue
new file mode 100644
index 0000000..44364c4
--- /dev/null
+++ b/vue/src/views/architecture/Architecture.vue
@@ -0,0 +1,83 @@
+
+
+
+
+
+
+
+ How this site works
+
+ Everything behind this website, drawn. It is a couple of
+ dozen Docker containers on one Ubuntu VM: nginx in front, a
+ Go GraphQL backend, a Vue single-page app, a Python API that
+ holds the Claude call and the scrapers, and a ring of
+ self-hosted services (Gitea, SilverBullet notes, Garage
+ object storage, Icecast radio, a job tracker) around them.
+ Each diagram can be expanded to full screen.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagram.css b/vue/src/views/architecture/diagram.css
new file mode 100644
index 0000000..77a18db
--- /dev/null
+++ b/vue/src/views/architecture/diagram.css
@@ -0,0 +1,256 @@
+/*
+ * The diagram kit: every SVG on /architecture draws with these classes, so
+ * fifty-odd diagrams written separately still read as one set. Colours come
+ * from the site's design tokens (assets/styles.css), never literals.
+ *
+ * Not scoped: the classes are applied to elements inside each diagram
+ * component's own template, and a scoped block would only reach its own file.
+ * Everything is prefixed `dg-` so nothing leaks into the rest of the site.
+ *
+ * Arrowheads are s defined once on the page by DiagramDefs.vue and
+ * referenced by the edge classes below, so diagrams never declare their own
+ * (duplicate ids across many inline SVGs would collide).
+ */
+
+.dg {
+ display: block;
+ width: 100%;
+ height: auto;
+ font-family: var(--font-body);
+ font-size: 12px;
+}
+
+/* ---- Boxes -------------------------------------------------------- */
+
+.dg-box {
+ fill: var(--color-surface);
+ stroke: var(--color-primary);
+ stroke-width: 1.5;
+}
+.dg-box--pink {
+ stroke: var(--color-tertiary);
+}
+.dg-box--green {
+ stroke: var(--color-secondary);
+}
+.dg-box--teal {
+ stroke: var(--color-quaternary);
+ stroke-width: 2;
+}
+.dg-box--muted {
+ stroke: var(--color-muted);
+ stroke-dasharray: 4 3;
+ opacity: 0.85;
+}
+.dg-box--tint {
+ fill: var(--color-surface-tint);
+}
+.dg-box--deep {
+ fill: var(--color-surface-deep);
+}
+/* Solid accent fill: a highlighted node. Pair with .dg-text--ink. */
+.dg-box--solid {
+ fill: var(--color-primary);
+}
+.dg-box--solid-pink {
+ fill: var(--color-tertiary);
+ stroke: var(--color-tertiary);
+}
+
+/* A dashed container drawn around a set of boxes (a network, a container, a
+ layer). Put it before its children so it sits underneath. */
+.dg-group {
+ fill: none;
+ stroke: var(--color-quaternary);
+ stroke-width: 1.5;
+ stroke-dasharray: 6 4;
+}
+.dg-group--pink {
+ stroke: var(--color-tertiary);
+ opacity: 0.7;
+}
+.dg-group--fill {
+ fill: var(--color-surface-tint);
+ fill-opacity: 0.5;
+}
+
+/* ---- Text --------------------------------------------------------- */
+
+/* Box / node titles: the condensed heading face, uppercase by nature. */
+.dg-title {
+ font-family: var(--font-heading);
+ font-size: 16px;
+ letter-spacing: 0.04em;
+ fill: var(--color-primary);
+}
+.dg-title--pink {
+ fill: var(--color-tertiary);
+}
+.dg-title--lg {
+ font-size: 20px;
+}
+.dg-title--sm {
+ font-size: 13px;
+}
+.dg-text {
+ fill: var(--color-secondary);
+ font-size: 12px;
+}
+.dg-text--muted {
+ fill: var(--color-muted);
+}
+.dg-text--pink {
+ fill: var(--color-tertiary);
+}
+.dg-text--mint {
+ fill: var(--color-primary);
+}
+/* Dark text for use on .dg-box--solid / --solid-pink */
+.dg-text--ink {
+ fill: var(--color-surface-deep);
+}
+.dg-small {
+ fill: var(--color-muted);
+ font-size: 10.5px;
+}
+.dg-code {
+ font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
+ font-size: 11px;
+ fill: var(--color-tertiary);
+}
+.dg-group-label {
+ font-family: var(--font-heading);
+ font-size: 13px;
+ letter-spacing: 0.06em;
+ fill: var(--color-quaternary);
+ filter: brightness(2.2);
+}
+/* Label sitting on a line: a halo in the page colour keeps it legible where
+ it crosses an edge. */
+.dg-edge-label {
+ font-size: 10.5px;
+ fill: var(--color-muted);
+ paint-order: stroke;
+ stroke: var(--color-surface-deep);
+ stroke-width: 4px;
+ stroke-linejoin: round;
+}
+.dg-edge-label--pink {
+ fill: var(--color-tertiary);
+}
+.dg-edge-label--mint {
+ fill: var(--color-primary);
+}
+
+/* ---- Edges -------------------------------------------------------- */
+
+.dg-edge {
+ fill: none;
+ stroke: var(--color-primary);
+ stroke-width: 1.5;
+ marker-end: url(#dg-arrow);
+}
+.dg-edge--pink {
+ stroke: var(--color-tertiary);
+ marker-end: url(#dg-arrow-pink);
+}
+.dg-edge--green {
+ stroke: var(--color-secondary);
+ marker-end: url(#dg-arrow-green);
+}
+.dg-edge--muted {
+ stroke: var(--color-muted);
+ marker-end: url(#dg-arrow-muted);
+}
+.dg-edge--dashed {
+ stroke-dasharray: 5 4;
+}
+/* Two-way: add an arrowhead at the start too. Combine with a colour class
+ and the matching --both-* class, e.g. "dg-edge dg-edge--pink dg-edge--both-pink". */
+.dg-edge--both {
+ marker-start: url(#dg-arrow-start);
+}
+.dg-edge--both-pink {
+ marker-start: url(#dg-arrow-start-pink);
+}
+.dg-edge--both-green {
+ marker-start: url(#dg-arrow-start-green);
+}
+.dg-edge--both-muted {
+ marker-start: url(#dg-arrow-start-muted);
+}
+/* A line with no arrowhead: connectors, ER relationships, axes. */
+.dg-edge--plain {
+ marker-end: none;
+}
+/* Marching ants for a live flow. Combine with any colour; motion stops for
+ people who asked for less. */
+.dg-edge--flow {
+ stroke-dasharray: 6 5;
+ animation: dg-march 1.2s linear infinite;
+}
+@keyframes dg-march {
+ to {
+ stroke-dashoffset: -22;
+ }
+}
+@media (prefers-reduced-motion: reduce) {
+ .dg-edge--flow {
+ animation: none;
+ }
+}
+
+/* ---- Sequence diagrams ------------------------------------------- */
+
+.dg-lifeline {
+ stroke: var(--color-quaternary);
+ stroke-width: 1.5;
+ stroke-dasharray: 3 4;
+ filter: brightness(1.8);
+}
+.dg-activation {
+ fill: var(--color-quaternary);
+ stroke: var(--color-primary);
+ stroke-width: 1;
+}
+
+/* ---- Small marks -------------------------------------------------- */
+
+.dg-dot {
+ fill: var(--color-primary);
+}
+.dg-dot--pink {
+ fill: var(--color-tertiary);
+}
+.dg-dot--green {
+ fill: var(--color-secondary);
+}
+.dg-dot--muted {
+ fill: var(--color-muted);
+}
+/* Numbered step badge: a circle with .dg-badge-text centred on it. */
+.dg-badge {
+ fill: var(--color-tertiary);
+}
+.dg-badge-text {
+ font-family: var(--font-heading);
+ font-size: 13px;
+ fill: var(--color-surface-deep);
+ text-anchor: middle;
+ dominant-baseline: central;
+}
+/* Divider / separator lines inside a box (table rows in an ER box, etc.) */
+.dg-rule {
+ stroke: var(--color-quaternary);
+ stroke-width: 1;
+ filter: brightness(1.8);
+}
+/* Shaded band, e.g. a highlighted lane or a time window */
+.dg-band {
+ fill: var(--color-quaternary);
+ opacity: 0.25;
+}
+.dg-band--pink {
+ fill: var(--color-tertiary);
+ opacity: 0.12;
+}
diff --git a/vue/src/views/architecture/diagrams/backend/RequestLifecycle.vue b/vue/src/views/architecture/diagrams/backend/RequestLifecycle.vue
new file mode 100644
index 0000000..075db59
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/backend/RequestLifecycle.vue
@@ -0,0 +1,160 @@
+
+
+
+
+
+ nginx strips /api, so the backend's routes are written from /.
+ Gin matches the route first, then runs its chain, which always begins with
+ TrafficLogFormatter and Recovery. After that there are four kinds of chain:
+ open routes ① that check cookies themselves if they need to, the protected group ②,
+ the admin group ③ (whose AdminMiddleware reads the claims
+ AuthMiddlewear stored, so the order matters), and GraphQL ④ (the animated path),
+ which has no guard in front of it at all: each field's directive decides. Pink marks the auth
+ checks. SetTrustedProxies pins the Docker network so ClientIP(), which
+ the login rate limiter keys on, can't be spoofed with X-Forwarded-For.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/edge/EntrypointFlow.vue b/vue/src/views/architecture/diagrams/edge/EntrypointFlow.vue
new file mode 100644
index 0000000..e595f25
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/edge/EntrypointFlow.vue
@@ -0,0 +1,130 @@
+
+
+
+
+
+ No nginx.conf is baked into the image; three templates are,
+ and the entrypoint writes exactly one of them on every start. Step
+ 1 renders the shared route table first, whatever happens
+ next. At 2, DEV_MODE (set only by
+ docker-compose.dev.yml) wins outright; otherwise the presence
+ of a certificate decides, because the production config's
+ ssl_certificate lines would stop nginx from starting without
+ one. The envsubst allow-list is what keeps nginx's own
+ $host and $remote_addr intact: only the named
+ ${DOMAIN} ${BACKEND_HOST} … variables are replaced. The
+ watcher at 3 moves a setup-mode nginx onto the
+ production config once certbot's first certificate lands (render to a
+ temp file, nginx -t, install, nginx -s reload),
+ and reloads after a renewal when certbot's --deploy-hook
+ touches /etc/letsencrypt/.nginx-reload. Grey dashed = local
+ dev only.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/edge/RouteMap.vue b/vue/src/views/architecture/diagrams/edge/RouteMap.vue
new file mode 100644
index 0000000..ea1afb2
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/edge/RouteMap.vue
@@ -0,0 +1,229 @@
+
+
+
+
+
+ Read it right to left: each box is one container on app-network
+ (or a volume nginx reads itself), and the rows beside it are the
+ locations that reach it. Pink rows run the admin gate first; grey rows
+ never leave nginx. Upstreams are written as set $upstream_* …
+ variables, so nginx resolves container names per request through Docker's
+ DNS (resolver 127.0.0.11 valid=10s) and still boots when one of
+ them is down. Every proxied row also gets the bare-prefix twin
+ (/gitea → 301 /gitea/) that is left out here; in
+ dev, / goes to vue:5173 instead of
+ vue_dist, and /api/graphql falls into
+ /api/.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/frontend/BootSequence.vue b/vue/src/views/architecture/diagrams/frontend/BootSequence.vue
new file mode 100644
index 0000000..a1f7cae
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/frontend/BootSequence.vue
@@ -0,0 +1,106 @@
+
+
+
+
+
+ main.js installs the router (3) before Pinia (4), and the router's install
+ starts the first navigation at once. That works only because navigation guards run in a promise
+ chain, so by the time beforeEach calls useAuthStore() (6) Pinia is active.
+ On / the guard has nothing to wait for. The canvas then fires three independent
+ GraphQL POSTs (9–14). It asks for me on its own rather than through the home query,
+ so the landing page never fans out to Spotify, Steam and Gitea just to decide whether to show an
+ Edit button. The nine-field HomeData query (pink band, 17–18) is sent only as a side
+ effect of the first useHomeDataStore() call, which happens when a widget box mounts.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/frontend/RouteTree.vue b/vue/src/views/architecture/diagrams/frontend/RouteTree.vue
new file mode 100644
index 0000000..db5e1c7
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/frontend/RouteTree.vue
@@ -0,0 +1,130 @@
+
+
+
+
+
+ App.vue is an empty <RouterView />; all chrome lives in the
+ layouts the router mounts. Only Landing.vue is imported statically, because it is
+ the first paint, and even it pulls BoxCanvas in as a separate chunk. Every other view
+ is a dynamic import(). Pages made in the browser have no entry here: the catch-all
+ looks the path up as a Page, which is why the backend's validateSlug
+ refuses slugs whose first segment a static route or nginx already answers. Route
+ names are used by RouterLink and router.push, and
+ Login.vue checks for the name "404", so renaming one breaks links.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/infra/HostOverview.vue b/vue/src/views/architecture/diagrams/infra/HostOverview.vue
new file mode 100644
index 0000000..dafbde4
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/infra/HostOverview.vue
@@ -0,0 +1,296 @@
+
+
+
+
+
+ Twenty containers on one bridge network, app-network, plus the CI runner on the host itself.
+ Requests come in through the Cloudflare tunnel (cloudflared dials out, so nothing has to be
+ forwarded) or directly on 80/443. Either way they land on nginx, the only thing that sees the
+ internet, which fans them out by path prefix to twelve upstreams it finds by container name. Behind it,
+ backend, gitea, jobs and activity-tracker share one
+ Postgres with a database each. Only four ports are published: 80/443 for nginx, 3000/2222 for Gitea (the runner and
+ git clients need them), and liquidsoap's harbor for live DJs. The two containers that hold the Docker socket
+ read-write (autoheal) or tail a file (traffic) get no network at all.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/infra/_Example.vue b/vue/src/views/architecture/diagrams/infra/_Example.vue
new file mode 100644
index 0000000..0fa1272
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/infra/_Example.vue
@@ -0,0 +1,43 @@
+
+
+
+
+
+ Captions explain what the picture shows and why it is that way, with
+ code names where they help.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/services/PythonRouteMap.vue b/vue/src/views/architecture/diagrams/services/PythonRouteMap.vue
new file mode 100644
index 0000000..b64f64d
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/services/PythonRouteMap.vue
@@ -0,0 +1,125 @@
+
+
+
+
+
+ nginx strips /py with rewrite ^/py/(.*)$ /$1 break, so FastAPI's
+ routes are written relative to / and --root-path /py only exists to
+ keep /py/docs pointing at the right OpenAPI URL. The hotel streams get their own
+ location because nginx would otherwise buffer the whole NDJSON response. The pink route spends
+ a paid Claude call and has no auth of its own, so it has two locks: nginx answers
+ /py/internal/ with a 404, and _internal_only 404s anything carrying
+ the X-Real-IP/X-Forwarded-For headers nginx always adds. The Go
+ backend (green) calls the container directly and sends neither. The guard is a dependency, so
+ a request from outside gets the 404 before its body is validated.
+
+
+
+
+
diff --git a/vue/src/views/architecture/diagrams/services/RowingClaudeCall.vue b/vue/src/views/architecture/diagrams/services/RowingClaudeCall.vue
new file mode 100644
index 0000000..b5b94c2
--- /dev/null
+++ b/vue/src/views/architecture/diagrams/services/RowingClaudeCall.vue
@@ -0,0 +1,134 @@
+
+
+
+
+
+ Everything that needs the session or the database stays in Go (steps 2, 3, 8, 9); Python
+ only turns pixels into three numbers. The duplicate check (3) runs before the paid call,
+ keyed on the photo's EXIF timestamp, so a re-upload costs nothing. Step 5 is where
+ CLAUDE_MODEL matters: models that think get 4,000 tokens of headroom and
+ effort: "low", while Haiku 4.5 rejects the effort setting and gets neither. The
+ timeouts nest on purpose: Python's 30s per attempt with two SDK retries sits inside Go's
+ 2-minute client, so a slow Claude surfaces as Python's fixed message, which Go relays to the
+ admin only when it came back as a 502.
+
+
+
+
+
diff --git a/vue/src/views/architecture/sections/BackendSection.vue b/vue/src/views/architecture/sections/BackendSection.vue
new file mode 100644
index 0000000..1bc6302
--- /dev/null
+++ b/vue/src/views/architecture/sections/BackendSection.vue
@@ -0,0 +1,17 @@
+
+
+
+
+ Go backend
+
+ A Gin server with a GraphQL API at /api/graphql and a
+ handful of REST endpoints. Every request passes through the same
+ middleware chain before it reaches a handler or resolver.
+
+
+
+
diff --git a/vue/src/views/architecture/sections/EdgeSection.vue b/vue/src/views/architecture/sections/EdgeSection.vue
new file mode 100644
index 0000000..de09ae1
--- /dev/null
+++ b/vue/src/views/architecture/sections/EdgeSection.vue
@@ -0,0 +1,19 @@
+
+
+
+
+ The edge: nginx
+
+ Every request enters through nginx. Its config is chosen when the
+ container starts, and one shared routes file decides which
+ container each path is handed to.
+
+
+
+
+
diff --git a/vue/src/views/architecture/sections/FrontendSection.vue b/vue/src/views/architecture/sections/FrontendSection.vue
new file mode 100644
index 0000000..802f325
--- /dev/null
+++ b/vue/src/views/architecture/sections/FrontendSection.vue
@@ -0,0 +1,19 @@
+
+
+
+
+ Vue frontend
+
+ A Vue 3 single-page app: a small route table with two layout
+ shells, a catch-all that serves admin-made canvas pages, and Pinia
+ stores that load data over GraphQL.
+
+
+
+
+
diff --git a/vue/src/views/architecture/sections/InfraSection.vue b/vue/src/views/architecture/sections/InfraSection.vue
new file mode 100644
index 0000000..0280e90
--- /dev/null
+++ b/vue/src/views/architecture/sections/InfraSection.vue
@@ -0,0 +1,18 @@
+
+
+
+
+ Infrastructure & deployment
+
+ The whole site is one Docker Compose stack on a single Ubuntu VM,
+ stpvm. Only nginx (and the Cloudflare tunnel) faces
+ the internet; everything else talks over the internal Docker
+ network.
+
+
+
+
diff --git a/vue/src/views/architecture/sections/ServicesSection.vue b/vue/src/views/architecture/sections/ServicesSection.vue
new file mode 100644
index 0000000..bbd6bc3
--- /dev/null
+++ b/vue/src/views/architecture/sections/ServicesSection.vue
@@ -0,0 +1,19 @@
+
+
+
+
+ Python & the other services
+
+ The FastAPI service holds the scrapers and the site's one Claude
+ call. Public routes are reached through nginx at
+ /py/; internal ones only from the Go backend.
+
+
+
+
+