How lakshyakushwahaaiml2023-ops/crisora-ai works
Crisora AI is a multi-role disaster-management platform: citizens and officials use dashboards to monitor risk, report emergencies, and support response decisions. Backend services ingest weather, river, and seismic data, calculate regional risk, and expose authentication, event, SOS, AI, simulation, and broadcast capabilities. The README documents reporting, historical and Bhopal simulations, and multi-channel alerts. Sampled files establish ingestion and risk calculations; several UI and route details are represented from the README and source index rather than inspected source.
Main entry points: models Domain records · pages Role dashboards · routes API routes · ingestCron.js Ingestion scheduler
Components 24
User experience
- Role-based app
frontend/src/App.jsx - Session context
frontend/src/context/AuthContext.jsx - Role dashboards
frontend/src/pages - Maps and risk UI
frontend/src/components/Map - SOS reporting UI
frontend/src/components/SOSButton/SOSButton.jsx - AI assistance UI
frontend/src/pages/AIAssistantPage.jsx - Simulations and reports
frontend/src/pages
Backend API
- API routes
backend/src/routes - JWT authentication
backend/src/middleware/auth.js - AI agent
backend/src/services/aiAgent.js - SMS and voice broadcast
backend/src/routes/broadcast.js - Live updates
backend/src/server.js
Risk and ingestion
- Ingestion scheduler
backend/src/jobs/ingestCron.js - Weather ingestion
backend/src/services/ingestion/weatherService.js - River ingestion
backend/src/services/ingestion/riverGaugeService.js - Seismic ingestion
backend/src/services/ingestion/seismicService.js - Regional risk engine
backend/src/services/riskEngine.js
Persistence
- Domain records
backend/src/models - MongoDB
External services
- Groq AI
- Weather and flood APIs
- USGS earthquakes
- Twilio and Polly
Other components
- Citizens and officials
Connections 28
- Citizens and officials → Role-based app: use dashboards
frontend/src/App.jsx - Role-based app → Session context: provides session
frontend/src/App.jsx - Role-based app → Role dashboards: routes roles
frontend/src/App.jsx - Role dashboards → Maps and risk UI: show situational maps
README.md - Role dashboards → SOS reporting UI: trigger SOS
README.md - Role dashboards → AI assistance UI: open AI assistant
- Role dashboards → Simulations and reports: open analysis tools
frontend/src/App.jsx - Session context → API routes: verify session
- API routes → JWT authentication: protect endpoints
backend/src/routes/ai.js - API routes → AI agent: request assistance
backend/src/routes/ai.js - AI agent → Groq AI: generate guidance
README.md - Ingestion scheduler → Weather ingestion: fetch weather
backend/src/jobs/ingestCron.js - Ingestion scheduler → River ingestion: fetch river data
backend/src/jobs/ingestCron.js - Ingestion scheduler → Seismic ingestion: fetch earthquakes
backend/src/jobs/ingestCron.js - Weather ingestion → Weather and flood APIs: query observations
README.md - River ingestion → Weather and flood APIs: query river levels
backend/src/services/ingestion/riverGaugeService.js - Seismic ingestion → USGS earthquakes: query events
backend/src/services/ingestion/seismicService.js - Weather ingestion → Domain records: save readings
backend/src/services/ingestion/weatherService.js - River ingestion → Domain records: save readings
backend/src/services/ingestion/riverGaugeService.js - Seismic ingestion → Domain records: save readings
backend/src/services/ingestion/seismicService.js - Ingestion scheduler → Regional risk engine: recalculate risk
backend/src/jobs/ingestCron.js - Regional risk engine → Domain records: read readings and update regions
backend/src/services/riskEngine.js - API routes → Domain records: manage events and SOS
README.md - API routes → Live updates: dispatch live alerts
README.md - Regional risk engine → Live updates: emit risk updates
backend/src/services/riskEngine.js - SMS and voice broadcast → Groq AI: translate alerts
README.md - SMS and voice broadcast → Twilio and Polly: send SMS and calls
README.md - Domain records → MongoDB: persist records