prometheus/service
Local Dev 9f16ce3128 prometheus: weekly s3 snapshot of the browse surface to bns/prometheus
scripts/snapshot.mjs renders every public page (home, browse, publish,
boundaries, 8 categories, every active listing) to <out>/<path>/index.html,
plus /sitemap.xml, /robots.txt, and the two static assets. Writing to a
directory next to the service AND uploading via `aws s3 sync` are two
flags on the same command: --out to pick the directory, --upload to push.

Live routes added for /sitemap.xml and /robots.txt so a crawler hitting
the live service sees the same enumeration the snapshot bakes into the
bucket. renderSitemap / renderRobots in service/seo.js are the single
rendering path both call sites use.

Scope deliberately limited to the browse surface — /submit and the API
routes depend on the live backend and were never going to work on a
static mirror. The browse surface IS what the fallback is for: readers
survive an outage, publishers can't.

systemd unit + timer under deploy/ run the snapshot weekly on Sunday
04:00 UTC with 30 min jitter and Persistent=yes so a missed run after a
reboot catches up. Unit uses the sia-storage AWS profile per
[[sia-storage-credentials-location]] and the per-process endpoint URL
baked in via Environment=.

Local dry-run against an empty DB produced 14 HTML files + sitemap +
robots + the two assets.
2026-10-08 21:42:54 +02:00
..
lib prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
admin-pages.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
admin-session.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
admin.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
audit.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
bns.js prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
clamd.js prometheus: upload + ClamAV scan + signed scan reports 2026-10-05 22:41:55 +02:00
db.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
layout.js prometheus: scaffold the standalone service — pages, routing, static assets 2026-10-05 22:22:47 +02:00
listings.js prometheus: signed listings — BIP-137 publisher sign, SQLite index 2026-10-08 01:48:12 +02:00
modes.js prometheus: admin panel — login, listings, 3-mode toggle, audit log 2026-10-08 21:35:48 +02:00
pages-browse.js prometheus: browse pages — categories and per-listing detail 2026-10-08 01:56:52 +02:00
pages.js prometheus: browse pages — categories and per-listing detail 2026-10-08 01:56:52 +02:00
seo.js prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
server.js prometheus: weekly s3 snapshot of the browse surface to bns/prometheus 2026-10-08 21:42:54 +02:00
signing.js prometheus: upload + ClamAV scan + signed scan reports 2026-10-05 22:41:55 +02:00
uploads.js prometheus: upload + ClamAV scan + signed scan reports 2026-10-05 22:41:55 +02:00