How devendrarajsingh07/sih2026-mghsis. works
MGHSIS is an operational decision-support platform for mass-gathering safety. Its principal workflow is to ingest band, CCTV, and gate observations; assess and fuse risk; present live venue conditions and forecasts in the operations portal; then let an operator authorize a simulated intervention and verify its projected effect. The README documents the broader product capabilities, but several web and API relationships are not visible in the sampled source; those links are shown only where documented or marked unverified.
Main entry points: hardware.py Hardware ingestion · simulation.py Scenario simulation · model.py Crowd-risk model · redis_runtime.py Live state and pub/sub
Components 25
Sensing and simulation
- Safety bands
- CCTV analytics
- Gate events
- Telemetry simulators
services
Core API
- Hardware ingestion
apps/api/app/api/hardware.py - ML endpoints
apps/api/app/api/ml.py - Scenario simulation
apps/api/app/api/simulation.py - Realtime stream
apps/api/app/api/realtime.py - System health
apps/api/app/api/system.py
Risk intelligence
- Zone risk fusion
apps/api/app/api/simulation.py - Crowd-risk model
apps/api/app/ml/model.py - Feature contract
apps/api/app/ml/features.py - Risk schemas
apps/api/app/ml/schemas.py - Human-risk workflow
apps/web/src/lib/human-risk.ts
Shared runtime
- Live state and pub/sub
apps/api/app/core/redis_runtime.py - Telemetry history
apps/api/app/core/postgres_runtime.py
Operations portal
- Digital Twin
apps/web/src/components/digital-twin-operations.tsx - Command centre
apps/web/src/components/command-center-dashboard.tsx - Band registry
apps/web/src/components/band-registry.tsx - Intervention console
apps/web/src/components/intervention-console.tsx - Alert lifecycle
apps/web/src/components/alert-feed.tsx - Analytics views
apps/web/src/app/analytics/page.tsx - Web API routes
apps/web/src/app/api
Other components
- Safety operator
- WebSocket clients
Connections 31
- Safety bands → Telemetry simulators: simulated by
- CCTV analytics → Telemetry simulators: simulated by
- Gate events → Telemetry simulators: simulated by
- Telemetry simulators → Hardware ingestion: posts observations
services/runtime.py - Hardware ingestion → Risk schemas: validates with
apps/api/app/api/hardware.py - Hardware ingestion → Live state and pub/sub: publishes live state
apps/api/app/api/hardware.py - Hardware ingestion → Telemetry history: records history
apps/api/app/api/hardware.py - ML endpoints → Crowd-risk model: requests predictions
apps/api/app/api/ml.py - Crowd-risk model → Feature contract: encodes observations
apps/api/app/ml/model.py - Crowd-risk model → Risk schemas: uses contracts
apps/api/app/ml/model.py - Scenario simulation → Crowd-risk model: scores zones
apps/api/app/api/simulation.py - Scenario simulation → Zone risk fusion: fuses risk engines
apps/api/app/api/simulation.py - Scenario simulation → Live state and pub/sub: shares simulation state
apps/api/app/api/simulation.py - Realtime stream → Live state and pub/sub: streams events
- System health → Live state and pub/sub: checks runtime
apps/api/app/api/system.py - System health → Telemetry history: checks history
apps/api/app/api/system.py - System health → Crowd-risk model: checks readiness
apps/api/app/api/system.py - Safety operator → Command centre: monitors operations
- Safety operator → Digital Twin: inspects venue
- Safety operator → Band registry: searches bands
- Safety operator → Alert lifecycle: triages alerts
- Safety operator → Intervention console: authorizes actions
- Safety operator → Analytics views: reviews metrics
- Live state and pub/sub → WebSocket clients: fans out events
- WebSocket clients → Digital Twin: updates live view
- Digital Twin → Web API routes: requests twin data
- Web API routes → Scenario simulation: controls scenarios
- Web API routes → ML endpoints: requests risk
- Web API routes → Hardware ingestion: submits observations
- Human-risk workflow → Command centre: supports risk workflow
- Intervention console → Scenario simulation: verifies projection