How erukullasamvida-sketch/avishkar-bhusanket works
BHUSANKET is a landslide-risk monitoring and early-warning application: users view monitored locations and risk, request predictions, and review alerts, reports, environmental readings, and analytics. Its backend prepares location features, predicts risk, persists results, evaluates alerts, and conditionally attempts notifications. The frontend provides authenticated monitoring and analysis screens backed by an API client. Edges reflect the sampled backend wiring and source index; frontend-to-API links are dashed where route/API implementations were not sampled.
Main entry points: routers Monitoring endpoints · prediction_service.py Risk prediction workflow · main.py API application · prediction.py Prediction endpoint
Components 24
User application
- Monitoring screens
frontend/risk-watch-ne/src/routes/_authenticated - App router
frontend/risk-watch-ne/src/router.tsx - API client
frontend/risk-watch-ne/src/lib/api - Supabase auth
frontend/risk-watch-ne/src/integrations/supabase
API and access
- API application
backend/app/main.py - Token verification
backend/app/auth.py - SQLite database
backend/app/database.py - Prediction endpoint
backend/app/routers/prediction.py - Monitoring endpoints
backend/app/routers
Risk and warning
- Feature preparation
backend/app/services/feature_preparation.py - Risk prediction workflow
backend/app/services/prediction_service.py - ML prediction
backend/app/ml/predict.py - Scenario search
backend/app/services/scenario_search.py - Risk analysis
backend/app/services/risk_engine.py - Alert evaluation
backend/app/services/alert_service.py - Alert notifications
backend/app/services/notification_service.py
Monitoring data
- Weather integration
backend/app/services/weather_service.py - Locations
backend/app/models/location.py - Environmental readings
backend/app/models/environmental.py - Risk records
backend/app/models/risk.py - Alerts
backend/app/models/alert.py - Field reports
backend/app/models/report.py - Sensors
backend/app/models/sensor.py
Other components
- Monitoring user
Connections 30
- Monitoring user → App router: opens app
frontend/risk-watch-ne/src/router.tsx - App router → Monitoring screens: routes to
frontend/risk-watch-ne/src/router.tsx - Monitoring screens → API client: requests data
- Monitoring screens → Supabase auth: authenticates with
- API client → API application: calls API
- API application → Token verification: requires auth
backend/app/main.py - API application → SQLite database: initializes
backend/app/main.py - API application → Prediction endpoint: registers
backend/app/main.py - API application → Monitoring endpoints: registers
backend/app/main.py - Prediction endpoint → SQLite database: gets session
backend/app/routers/prediction.py - Prediction endpoint → Risk prediction workflow: invokes
backend/app/routers/prediction.py - Risk prediction workflow → Feature preparation: prepares features
backend/app/services/prediction_service.py - Risk prediction workflow → ML prediction: predicts risk
backend/app/services/prediction_service.py - Risk prediction workflow → Alert evaluation: evaluates alert
backend/app/services/prediction_service.py - Risk prediction workflow → Alert notifications: sends notifications
backend/app/services/prediction_service.py - Risk prediction workflow → Risk records: stores record
backend/app/services/prediction_service.py - Risk prediction workflow → Locations: loads location
backend/app/services/prediction_service.py - Feature preparation → Locations: reads location
backend/app/services/feature_preparation.py - Feature preparation → Environmental readings: reads observations
backend/app/services/feature_preparation.py - Alert evaluation → Alerts: creates or reuses
backend/app/services/alert_service.py - Monitoring endpoints → SQLite database: queries data
backend/app/routers/analytics.py - Monitoring endpoints → Locations: reads locations
backend/app/routers/dashboard.py - Monitoring endpoints → Risk records: reads risk
backend/app/routers/dashboard.py - Monitoring endpoints → Alerts: reads alerts
backend/app/routers/analytics.py - Monitoring endpoints → Field reports: reads reports
backend/app/routers/analytics.py - Monitoring endpoints → Weather integration: fetches weather
backend/app/routers/environmental.py - Monitoring endpoints → Environmental readings: uses readings
backend/app/routers/environmental.py - Monitoring endpoints → Sensors: serves sensors
- Prediction endpoint → Scenario search: searches scenarios
backend/app/routers/prediction.py - Prediction endpoint → Risk analysis: analyzes risk
backend/app/routers/prediction.py