How baddamakshaya01-star/svasthya works
BlazeX is a heatwave early-warning system: users view ward-level forecasts and thermal-risk indicators in a dashboard, while API clients can submit weather observations for heat-stress evaluation. The backend computes thermal indices, predicts hospitalization risk, and evaluates configured alerts; the frontend fetches the ward forecast from the API. Model training and synthetic-data generation support prediction. The README is empty, so capability descriptions come from the sampled source; forecast-to-model loading details are partly omitted, and the separate frontend/src entry appears to be a starter rather than the dashboard.
Main entry points: api.py Risk endpoints · train_model.py Model training · alerts.py Alert engine · main.js Risk dashboard
Components 13
Dashboard
- Risk dashboard
frontend/main.js - Starter counter
frontend/src/counter.js
Risk API
- FastAPI application
main.py - Risk endpoints
blazex/api.py - Thermal calculators
blazex/calculators.py
Risk Modeling
- Risk model
blazex/ml/models/risk_model.joblib - Model training
blazex/ml/train_model.py - Synthetic data
blazex/ml/data_simulator.py - Historical data
blazex/ml/historical_data.csv
Alerts
- Alert engine
blazex/alerts.py - Alert rule and log store
blazex/alerts.py
Other components
- Dashboard user
- Twilio SMS
Connections 12
- Dashboard user → Risk dashboard: uses
- Risk dashboard → Risk endpoints: fetches forecasts
frontend/main.js - FastAPI application → Risk endpoints: registers router
main.py - Risk endpoints → Thermal calculators: calculates indices
blazex/api.py - Risk endpoints → Risk model: predicts risk
- Risk endpoints → Alert engine: evaluates alerts
blazex/api.py - Alert engine → Alert rule and log store: reads and writes
blazex/alerts.py - Alert engine → Twilio SMS: sends SMS
blazex/alerts.py - Model training → Synthetic data: generates missing data
blazex/ml/train_model.py - Synthetic data → Thermal calculators: computes indices
blazex/ml/data_simulator.py - Model training → Historical data: reads training data
blazex/ml/train_model.py - Model training → Risk model: saves model
blazex/ml/train_model.py