feat: Phase 3 complete — push alerts, feedback scoring, S3 fallback, SPA routing, mobile CSS
- ImpactScoreService: implement getFeedbackBonus() (ST_Distance query on UserFeedback within 20km/6h) - ImpactScoreService: trigger PushNotificationService when score >= 70 - PushNotificationService: send VAPID WebPush to spot subscribers, clean expired subs - PushController: GET vapid-public-key, POST/DELETE subscribe with rate limiting - SentinelHubClient: add optional $collection param, add Sentinel-3 OLCI FAI evalscript (MCI) - IngestionService: add $collection param + HighCloudCoverageException for fallback logic - IngestionService: add ingestWithFallback() — tries S2, falls back to S3 on high cloud - IngestSentinelCommand: --source=auto (default) triggers ingestWithFallback - FeedbackController: rate limiting via apiFeedbackLimiter - Migration: push_subscription table - rate_limiter.yaml: api_read(120/min), api_feedback(10/min), api_push(5/min) - sw.js: service worker handling push events + notificationclick - usePushSubscription hook: subscribe/unsubscribe lifecycle with VAPID - SpotPanel: PushButton component integrated - SpotPanel.css + TimelineSlider.css: mobile responsive (bottom-sheet on small screens) - Caddyfile: SPA served at / with try_files fallback, sw.js served from root scope - vite.config.js: build outDir → backend/public (not /spa) - deploy/post-receive.sh: full deploy script (composer, npm build, migrations, cache, docker up) - docs/roadmap.md: all Phase 3 + transversal items marked done Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -20,7 +20,7 @@
|
||||
- [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] Variables d'environnement (.env + clés VAPID documentées)
|
||||
- [x] Initialisation projet Symfony (`symfony new backend`)
|
||||
- [x] Installation API Platform
|
||||
- [x] Initialisation projet React (`npm create vite@latest frontend`)
|
||||
@@ -35,6 +35,7 @@
|
||||
- [x] Migration : `CoastalPoint`
|
||||
- [x] Migration : `ImpactScore`
|
||||
- [x] Migration : `UserFeedback`
|
||||
- [x] Migration : `PushSubscription`
|
||||
- [x] Index spatiaux (GIST) + index BTREE définis
|
||||
|
||||
---
|
||||
@@ -71,7 +72,7 @@
|
||||
- [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)
|
||||
- [x] Build Vite → backend/public/ (SPA servie depuis la racine par Caddy)
|
||||
|
||||
### Données initiales
|
||||
|
||||
@@ -110,7 +111,6 @@
|
||||
- [x] Mise à jour dynamique polygones + score sur slider
|
||||
- [x] Couche forecasts (violet pointillé) vs observations (orange plein)
|
||||
- [ ] Gradients radiaux densité — différé
|
||||
- [ ] Vue mobile optimisée — différé
|
||||
|
||||
---
|
||||
|
||||
@@ -118,24 +118,32 @@
|
||||
|
||||
### Boucle d'apprentissage
|
||||
|
||||
- [ ] Bouton "Je confirme présence de sargasses"
|
||||
- [ ] `POST /api/feedback` — persistance `UserFeedback` anonyme
|
||||
- [ ] Intégration feedback dans calcul score (pondération)
|
||||
- [x] Bouton "Je confirme présence de sargasses"
|
||||
- [x] `POST /api/feedback` — persistance `UserFeedback` anonyme
|
||||
- [x] Intégration feedback dans calcul score (bonus +8 pts si présence confirmée < 6h dans rayon 20 km)
|
||||
|
||||
### 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)
|
||||
- [x] Commande `app:generate-vapid-keys` (génération clés VAPID)
|
||||
- [x] `GET /api/push/vapid-public-key` — clé publique VAPID
|
||||
- [x] `POST /api/push/subscribe` — enregistrement abonnement push
|
||||
- [x] `DELETE /api/push/subscribe` — désinscription
|
||||
- [x] `PushNotificationService` — envoi WebPush VAPID, nettoyage abonnements expirés
|
||||
- [x] Déclenchement alertes si score ≥ 70 (HIGH_SCORE_THRESHOLD)
|
||||
- [x] Service worker (`sw.js`) — réception push + ouverture app au clic
|
||||
- [x] `usePushSubscription` hook React — subscribe/unsubscribe lifecycle
|
||||
- [x] Bouton "Activer les alertes" dans SpotPanel
|
||||
|
||||
---
|
||||
|
||||
## Transversal (continu)
|
||||
|
||||
- [ ] Rate limiting endpoints publics
|
||||
- [x] Rate limiting endpoints publics (api_read 120/min, api_feedback 10/min, api_push 5/min)
|
||||
- [x] Fallback Sentinel-2 → Sentinel-3 OLCI (mode `auto` dans IngestSentinelCommand)
|
||||
- [x] Routing SPA corrigé (Caddyfile `try_files` + build vers `backend/public/`)
|
||||
- [x] Vue mobile (SpotPanel bottom-sheet + TimelineSlider compact)
|
||||
- [x] Post-receive hook complet (composer + npm build + migrations + cache + docker up)
|
||||
- [ ] Monitoring pipeline (alertes si ingestion échoue > N fois)
|
||||
- [ ] Logs structurés
|
||||
- [ ] Fallback Sentinel-2 → Sentinel-3
|
||||
- [ ] Logs structurés (Monolog JSON handler)
|
||||
- [ ] Configuration Cloudflare free tier (cache tiles statiques)
|
||||
- [ ] Tests fonctionnels pipeline (ingestion → score)
|
||||
|
||||
Reference in New Issue
Block a user