An AI system that helps Bengaluru Traffic Police find and fix traffic jams caused by illegal parking.
Live Demo: https://dispatchmind-production.up.railway.app/
Bengaluru loses thousands of hours every day because illegal parking blocks roads and creates traffic jams. DispatchMind watches parking violations across the city, figures out which ones are causing the worst gridlock, and tells officers exactly where to send tow trucks.
Think of it as a traffic doctor — it diagnoses the problem, explains why it matters, and prescribes the fix.
- Watches cameras and reports — collects parking violation data from traffic cameras and citizen reports
- Ranks problem spots — not all parking violations are equal. Some block a lane on a busy road during rush hour. Others are harmless. DispatchMind ranks them by actual impact
- Predicts where jams will spread — if one junction gets blocked, nearby junctions often follow. The system spots these patterns before they happen
- Sends tow trucks efficiently — calculates the best route for tow trucks to clear multiple violations in one trip
- Builds court evidence — automatically generates paperwork with the right legal sections for court cases
- Learns from officers — feedback from field officers improves the system over time
| Role | What They See |
|---|---|
| ACP (Command) | Big-picture view of the whole city, strategic decisions |
| Inspector | Beat-level monitoring, performance tracking |
| Constable (Field) | Mobile-friendly view of priority violations near them |
| Flipkart Scout | Delivery partners report violations they spot while working |
- Parking violations come in from cameras, officers, and Flipkart delivery partners
- The system calculates how much each violation blocks traffic (road width, time of day, nearby junctions)
- AI models predict which violations will cause the biggest problems
- Officers get a ranked list and optimized tow truck routes
- Evidence packets are auto-generated for court
dispatch_mind/
├── backend/ API server and database
├── src/ Analytics and prediction engine
├── frontend/ Web dashboard (20+ screens)
├── config/ Settings and thresholds
├── scripts/ Helper tools
└── Dockerfile For deployment
Visit the live demo: https://dispatchmind-production.up.railway.app/
Easy way (Windows): Double-click start.bat
Docker way:
docker build -t dispatchmind .
docker run -p 8000:8000 --env-file .env dispatchmindManual way:
# Backend
pip install -r requirements.txt
uvicorn backend.api:app --reload --port 8000
# Frontend (in a second terminal)
cd frontend
npm install
npm run devClick to expand — for developers
| Layer | What We Used |
|---|---|
| Backend | Python, FastAPI, SQLAlchemy |
| ML/Analytics | XGBoost, LightGBM, SHAP, SciPy, Google OR-Tools |
| Frontend | React, Vite, Tailwind CSS, Leaflet maps |
| Database | SQLite (local), PostgreSQL (production) |
| Deployment | Docker, Railway, Render, Vercel |
| Stage | What It Does |
|---|---|
| 1. Data Loading | Parses raw CSV/JSON, estimates violation duration |
| 2. Congestion Scoring | Calculates how much each violation blocks traffic |
| 3. Traffic Simulation | Physics-based model of traffic flow |
| 4. Prediction | ML models predict future congestion |
| 5. Dispatch Routing | Optimizes tow truck routes |
| 6. Zone Analysis | Finds chronic problem areas |
| 7. Spillover Detection | Spots hidden congestion from nearby landmarks |
| 8. Capacity Loss | Measures exact % of road capacity lost |
| 9. Explainability | Shows WHY a junction ranks high |
| 10. Causal Proof | Proves parking causes congestion (not just correlation) |
| 11. Evidence Generation | Builds court-ready documentation |
- Role-based authentication (ACP, Inspector, Constable, Scout)
- Rate limiting and request tracing
- Prometheus monitoring endpoint
- Real-time violation ingestion
- 30+ REST endpoints
Dashboard, Map View, Priority Queue, Cascade Visualization, Dispatch Plan, Command Center, Early Warning, Inspector Dashboard, Capacity Board, Evidence View, Simulator, AI Copilot, Scout Leaderboard, and more.
violations— core records with impact scorescamera_junctions— camera status trackingflipkart_reports— citizen/delivery partner reportsusers— multi-role accountsuser_sessions— login sessions
Copy .env.example to .env. Works out of the box in Local Dispatch Mode (no API keys needed).
python scripts/reset_demo.pyClears test data and resets cameras to a clean state.
Gridlock 2.0 Hackathon — Bengaluru Traffic Police