From 860a4de0099725e5c024f7aaa84b4bb6cd6c32c2 Mon Sep 17 00:00:00 2001 From: michilis Date: Tue, 25 Aug 2026 16:34:54 +0200 Subject: [PATCH] Check in the dynamic-mint-data analysis it was already sitting on. It was untracked in the working tree. web/src/lib/mint-cards.ts cites it for the reasoning behind hydrating rather than moving the list to SSR, and a comment pointing at a file nobody else has is worse than no comment. Co-Authored-By: Claude Opus 5 --- docs/dynamic-mint-data.md | 361 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 361 insertions(+) create mode 100644 docs/dynamic-mint-data.md diff --git a/docs/dynamic-mint-data.md b/docs/dynamic-mint-data.md new file mode 100644 index 0000000..64ad054 --- /dev/null +++ b/docs/dynamic-mint-data.md @@ -0,0 +1,361 @@ +# Dynamic mint data: analysis + +**Status:** analysis only. No code or config was changed. + +**Goal:** new and updated mints, stats, and reviews should appear on the list (and related list surfaces) immediately, without waiting for the nightly static rebuild. + +**Current architecture (important correction):** nginx does **not** serve `web/dist` as files. Production is: + +``` +browser → nginx :443 → cashumints-site (web/server.mjs :8789) → published copy of dist + → cashumints_api (Hono :8788) → /api/*, /icons/* +``` + +`cashumints-web.timer` rebuilds at **03:30** daily, then `rsync`s `web/dist/` to `WEB_ROOT` (`/var/lib/cashumints/web`). Markup is a snapshot of whatever the API returned at that build. + +--- + +## 1. Data flow audit + +There are **no Astro content collections**. Every dynamic page either fetches the Hono API at **build time** (`web/src/lib/api.ts`, `API_URL`, default `http://127.0.0.1:8787` / prod `8788`) or hydrates in the browser from `/api/…` and/or Nostr. + +Astro “islands” here are **not** React/Vue/Svelte with `client:load`. There is **zero** `client:*` usage. Runtime behaviour is vanilla `