A public, independent status page for Footics — the football-predictions app. It shows the real-time health of three services: the site, the API & database, and Le Veilleur (the live-match poller).
Version française plus bas — aller à la version FR.
A status page has to survive the very outage it reports. So this one is:
- hosted separately — its own Vercel project, decoupled from the main
footics.appapp; - fed by an external probe — it never reads
footics.app(that would be circular). It reads BetterStack, which probesfootics.appfrom the outside and receives the heartbeat from the poller (Le Veilleur).
The BetterStack API token stays server-side (the /api/status route +
server rendering); it never reaches the browser.
browser ──▶ /api/status (server route, token)
│
▼
BetterStack API ──probes──▶ footics.app + /api/health
▲
└──heartbeat── poller "Le Veilleur"
lib/betterstack.ts— reads/monitors+/heartbeats+/incidents, maps them to 3 services and builds a daily uptime heatmap from the incident windows.app/api/status/route.ts— public, read-only proxy.app/page.tsx+components/status-view.tsx— the page (initial SSR, then a 60 s client-side refresh).
Next.js 16 (App Router) · React 19 · TypeScript · a server-rendered token proxy. Three runtime dependencies, ~250 LOC.
cp .env.example .env.local # add your BETTERSTACK_API_TOKEN
npm install
npm run dev # http://localhost:3000- A Vercel project on this repo (separate from the main app).
- Env var
BETTERSTACK_API_TOKEN(Production). - Domain
status.footics.app→ add theCNAMEVercel gives you at your registrar.
MIT.
Page de statut publique et indépendante de Footics,
sur status.footics.app.
Une page de statut doit survivre à la panne qu'elle annonce. Elle est donc :
- hébergée à part — projet Vercel séparé de l'app principale
footics.app; - alimentée par une sonde externe : elle ne lit pas
footics.app(circulaire), elle lit BetterStack, qui sondefootics.appde l'extérieur et reçoit le heartbeat du poller (« Le Veilleur »).
Le token BetterStack reste côté serveur (route /api/status + rendu
serveur) ; il n'atteint jamais le navigateur.
navigateur ──▶ /api/status (route serveur, token)
│
▼
BetterStack API ──sonde──▶ footics.app + /api/health
▲
└──heartbeat── poller « Le Veilleur »
lib/betterstack.ts— lit/monitors+/heartbeats+/incidents, mappe vers 3 services (Le site, API & base de données, Le Veilleur) et construit la heatmap d'uptime journalière à partir des fenêtres d'incident.app/api/status/route.ts— proxy public (lecture seule).app/page.tsx+components/status-view.tsx— la page (SSR initial + refresh 60 s).
cp .env.example .env.local # y mettre BETTERSTACK_API_TOKEN
npm install
npm run dev # http://localhost:3000- Projet Vercel sur ce repo (séparé de l'app principale).
- Variable d'env
BETTERSTACK_API_TOKEN(Production). - Domaine
status.footics.app→ ajouter leCNAMEfourni par Vercel chez ton registrar.
L'app footics.app garde sa bannière d'incident interne (rapide, via son
propre /api/health). Cette page-ci est la vitrine publique indépendante —
les deux sont complémentaires.
MIT.