An intelligent emergency vehicle routing & traffic management platform for Chennai, India.
- Routes follow real Chennai road network via OSRM API
- Multiple alternative routes with exact kilometer distances
- Traffic-aware ETA calculations
- Fallback routing when OSRM is unavailable
- Composite scoring: distance + traffic + bed availability + wait time
- Auto-recommends best hospital for each emergency
- Manual override for drivers
- Real-time bed availability tracking (ICU + Emergency)
- Time-of-day traffic patterns (rush hour simulation)
- Dynamic hospital bed updates
- Traffic signal preemption (auto-green within 500m)
- Vehicle alert system for clearing ambulance paths
- Dark-themed, responsive UI
- 4-tab sidebar: Units | Hospitals | Routes | Alerts
- Color-coded routes (Green/Yellow/Red for traffic)
- Animated ambulance markers with pulse effects
- Real-time stats in topbar
┌──────────────────────────────────────┐
│ Frontend (HTML/JS) │
│ Leaflet Map + Simulation Engine │
├──────────────────────────────────────┤
│ FastAPI Backend (Python) │
│ OSRM Routing + Hospital Selection │
│ WebSocket Broadcast + Simulation │
├──────────────────────────────────────┤
│ PostgreSQL + Redis (Docker) │
└──────────────────────────────────────┘
# Install Python dependencies
pip install -r backend/requirements.txt
# Run the server
python backend/app.py
# Open http://localhost:3000
# Login: admin / admin123docker-compose up -d
# Open http://localhost:80| Endpoint | Method | Description |
|---|---|---|
/api/auth/login |
POST | JWT authentication |
/api/hospitals |
GET | All hospitals with bed data |
/api/hospitals/select |
GET | Smart hospital ranking |
/api/route/calculate |
POST | OSRM routing with alternatives |
/api/ambulances |
GET | Active ambulance positions |
/api/traffic/live |
GET | Live traffic data |
/api/simulation/dispatch |
POST | Dispatch new emergency |
/ws |
WebSocket | Real-time state broadcast |
LIFELANE/
├── backend/
│ ├── app.py # FastAPI server + simulation
│ └── requirements.txt # Python dependencies
├── frontend/
│ ├── index.html # Dashboard (backend-connected)
│ └── login.html # Login page
├── public/
│ └── index.html # Standalone demo (Vercel)
├── database/ # PostgreSQL schema
├── nginx/ # Reverse proxy config
├── docker-compose.yml # Full stack deployment
├── vercel.json # Vercel config
└── README.md
- Frontend: HTML5, CSS3, JavaScript, Leaflet.js
- Backend: Python 3.13, FastAPI, Uvicorn
- Routing: OSRM (Open Source Routing Machine)
- Real-time: WebSockets
- Auth: JWT (python-jose)
- Database: PostgreSQL 15 + Redis 7
- Deploy: Vercel (frontend) + Docker (backend)
Built for smart city emergency management in Chennai, India.
MIT License