How hisg-2427/taapsurakshak works
TaapSurakshak is a city heat-risk monitoring and emergency-response platform. Users view dashboard heat data and ward heatmaps; the web application proxies ward and prediction requests to the FastAPI service, which combines ward vulnerability/exposure with modeled heat forecasts and HMRI risk scores. The product also documents mortality-risk analysis, hospital-capacity monitoring, emergency alerts, and account access. Those UI branches are represented at their existing view directory because their implementation was not sampled. The graph omits uncertain wiring; sampled source establishes the main prediction, ward, MongoDB-user, weather, AI-suggestion, and WhatsApp paths.
Main entry points: app.js Web routes · prediction_service.py Forecast and features · dashboard.js Risk dashboard · prediction.py Prediction routes
Components 20
Web application
- Web routes
app.js - Risk and response views
views/TaapSurakshak - Risk dashboard
public/js/dashboard.js
Risk analytics
- Risk API
backend/app/main.py - Prediction routes
backend/app/routes/prediction.py - Forecast and features
backend/app/services/prediction_service.py - Forecast models
backend/app/ml/model_service.py - Model artifacts
backend/app/ml/models - HMRI scoring
backend/app/services/risk_service.py - Ward routes
backend/app/routes/wards.py - Ward factors
backend/app/services/ward_service.py - Ward and weather data
backend/data
AI and messaging
- Suggestion endpoint
backend/aiService.js - WhatsApp service
backend/server.js
User and data
- Account model
models/user.js - MongoDB
Other components
- City user
- Open-Meteo
- Gemini AI
Connections 21
- City user → Web routes: uses
- Web routes → Risk and response views: renders
- Web routes → Account model: queries
- Account model → MongoDB: persists users
- Risk and response views → Risk dashboard: loads
- Risk dashboard → Web routes: requests heat data
- Web routes → Open-Meteo: fetches forecast
- Risk dashboard → Web routes: requests ward data
- Web routes → Risk API: proxies predictions
- Risk API → Prediction routes: dispatches
- Prediction routes → Forecast and features: requests forecasts
- Prediction routes → Ward factors: loads ward factors
- Forecast and features → Ward and weather data: reads data
- Ward factors → Ward and weather data: reads ward data
- Forecast and features → Forecast models: predicts WBGT
- Forecast models → Model artifacts: loads models
- Forecast and features → HMRI scoring: scores forecasts
- Web routes → Suggestion endpoint: mounts routes
- Suggestion endpoint → Gemini AI: generates suggestion
- Web routes → WhatsApp service: proxies messaging
- WhatsApp service → WhatsApp: sends messages