Skip to content

Latest commit

 

History

107 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

NOVA - Intelligent Traffic Management & Ambulance Dashboard

NOVA is a comprehensive system designed to revolutionize urban traffic management and emergency vehicle routing. It features a real-time dashboard analytics, machine learning integration for traffic analysis, and a dedicated emergency dispatch platform connecting civilians with rapid ambulance deployment.

Key Features

  • Traffic Simulation World: A fully interactive 3D traffic simulation built with Three.js, featuring a 3x3 intersection grid, dynamic road networks with lane management, and a robust traffic signal system.
  • Civilian Emergency Platform ('People' Role): A mobile-first interface allowing citizens to request ambulances, select pickup/destination hospitals, and track the dispatched ambulance's arrival via a live timeline.
  • Ambulance Dispatch Dashboard: A dedicated operator dashboard for ambulance drivers to receive incoming civilian requests, view live ETAs, and trigger "Green Corridor" activations for prioritized traffic clearing.
  • Automated Dispatch Lifecycle: Full request management (Pending → Accepted → En Route → Completed) with real-time state synchronization across all connected devices using Socket.IO.
  • Admin Notifications: Automated mission reports and email notifications sent to administrators upon emergency request generation and mission completion.
  • Mobile & Cross-Device Connectivity: Dynamic API configuration allows the platform to be fully functional across multiple devices simultaneously. You can operate the civilian dashboard on your mobile phone while managing the ambulance dashboard on your PC.
  • System States Architecture: Robust backend mode manager supporting different states: AI_MODE, EMERGENCY_MODE, and MANUAL_OVERRIDE_MODE.
  • Machine Learning Integration: A dedicated ML service using YOLOv8 for intelligent traffic detection and analysis.

Emergency Dispatch Flow

  1. Civilian Request: A user (logged in as People) submits an emergency request from their mobile device. The Admin receives an automated email notification.
  2. Real-time Dispatch: The Ambulance dashboard immediately displays a floating request card with the patient's details and required route.
  3. Auto-Routing: Upon accepting, the system uses OSRM to automatically plot the optimal route from the pickup location to the hospital.
  4. Live Tracking: As the ambulance starts the mission, the civilian's dashboard updates its status tracker (En Route), and the NOVA traffic system overrides signals to clear the path.
  5. Completion: Upon arrival, the civilian is notified in real-time, and mission analytics (time taken, signals cleared, time saved) are accurately generated and logged.

Project Structure

NOVA is divided into three primary services:

1. Frontend (/frontend)

The user interface, 3D simulation environment, and mobile dashboards.

  • Tech Stack: React 19, Vite, Tailwind CSS, Three.js, React-Leaflet, Recharts, Socket.IO Client.
  • Highlights: Features the City View (3D simulation), settings dashboard, live ambulance tracking, civilian request workflows, and a responsive UI natively configured for cross-device mobile access.

2. Backend (/backend)

The core server handling business logic, user authentication, request lifecycles, and simulation state.

  • Tech Stack: Node.js, Express, MongoDB (Mongoose), Socket.IO, JWT, Nodemailer.
  • Highlights: Manages the ModeManager service, coordinates simulation data, processes routing requests, manages the Civilian ↔ Ambulance real-time dispatch state, and handles async email alerts.

3. ML Service (/ml-service)

The machine learning component responsible for analyzing traffic camera feeds.

  • Tech Stack: Python, YOLOv8.
  • Highlights: Implements object detection to inform the AI about traffic density and vehicle presence, acting dynamically during AI_MODE.

Prerequisites

To run the NOVA system locally, make sure you have the following installed:

  • Node.js (v18 or higher recommended)
  • Python (v3.8 or higher)
  • MongoDB

Getting Started

1. Clone the repository

git clone <repository-url>
cd NOVA

2. Setting up the Backend

cd backend
npm install

# Create a .env file with the following configurations:
# PORT=5000
# MONGO_URI=your_mongo_uri
# JWT_SECRET=your_jwt_secret
# EMAIL_USER=your_email@example.com
# EMAIL_PASS=your_app_password
# ADMIN_EMAIL=admin_email@example.com
# EMAIL_HOST=smtp.gmail.com
# EMAIL_PORT=587

npm run dev

3. Setting up the Frontend

cd frontend
npm install
npm run dev

4. Setting up the ML Service

cd ml-service
pip install -r requirements.txt
python app.py

5. Accessing on Mobile Phone

  1. Ensure your computer and mobile device are on the same Wi-Fi network.
  2. Find your computer's local IPv4 address (e.g., run ipconfig on Windows or ifconfig on Mac/Linux).
  3. If necessary, allow ports 5173 and 5000 through your computer's Firewall (e.g. Windows Defender Firewall -> Inbound Rules).
  4. On your mobile browser, navigate to http://<YOUR_IP>:5173 and login as a People user to test the Civilian interface.

Contributing

Contributors are welcome to help enhance the simulation, refine algorithms, or add new UI capabilities to the dashboard.

Images

image image image

Ambulance Dashboard: image image

About

NOVA is a comprehensive system designed to revolutionize urban traffic management and emergency vehicle routing.

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages