How pragyaanand196/crisisbridgeai works
CrisisBridge AI is a disaster warning-to-action platform: authorities prepare and approve localized warnings, citizens receive and respond to them, and authorities triage assistance and monitor outcomes. The map also preserves the README’s distinct capabilities for zones, verification, analytics, and post-disaster audits. Backend router registration and selected imports are visible in the supplied sources; several feature-specific routes and services were not excerpted, so their internal call relationships are omitted or grounded only in README statements.
Main entry points: main.py FastAPI application · warnings.py Warning routes · AuthorityDashboard.jsx Authority console · api.js API client
Components 26
Web client
- Authority console
frontend/src/pages/AuthorityDashboard.jsx - Warning authoring
frontend/src/components/authority/WarningCreator.jsx - Human approval
frontend/src/components/authority/HumanApprovalModal.jsx - Citizen portal
frontend/src/pages/CitizenDashboard.jsx - API client
frontend/src/services/api.js - Live updates
frontend/src/context/WebSocketContext.jsx
Warning operations
- Warning routes
backend/app/routers/warnings.py - Response zones
backend/app/routers/zones.py - AI language tools
backend/app/services/ai_service.py - CAP serialization
backend/app/services/cap_service.py - Warning delivery
backend/app/services/notification_service.py
Citizen response
- Citizen feedback
backend/app/routers/citizen.py - Assistance triage
backend/app/routers/assistance.py - Incident reports
backend/app/routers/incidents.py
Verification and insight
- Information verification
backend/app/routers/verification.py - Operational analytics
backend/app/routers/analytics.py - Audit reports
backend/app/routers/reports.py
Platform services
- Geospatial matching
backend/app/services/geo_service.py - Authentication
backend/app/routers/auth.py - Identity and access
backend/app/services/auth_service.py - WebSocket endpoint
backend/app/routers/ws.py - Connection manager
backend/app/services/websocket_manager.py - Relational database
backend/app/database.py - FastAPI application
backend/app/main.py
Other components
- Authorities
- Citizens
Connections 38
- Authorities → Authority console: operate
- Authority console → Warning authoring: author
frontend/src/pages/AuthorityDashboard.jsx - Warning authoring → API client: submit via
frontend/src/components/authority/WarningCreator.jsx - API client → Warning routes: request
frontend/src/services/api.js - Warning routes → AI language tools: generate text
backend/app/routers/warnings.py - Warning routes → Geospatial matching: match locations
backend/app/routers/warnings.py - Warning routes → Warning delivery: deliver warning
backend/app/routers/warnings.py - Warning routes → CAP serialization: serialize alert
backend/app/routers/warnings.py - Warning routes → Relational database: persist records
backend/app/routers/warnings.py - Authority console → Human approval: review text
frontend/src/pages/AuthorityDashboard.jsx - Human approval → API client: approve via
frontend/src/components/authority/HumanApprovalModal.jsx - Citizens → Citizen portal: view warnings
- Citizen portal → API client: send response
- API client → Citizen feedback: request
frontend/src/services/api.js - API client → Assistance triage: request assistance
frontend/src/services/api.js - API client → Incident reports: submit reports
frontend/src/services/api.js - Authority console → Assistance triage: triage requests
- Authority console → Response zones: manage zones
- Authorities → Information verification: review claims
- Citizens → Information verification: submit claims
- Authority console → Operational analytics: monitor gaps
- Operational analytics → Audit reports: inform audit
- Authority console → Audit reports: review outcomes
- FastAPI application → Authentication: registers
backend/app/main.py - FastAPI application → Warning routes: registers
backend/app/main.py - FastAPI application → Response zones: registers
backend/app/main.py - FastAPI application → Citizen feedback: registers
backend/app/main.py - FastAPI application → Assistance triage: registers
backend/app/main.py - FastAPI application → Information verification: registers
backend/app/main.py - FastAPI application → Operational analytics: registers
backend/app/main.py - FastAPI application → Audit reports: registers
backend/app/main.py - FastAPI application → Incident reports: registers
backend/app/main.py - FastAPI application → WebSocket endpoint: registers
backend/app/main.py - Authentication → Identity and access: use identity
backend/app/routers/auth.py - Identity and access → Relational database: load user
backend/app/services/auth_service.py - Live updates → WebSocket endpoint: connect
frontend/src/context/WebSocketContext.jsx - WebSocket endpoint → Connection manager: manage connections
- Warning routes → Operational analytics: compute metrics
backend/app/routers/warnings.py