Welcome to the ERS (Emergency Response System) repository. This project is an AI-Enabled Emergency Response and Alert Management System designed for Integrated Disaster and Crisis Response.
The ERS (Emergency Ops Unit) is structured to establish an intelligent, AI-assisted multi-agency response system to handle emergency call volume, perform automated triage, smart dispatch, live tracking, and analytics, addressing the constraints of speed, coordination, and manual dependency in existing emergency infrastructures.
- AI-Enabled Incident Management: Classify, store, and prioritize emergency incidents incoming via multiple communication channels (voice calls, mobile apps, and IoT devices).
- Real-Time Command & Control: A shared system enabling seamless multi-agency interaction, reducing dispatch times, and enhancing situational awareness.
- GIS Mapping & Traffic Pre-emption: Integrate dynamic vehicle tracking and traffic light control to pre-empt and change routes, minimizing emergency response and hospital vehicular transfers (Green Corridors).
- NLP Automated Call-Processing: Real-time transcriptions, severity analysis, intent discovery, and intelligent dispatch routing.
- Performance Analytics: Evaluate metrics like call-to-dispatch time, travel time reduction, hospital diversion rate, and system availability.
- Frontend (Command Center): React.js / Next.js 14+ (App Router), Tailwind CSS, Zustand, Leaflet.js (GIS Mapping)
- Frontend (Responders): React Native (Mobile App Interface)
- Backend: Node.js (NestJS / Express), TypeScript
- Database: PostgreSQL (via Prisma ORM)
- Real-time Framework: Redis caching + Socket.io (WebSocket) for bi-directional live data
- AI / ML Models: Hugging Face / OpenAI for NLP, Logistic Regression / Random Forest for classification, Scikit-learn for time-series forecasting.
- Deployment: Docker, Docker Compose
To build a reliable emergency vehicle traffic pre-emption system, the following hardware components are utilized:
- Central Processing & Communication Unit: ESP32-S3 + LoRa + GPS + OLED Development Board (Primary controller mounted in the emergency vehicle).
- High-Accuracy Vehicle Positioning: PA1010D GNSS GPS Module (For accurate real-time position of the emergency vehicle).
- Vehicle-to-Intersection Communication: LoRa 915 MHz SX1276 Transceiver (Long-range, low-power data transmission bypassing cellular dependencies).
- Traffic-Side Vehicle Detection Sensor: IoT Radar Module XM122 (Radar-based sensor at intersections to reliably detect approaching vehicles).
Utilizes NLP models for voice-to-text transcription and severity extraction. Machine learning prioritizes incidents and generates intelligent dispatch recommendations.
- Endpoint:
/api/dispatch/generate– AI dispatch recommendation
Real-time integration of Google Maps API and OpenWeather. Tracks vehicles, calculates optimal routes, and provides command visibility of incidents and hospital capacity.
- Endpoint:
/api/vehicles/route– Route optimization - Endpoint:
/api/weather/alerts– Weather-based prediction
Hardware-integrated LoRa communication allows emergency vehicles to securely communicate with traffic intersections to trigger green lights, ensuring rapid response times without manual intervention.
WebSocket-based event streaming ensures that all dispatchers, traffic control units, and hospital administrators view live incident metrics, statuses, and locations simultaneously.
- Endpoint:
/api/dashboard/metrics– Live statistics - Endpoint:
/api/incidents– Incident CRUD
Since the platform utilizes a Monorepo architecture with a Node.js backend and Next.js frontend, follow these steps to run the system locally.
- Node.js (v18+)
- Docker & Docker Compose
- PostgreSQL database
npm installUpdate the .env files in both the apps/api and apps/web directories with your database URLs, API keys (Twilio, Google Maps, OpenWeather), and JWT secrets.
Push the Prisma schemas to your PostgreSQL database and seed the initial roles/users:
cd apps/api
npx prisma db push --accept-data-loss
npm run prisma:seedStart the Backend API (runs on http://localhost:3001):
cd apps/api
npm run dev:apiStart the Frontend Command Center (runs on http://localhost:3000):
cd apps/web
npm run dev:webThe repository is optimized for scalable deployment. To deploy the entire platform to a production server with containerized frontend and backend services:
docker-compose up -d --buildEnd-to-end testing is conducted using Postman and Locust, with Grafana for performance monitoring. The system is designed to maintain high API availability and event reliability via WebSocket failover recovery.
This project aligns with the vision of Digital India and Atmanirbhar Bharat, assisting in the modernization of the emergency infrastructure across the country.