How nagarjun012/thermo-guard works
THERMO-GUARD is an India-wide heat early-warning and disaster-response platform with citizen and government portals. Its workflow combines weather telemetry with thermal-stress and health-risk assessment, then presents warnings, forecasts, and response resources. The government portal adds district-wide monitoring, facility support, and SITREP reporting. The graph reflects documented capabilities and indexed or excerpted relationships; several frontend-to-API connections are not evidenced in the sampled material and are therefore omitted.
Main entry points: risk.py Risk assessment API · main.py FastAPI application · App.tsx Portal routing · weather_service.py Weather telemetry
Components 31
User portals
- Portal routing
frontend/src/App.tsx - Citizen dashboard
frontend/src/pages/CitizenDashboard.tsx - Government dashboard
frontend/src/pages/GovernmentDashboard.tsx - Heat learning hub
frontend/src/pages/LearnPage.tsx
Weather and thermal assessment
- Weather API
backend/app/api/weather.py - Weather telemetry
backend/app/services/weather_service.py - Thermal stress API
backend/app/api/thermal_stress.py - Thermal indices
backend/app/services/thermal_stress_service.py - HTSS calculations
frontend/src/lib/htssEngine.ts
Risk and response
- Risk assessment API
backend/app/api/risk.py - Health risk prediction
backend/app/services/risk_prediction_service.py - ML prediction
backend/app/ml/predict.py - Vulnerability assessment
backend/app/services/vulnerability_service.py - Heat alerts
backend/app/services/alert_service.py - Safety recommendations
backend/app/services/recommendation_service.py - Forecast API
backend/app/api/forecast.py
Government operations
- District monitoring data
frontend/src/services/govHtssService.ts - District reference data
frontend/src/data/allIndiaDistricts.ts - Facility API
backend/app/api/facilities.py - Facility aggregation
backend/app/services/facility_aggregation/aggregation_engine.py - Facility database
backend/app/services/facility_aggregation/database_manager.py - Cooling centres
backend/app/services/facility_aggregation/cooling_centre_adapter.py - SITREP PDF export
frontend/src/utils/sitrepPdfGenerator.ts
API and security
- FastAPI application
backend/app/main.py - Portal authentication
frontend/src/services/authService.ts - Session endpoints
api/auth/login.ts - Session verification
api/_utils/auth.ts
Other components
- Citizens and workers
- Disaster authorities
- Open-Meteo
- ABDM facilities
Connections 32
- Citizens and workers → Portal routing: opens portal
- Disaster authorities → Portal routing: opens portal
- Portal routing → Citizen dashboard: routes to
frontend/src/App.tsx - Portal routing → Government dashboard: routes to
frontend/src/App.tsx - Portal routing → Heat learning hub: routes to
frontend/src/App.tsx - FastAPI application → Weather API: registers route
backend/app/main.py - FastAPI application → Thermal stress API: registers route
backend/app/main.py - FastAPI application → Risk assessment API: registers route
backend/app/main.py - FastAPI application → Forecast API: registers route
backend/app/main.py - FastAPI application → Facility API: registers route
backend/app/main.py - Weather API → Weather telemetry: uses telemetry
- Weather telemetry → Open-Meteo: fetches weather
backend/app/services/weather_service.py - Thermal stress API → Weather telemetry: gets weather
backend/app/api/thermal_stress.py - Thermal stress API → Thermal indices: calculates stress
backend/app/api/thermal_stress.py - Risk assessment API → Weather telemetry: gets weather
backend/app/api/risk.py - Risk assessment API → Thermal indices: calculates stress
backend/app/api/risk.py - Risk assessment API → Vulnerability assessment: assesses vulnerability
backend/app/api/risk.py - Risk assessment API → Health risk prediction: predicts risk
backend/app/api/risk.py - Risk assessment API → ML prediction: requests prediction
backend/app/api/risk.py - Risk assessment API → Heat alerts: generates alerts
backend/app/api/risk.py - Risk assessment API → Safety recommendations: gets recommendations
backend/app/api/risk.py - Forecast API → Weather telemetry: gets forecast data
backend/app/api/forecast.py - Forecast API → Thermal indices: calculates stress
backend/app/api/forecast.py - Government dashboard → District monitoring data: shows district data
- District monitoring data → District reference data: uses district list
frontend/src/services/govHtssService.ts - Facility API → Facility aggregation: requests facilities
backend/app/api/facilities.py - Facility aggregation → Facility database: reads and writes
backend/app/services/facility_aggregation/aggregation_engine.py - Facility aggregation → ABDM facilities: fetches facilities
backend/app/services/facility_aggregation/aggregation_engine.py - Facility aggregation → Cooling centres: fetches centres
backend/app/services/facility_aggregation/aggregation_engine.py - Portal authentication → Session endpoints: calls login
frontend/src/services/authService.ts - Session endpoints → Session verification: uses session helpers
api/auth/login.ts - Government dashboard → SITREP PDF export: exports report