How moussaabbadla/algeria-fire-map works
Algeria Fire Map presents current and historical wildfire activity, fire danger, exposed communities, forecasts, and restoration priorities through a bilingual map-first web app. The principal workflow is a visitor exploring a map or statistics view, which requests data from the FastAPI service; the backend serves live FIRMS detections and persisted or computed products. Scheduled ingestion enriches and clusters detections for downstream views. Edges reflect README documentation and shown source references/calls; unsampled UI and domain implementations limit finer-grained flow claims.
Main entry points: main.py FastAPI service · ingest.py FIRMS ingestion · db.py Postgres / PostGIS · api.ts API client
Components 33
Web experience
- Fire dashboard
apps/web/components/FireDashboard.tsx - Fire map
apps/web/components/FireMap.tsx - Timeline replay
apps/web/components/TimelineScrubber.tsx - At-risk communities
apps/web/components/AtRiskPanel.tsx - FWI risk view
apps/web/components/RiskPanel.tsx - Restoration view
apps/web/components/RestoreDashboard.tsx - Statistics views
apps/web/components/StatsView.tsx - Stats charts
apps/web/components/statsCharts.tsx - Wilaya choropleth
apps/web/components/NationalChoropleth.tsx - API client
apps/web/lib/api.ts
API products
- FastAPI service
services/api/app/main.py - Fire and event APIs
services/api/app/routers/fires.py - At-risk API
services/api/app/routers/at_risk.py - Weather risk API
services/api/app/routers/risk.py - Restoration API
services/api/app/routers/restoration.py - Statistics API
services/api/app/routers/stats.py - Forecast API
services/api/app/routers/forecast.py
Data lifecycle
- FIRMS ingestion
services/api/app/ingest.py - FIRMS fetch
services/api/app/firms.py - Incident clustering
services/api/app/cluster.py - Burn-scar land cover
services/api/app/landcover.py - Burn severity
services/api/app/severity.py - Grid risk prediction
services/api/app/predict.py - Place risk analysis
services/api/app/places.py - Statistics aggregation
services/api/app/stats.py
State and providers
- Weather provider
services/api/app/weather.py - FWI calculation
services/api/app/fwi.py - Postgres / PostGIS
services/api/app/db.py - Response cache
services/api/app/cache.py
Other components
- Map visitor
- NASA FIRMS
- Open-Meteo
- Earth Engine
Connections 48
- Map visitor → Fire dashboard: explores
README.md - Fire dashboard → API client: requests data
README.md - Fire dashboard → Fire map: displays
- Fire dashboard → Timeline replay: offers replay
- Map visitor → At-risk communities: views exposure
README.md - At-risk communities → API client: requests data
README.md - Map visitor → FWI risk view: views danger
README.md - FWI risk view → API client: requests data
README.md - Map visitor → Restoration view: views recovery
README.md - Restoration view → API client: requests data
README.md - Map visitor → Statistics views: explores history
README.md - Statistics views → Stats charts: renders
apps/web/components/StatsView.tsx - Statistics views → Wilaya choropleth: renders
apps/web/components/StatsView.tsx - Statistics views → API client: requests data
- API client → FastAPI service: calls HTTPS API
README.md - FastAPI service → Fire and event APIs: registers routes
services/api/app/main.py - FastAPI service → At-risk API: registers routes
services/api/app/main.py - FastAPI service → Weather risk API: registers routes
services/api/app/main.py - FastAPI service → Restoration API: registers routes
services/api/app/main.py - FastAPI service → Statistics API: registers routes
services/api/app/main.py - FastAPI service → Forecast API: registers routes
services/api/app/main.py - FastAPI service → FIRMS ingestion: starts scheduler
services/api/app/main.py - Fire and event APIs → FIRMS fetch: fetches detections
services/api/app/routers/fires.py - Fire and event APIs → Response cache: reads cache
services/api/app/routers/fires.py - At-risk API → Place risk analysis: queries communities
services/api/app/routers/at_risk.py - At-risk API → Response cache: reads cache
services/api/app/routers/at_risk.py - Weather risk API → Weather provider: fetches weather
services/api/app/routers/risk.py - Weather risk API → FWI calculation: computes index
services/api/app/routers/risk.py - Weather risk API → Response cache: reads and writes
services/api/app/routers/risk.py - Restoration API → Response cache: reads cache
services/api/app/routers/restoration.py - Restoration API → Postgres / PostGIS: serves scar data
- Statistics API → Statistics aggregation: queries summaries
services/api/app/routers/stats.py - Forecast API → Postgres / PostGIS: reads predictions
services/api/app/routers/forecast.py - Forecast API → Response cache: reads and writes
services/api/app/routers/forecast.py - FIRMS ingestion → FIRMS fetch: fetches fires
services/api/app/ingest.py - FIRMS ingestion → Postgres / PostGIS: upserts detections
services/api/app/ingest.py - FIRMS ingestion → Incident clustering: reclusters events
services/api/app/ingest.py - FIRMS ingestion → Statistics aggregation: refreshes rollups
services/api/app/ingest.py - FIRMS ingestion → Burn-scar land cover: schedules enrichment
services/api/app/ingest.py - FIRMS ingestion → Burn severity: schedules enrichment
services/api/app/ingest.py - FIRMS ingestion → Grid risk prediction: schedules scoring
services/api/app/ingest.py - FIRMS fetch → NASA FIRMS: fetches satellite data
services/api/app/firms.py - Incident clustering → Postgres / PostGIS: updates incidents
services/api/app/cluster.py - Burn-scar land cover → Postgres / PostGIS: enriches scar records
services/api/app/landcover.py - Burn-scar land cover → Earth Engine: queries land cover
README.md - Burn severity → Postgres / PostGIS: stores severity
services/api/app/severity.py - Grid risk prediction → Postgres / PostGIS: writes cell scores
services/api/app/main.py - Place risk analysis → Postgres / PostGIS: queries places and fires
services/api/app/places.py