Commit graph

4 commits

Author SHA1 Message Date
Florian
a849977fcc refactor(mf): API Key longue durée au lieu d OAuth2 client_credentials
Some checks are pending
Deploy info-canicule / deploy (push) Waiting to run
Le portail Météo France ne propose pas le flow client_credentials gratuit
(seulement token OAuth2 court 1h, pas viable, ou API Key longue durée).
On simplifie : un seul env METEOFRANCE_API_KEY → Authorization: Bearer.

- lib/meteofrance-auth.ts : suppression du cache token + flow refresh
- .env.tmpl : ref unique vers vault Infra/Météo France API/api_key
- vault item recréé avec api_key (hidden) + created_at + expires_at
- CLAUDE.md projet : section rotation API key

L onglet 24 h n apparaît qu une fois api_key non vide dans le vault.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 00:25:54 +02:00
Florian
2c4d91ce2f feat: graph T° interactif + widget iframe + MF auth + E2E Playwright
Some checks are pending
Deploy info-canicule / deploy (push) Waiting to run
Graph T° (TemperatureChartInteractive.astro) :
- Onglets 24 h / 7 j / 30 j (toggle JS, séries serialisées au SSR)
- Hover vertical line + tooltip valeurs
- Overlay normales mois en pointillé (TX orange, TN bleu)
- Onglet 24 h dispo seulement si l'API MF a répondu (best-effort)

Météo France OAuth2 (lib/meteofrance-auth.ts + observations.ts) :
- client_credentials avec refresh auto, cache token Valkey
- Fallback METEOFRANCE_STATIC_TOKEN pour debug
- /synop endpoint pour 24h horaires par station SYNOP du dept
- Mapping dept → station SYNOP la plus proche (src/data/stations-synop.json)
- En attente de creds : SDK skip silencieusement, l'onglet 24h n'apparaît pas

Widget iframe (/embed/dept/[code] + /embed doc) :
- Layout minimal sans header/footer global
- Réutilisable via iframe avec une ligne
- Page /embed avec snippet copier-coller + aperçu live

Tests E2E Playwright (tests/e2e/) :
- home (carte 96 paths, tooltip dept, navigation)
- api (health, vigilance, vigilance/dept)
- departement (tabs période, DROM notice, 404)
- static pages (a-propos, mentions, dependances, soutenir, conseils, embed)
- embed widget (rendu minimal, headers X-Frame OK)
- 20+ tests, run via pnpm test:e2e (live) ou test:e2e:local

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-26 00:14:05 +02:00
Florian
86352eb436 feat: pages contenu + SEO + Umami + sitemap
Some checks are pending
Deploy info-canicule / deploy (push) Waiting to run
- Pages /a-propos, /mentions-legales, /dependances, /soutenir (Ko-fi)
- Header/footer enrichis (lien Soutenir, mentions, API publique)
- @astrojs/sitemap + /sitemap-departements.xml.ts (96 dépts)
- robots.txt + og-image.svg + JSON-LD Schema.org
- Meta tags Open Graph + Twitter Card + canonical
- Umami snippet conditionnel (UMAMI_WEBSITE_ID env)
- Slot SENTRY_DSN dans .env.tmpl (GlitchTip — SDK à wire ultérieurement)
- @tailwindcss/typography pour les pages contenu

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:28:46 +02:00
Florian
e075d963bc init: info-canicule MVP (Vigilance + climato + conseils)
Astro 5 SSR + ioredis cache Valkey, déployable sur shared-net.
- Vigilance temps réel via Opendatasoft (no-auth, LOv2)
- Carte SVG des 96 départements (gregoiredavid/france-geojson)
- Climato T° 30j par dept (CSV.GZ Météo France, cache 24h)
- Conseils officiels par phénomène (7 types Vigilance)
- /api/health (UptimeRobot) + /api/vigilance (JSON public CORS *)
- Dockerfile multi-stage, CI Forgejo deploy.yml (pattern Reteno)

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-05-25 18:17:56 +02:00