Backend : - SeedCoastalPointsCommand : 29 points Antilles (idempotent) Martinique, Guadeloupe, Sainte-Lucie, Barbade, Saint-Martin Frontend : - api/client.js : wrapper fetch pour spots, observations, feedback - SargassesMap : MapLibre GL JS, marqueurs spots, couche observations GeoJSON avec rechargement bbox dynamique à chaque mouvement carte - SpotPanel : Spot Mode (score/niveau/distance/trend), bouton feedback terrain anonyme, gestion état loading/error/null - App.jsx : composition map + panel, état selectedSpot - vite.config.js : proxy /api → Symfony dev, build → backend/public/spa Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
143 lines
4.7 KiB
Markdown
143 lines
4.7 KiB
Markdown
# ROADMAP — Sargasse-Sentry
|
|
|
|
> Checklist permanente d'avancement projet.
|
|
> Mettre à jour au fil des implémentations.
|
|
|
|
---
|
|
|
|
## Légende
|
|
|
|
- [ ] À faire
|
|
- [~] En cours
|
|
- [x] Terminé
|
|
|
|
---
|
|
|
|
## Phase 0 — Fondations
|
|
|
|
### Infrastructure & environnement
|
|
|
|
- [x] Initialisation dépôt Git (bare repo VPS + hook post-receive)
|
|
- [x] Configuration Docker (FrankenPHP + PostgreSQL/PostGIS + Redis)
|
|
- [x] Configuration Traefik (domaine radarsargasses971.com, SSL Let's Encrypt)
|
|
- [x] Variables d'environnement (.env.example)
|
|
- [x] Initialisation projet Symfony (`symfony new backend`)
|
|
- [x] Installation API Platform
|
|
- [x] Initialisation projet React (`npm create vite@latest frontend`)
|
|
- [x] Configuration MapLibre GL JS + react-map-gl
|
|
|
|
### Base de données
|
|
|
|
- [x] Extension PostGIS activée (dans la migration)
|
|
- [x] Migration : `SargassumObservation`
|
|
- [x] Migration : `SargassumForecast`
|
|
- [x] Migration : `DataIngestionJob`
|
|
- [x] Migration : `CoastalPoint`
|
|
- [x] Migration : `ImpactScore`
|
|
- [x] Migration : `UserFeedback`
|
|
- [x] Index spatiaux (GIST) + index BTREE définis
|
|
|
|
---
|
|
|
|
## Phase 1 — MVP (Antilles, observations uniquement)
|
|
|
|
### Pipeline d'ingestion
|
|
|
|
- [x] Cron VPS (`docker exec` toutes les 3h) → `app:ingest-sentinel`
|
|
- [x] Appel API Sentinel Hub (bandes B04, B08, B11 via evalscript)
|
|
- [x] Création `DataIngestionJob` (pending → success/failed)
|
|
- [x] Retry automatique + logging erreurs
|
|
- [x] Filtrage nuages via Catalog API (seuil 60%, configurable)
|
|
- [x] Calcul AFAI dans evalscript Sentinel Hub (formule complète)
|
|
- [x] Rasterisation → raster UINT8 binaire (evalscript cloud-side)
|
|
- [x] Vectorisation GDAL (`gdal_polygonize.py`) + simplification PostGIS
|
|
- [x] Persistance `SargassumObservation`
|
|
- [ ] Génération vector tiles (Tippecanoe → `.pbf`) — différé Phase 2
|
|
|
|
### API Backend
|
|
|
|
- [x] `GET /api/spots` — liste CoastalPoints (API Platform)
|
|
- [x] `GET /api/spots/{id}` — détail (API Platform)
|
|
- [x] `GET /api/spots/{id}/score` — score + niveau + trend
|
|
- [x] `GET /api/observations?bbox=&date=&source=` — PostGIS ST_Intersects
|
|
- [x] `GET /api/observations/{id}` — détail avec geometry GeoJSON
|
|
- [x] `GET /api/forecasts` — API Platform
|
|
- [x] `POST /api/feedback` — feedback anonyme (IP hachée)
|
|
|
|
### Frontend React
|
|
|
|
- [x] Carte de base (MapLibre GL JS + fond CARTO dark)
|
|
- [x] Affichage observations GeoJSON (bbox dynamique au mouvement)
|
|
- [x] Marqueurs CoastalPoints avec sélection
|
|
- [x] SpotPanel : Spot Mode complet (score, niveau, distance, trend)
|
|
- [x] Bouton feedback terrain (confirmation/infirmation anonyme)
|
|
- [x] Build Vite → backend/public/spa/ (SPA statique servie par Caddy)
|
|
|
|
### Données initiales
|
|
|
|
- [x] Seed `CoastalPoint` zone Antilles — 29 points (plages, ports, surf, pêche)
|
|
|
|
---
|
|
|
|
## Phase 2 — Dérive & Score
|
|
|
|
### Pipeline — simulation de dérive
|
|
|
|
- [ ] Accès NOAA GRIB (vent + courant)
|
|
- [ ] Échantillonnage polygone (centroids + random sampling)
|
|
- [ ] Application vecteur dérive par point
|
|
- [ ] Reconstruction polygone (convex hull / alpha shape)
|
|
- [ ] Génération horizons H+6, H+12, H+24, H+48
|
|
- [ ] Persistance `SargassumForecast`
|
|
- [ ] Génération vector tiles prédictions (Tippecanoe)
|
|
|
|
### Calcul ImpactScore
|
|
|
|
- [ ] Calcul score par `CoastalPoint` (distance, densité, vitesse d'approche, tendance)
|
|
- [ ] Persistance `ImpactScore`
|
|
- [ ] Mise en cache Redis (TTL 3h)
|
|
|
|
### API Backend
|
|
|
|
- [ ] `GET /api/spots/{id}/score` — score courant + horizons
|
|
- [ ] `GET /api/spots/{id}/score?at={datetime}` — score à un instant
|
|
- [ ] `GET /api/forecasts?observationId=` — prédictions par observation
|
|
- [ ] `GET /api/forecasts?bbox=&horizon=` — prédictions par zone + horizon
|
|
|
|
### Frontend React
|
|
|
|
- [ ] Spot Mode complet (OK / Risque / Impact par horizon)
|
|
- [ ] Slider temporel (Now → +6h → +12h → +24h → +48h)
|
|
- [ ] Mise à jour dynamique polygones + score sur slider
|
|
- [ ] Gradients radiaux densité
|
|
- [ ] Animation légère sur polygones de prédiction
|
|
- [ ] Vue mobile optimisée
|
|
|
|
---
|
|
|
|
## Phase 3 — Feedback & Alertes
|
|
|
|
### Boucle d'apprentissage
|
|
|
|
- [ ] Bouton "Je confirme présence de sargasses"
|
|
- [ ] `POST /api/feedback` — persistance `UserFeedback` anonyme
|
|
- [ ] Intégration feedback dans calcul score (pondération)
|
|
|
|
### Alertes push
|
|
|
|
- [ ] Définir modalité d'inscription légère (push token navigateur ou email)
|
|
- [ ] Système d'abonnement par `CoastalPoint`
|
|
- [ ] Worker Symfony — envoi alertes si score dépasse seuil
|
|
- [ ] Interface d'inscription (friction minimale)
|
|
|
|
---
|
|
|
|
## Transversal (continu)
|
|
|
|
- [ ] Rate limiting endpoints publics
|
|
- [ ] Monitoring pipeline (alertes si ingestion échoue > N fois)
|
|
- [ ] Logs structurés
|
|
- [ ] Fallback Sentinel-2 → Sentinel-3
|
|
- [ ] Configuration Cloudflare free tier (cache tiles statiques)
|
|
- [ ] Tests fonctionnels pipeline (ingestion → score)
|