Skip to content

itsofcurs/ERS

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ERS: Emergency Response System (Emergency Ops Unit)

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.


🎯 Project Objectives

  1. AI-Enabled Incident Management: Classify, store, and prioritize emergency incidents incoming via multiple communication channels (voice calls, mobile apps, and IoT devices).
  2. Real-Time Command & Control: A shared system enabling seamless multi-agency interaction, reducing dispatch times, and enhancing situational awareness.
  3. 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).
  4. NLP Automated Call-Processing: Real-time transcriptions, severity analysis, intent discovery, and intelligent dispatch routing.
  5. Performance Analytics: Evaluate metrics like call-to-dispatch time, travel time reduction, hospital diversion rate, and system availability.

🏗️ Technical Stack & System Architecture

Software Architecture

  • 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

Hardware & Sensor Integration (IoT)

To build a reliable emergency vehicle traffic pre-emption system, the following hardware components are utilized:

  1. Central Processing & Communication Unit: ESP32-S3 + LoRa + GPS + OLED Development Board (Primary controller mounted in the emergency vehicle).
  2. High-Accuracy Vehicle Positioning: PA1010D GNSS GPS Module (For accurate real-time position of the emergency vehicle).
  3. Vehicle-to-Intersection Communication: LoRa 915 MHz SX1276 Transceiver (Long-range, low-power data transmission bypassing cellular dependencies).
  4. Traffic-Side Vehicle Detection Sensor: IoT Radar Module XM122 (Radar-based sensor at intersections to reliably detect approaching vehicles).

🧠 Core Features & API Modules

1. AI-Assisted Call Triage & Dispatch

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

2. GIS Mapping & Dynamic Routing

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

3. Traffic Signal Pre-emption (Green Corridors)

Hardware-integrated LoRa communication allows emergency vehicles to securely communicate with traffic intersections to trigger green lights, ensuring rapid response times without manual intervention.

4. Real-Time Command Center Dashboard

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

🚀 Local Development Setup & Execution

Since the platform utilizes a Monorepo architecture with a Node.js backend and Next.js frontend, follow these steps to run the system locally.

Prerequisites

  • Node.js (v18+)
  • Docker & Docker Compose
  • PostgreSQL database

1. Install Dependencies

npm install

2. Environment Configuration

Update 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.

3. Database Setup (Prisma)

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:seed

4. Start the Application Servers

Start the Backend API (runs on http://localhost:3001):

cd apps/api
npm run dev:api

Start the Frontend Command Center (runs on http://localhost:3000):

cd apps/web
npm run dev:web

🐳 Production Deployment (Docker)

The 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 --build

🛠️ Performance Monitoring & Testing

End-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.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages