feat(status): add status page with uptime collection (unlisted, noindex)#156
Merged
Conversation
Transpose the Maker status page to Modular, correcting its two main defects: the Maker model derived "uptime" from app-generation activity plus an internal /health (which falls with the service and stores no measurements). Here, a real probe measures public availability and persists measurement points to Postgres, so the 90-day window fills from deployment. - Probe (lib/status/probe.ts): GET vitrine (200-399 = up), POST JSON-RPC tools/list to the MCP endpoint (200/SSE = up, never GET). - Storage: status_check table (Prisma migration) — one row per service per run; aggregated into a 90-day window in lib/status/data.ts. - POST /api/status/probe (token-protected, fail-closed) for the cron; GET /api/status/public for external monitoring. - Page app/status (server, i18n fr/en, var(--bpm-*) tokens), noindex, unlisted: direct URL + discreet footer link. - Ops (in-PR, human-activated): nginx vhost, certbot, DNS, 5-min cron. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01E3uxfWJ26LF6Dj7p7fbWod
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Objectif
Page de statut côté Modular (
status.blueprint-modular.com), transposée du modèle Maker (status.blueprint-maker.com), qui collecte un historique de disponibilité 90 jours dès le déploiement — pour disposer d'un historique réel le jour où il y aura des utilisateurs.Étape 0 — Cartographie du modèle Maker (rapport)
GeneratedApp(createdAt+validationResult.passed).downsans journal réseau./api/internal/healthsur bpm-prod : DB, mémoire, disque…). Tombe avec le service → angle mort.Conclusion : le modèle Maker est interne + dérivé + sans stockage. On ne le réplique pas tel quel ; on implémente une sonde réelle qui persiste ses mesures.
Ce qui est livré
lib/status/probe.ts:GETvitrine (200–399 = up) ;POSTJSON-RPCtools/listsur le MCP (200/SSE = up, jamais de GET).status_check(migration Prisma) — 1 ligne/service/passage. Appliquée automatiquement pardeploy-from-git.sh(prisma migrate deploy).lib/status/data.ts: fenêtre 90 j + incidents (séquences d'échecs).POST /api/status/probe(jeton, fail-closed) pour le cron ;GET /api/status/public(JSON, monitoring externe).app/status/(serveur, i18n fr/en, tokensvar(--bpm-*)),noindex, non listée : URL directe + lien discret en pied de page.deploy/nginx-status-blueprint-modular.conf,deploy/status-probe.crontab, docdeploy/STATUS_PAGE.md, vars.env.noindexvs « indexer »Le message de commit demandé dit « unlisted, noindex » et l'objectif (collecter avant qu'il y ait des utilisateurs) va dans ce sens → j'ai implémenté
noindex+ non listée + lien footer discret. La consigne « Indexer la page status » du brief contredit cela. Facile à inverser (retirerrobotsdu layout + ajouter au sitemap) si l'intention est l'indexation immédiate.Angle mort résiduel (assumé, documenté)
La sonde tourne sur bpm-prod (cron → route POST). Si l'app Next.js est elle-même à terre, aucune mesure n'est écrite → la journée apparaît en
no_data(pasoutage). Fidèle pour toute panne en aval (DNS, certificat, nginx, MCP). Un monitoring externe pourra plus tard appelerGET /api/status/publicpour lever cet angle mort.Validation
npx tsc --noEmit: 0 erreur (parité i18n fr/en garantie par le typage).npm run build: vert —/status,/api/status/probe,/api/status/publicrendus dynamiques (ƒ).deploy-from-git.sh+ ops DNS/SSL/nginx/cron.Ops hors-code (action humaine)
DNS
status.blueprint-modular.com→ bpm-prod · nginx vhost · certbot SSL · jetonSTATUS_PROBE_TOKEN+ cron 5 min. Détails dansdeploy/STATUS_PAGE.md.🤖 Generated with Claude Code
Generated by Claude Code