How paliiixray/sih-thermal-intel works
FireSense turns satellite thermal detections into classified, contextualized, prioritized incidents, then supports analyst review, government command, responder operations, and public advisories. The legacy HTTP server and FastAPI backend are parallel runtime surfaces; README says the public deployment still uses the legacy handler while FastAPI runs separately. Sampled source shows the legacy pipeline’s enrichment sequence and FastAPI incident-service calls. Several dashboard and API capabilities are documented but their implementation was not sampled, so those links are documentation-backed.
Main entry points: app.py Legacy HTTP server · pipeline.py Hotspot pipeline · incidents.py Incident API · session.py PostgreSQL/PostGIS
Components 24
Detection and Enrichment
- FIRMS client
backend/firms_api.py - Hotspot pipeline
backend/pipeline.py - OSM correlator
backend/osm_correlator.py - Persistence baseline
backend/persistence_engine.py - Land-cover resolver
backend/landcover.py - Thermal classifier
backend/classifier.py
Incident Intelligence
- Incident records
backend/incident_engine.py - Priority risk engine
backend/app/services/risk/engine.py - Geospatial context
backend/app/services/geospatial/context.py - ML classification
backend/app/services/ml/classifier.py
Operations and Safety
- Incident audit trail
backend/incident_logger.py - Lifecycle state machine
backend/state_machine.py - Simulated alerting
backend/alerts.py
Operational Interfaces
- NTRO dossier
frontend/pages/NTRO.jsx - Government command
static/components/government/GovernmentCommand.jsx - Responder operations
static/components/responder/ResponderOperations.jsx - Public safety advisory
backend/app/api/public.py - Frontend API client
frontend/services/api.js
API and Persistence
- Legacy HTTP server
app.py - Incident API
backend/app/api/incidents.py - FastAPI entrypoint
backend/app/main.py - Authentication
backend/app/core/auth.py - PostgreSQL/PostGIS
backend/app/db/session.py
Other components
- Satellite detections
Connections 24
- Satellite detections → FIRMS client: provides detections
- FIRMS client → Hotspot pipeline: fetches hotspots
backend/pipeline.py - Hotspot pipeline → OSM correlator: correlates context
backend/pipeline.py - Hotspot pipeline → Persistence baseline: calculates persistence
backend/pipeline.py - Hotspot pipeline → Land-cover resolver: resolves cover
backend/pipeline.py - Hotspot pipeline → Thermal classifier: classifies hotspots
backend/pipeline.py - Legacy HTTP server → Hotspot pipeline: runs pipeline
app.py - Legacy HTTP server → Incident records: serves incidents
app.py - Incident API → Geospatial context: gets context
backend/app/api/incidents.py - Incident API → Priority risk engine: scores priority
backend/app/api/incidents.py - Incident API → ML classification: classifies incidents
backend/app/api/incidents.py - FastAPI entrypoint → Incident API: registers routes
backend/app/main.py - FastAPI entrypoint → Authentication: registers routes
backend/app/main.py - Incident API → PostgreSQL/PostGIS: queries and updates
backend/app/api/incidents.py - Geospatial context → PostgreSQL/PostGIS: queries spatial data
backend/app/services/geospatial/context.py - Authentication → PostgreSQL/PostGIS: loads user
backend/app/core/auth.py - Legacy HTTP server → Incident audit trail: reads status log
app.py - Legacy HTTP server → Lifecycle state machine: validates transitions
app.py - Legacy HTTP server → Simulated alerting: dispatches alerts
app.py - NTRO dossier → Frontend API client: requests data
frontend/pages/NTRO.jsx - Frontend API client → Legacy HTTP server: calls API
- Government command → Legacy HTTP server: uses operations API
- Responder operations → Legacy HTTP server: updates field status
- Public safety advisory → PostgreSQL/PostGIS: reads advisories
backend/app/api/public.py