Smart City · Simulation

MetroMind.

A full-stack smart-city dashboard that combines live map visualisation with real-time traffic simulation. Block road segments, spawn vehicles, and watch AI rerouting respond to congestion — on actual city road networks.

Real OSMActual city road network data
LiveReal-time vehicle simulation
AIDynamic rerouting with Dijkstra
DockerFully containerised stack

Traffic simulation on real roads.

Most traffic simulations use synthetic grids. MetroMind uses real OpenStreetMap road data — meaning you're simulating on actual streets, intersections, and road hierarchies of any city you choose.

The system lets you interactively block road segments to model real-world scenarios — accidents, roadworks, closures — and observe in real time how vehicles respond, reroute, and where congestion builds up.

Frontend
ReactLeaflet.jsJavaScriptCSS
Backend
PythonFastAPIWebSocket
AI / Data
OSMnxNetworkXDijkstraOpenStreetMap
Infra
DockerREST APIGeoJSON

From map data to moving vehicles

01

Load City Map

The dashboard fetches real road network data from OpenStreetMap using OSMnx and renders it as an interactive Leaflet map.

02

Block Road Segments

Users click on any road segment to mark it as blocked — simulating accidents, construction, or closures on real city roads.

03

Run Simulation

Vehicles are spawned at random nodes and attempt to navigate the network. The backend runs pathfinding in real time.

04

Rerouting & Congestion

When a vehicle hits a blocked segment, the AI reroutes it using Dijkstra's algorithm — finding the next shortest path dynamically.

05

Live Visualisation

Vehicle movement, rerouting events, and congestion hotspots are streamed to the frontend and animated on the map in real time.

See it in action.

Watch vehicles navigate, reroute around blocked segments, and congestion form on a live city map.

Full-stack, end-to-end.

  • Built the FastAPI backend with WebSocket support for real-time vehicle state streaming
  • Integrated OSMnx to fetch and process real OpenStreetMap road network graphs
  • Implemented Dijkstra's algorithm for shortest-path routing and dynamic rerouting
  • Designed the React + Leaflet frontend for interactive map and simulation controls
  • Built the road-blocking UI — click any segment to toggle closed/open
  • Containerised the full stack with Docker for reproducible local and cloud deployment
  • Created GeoJSON data pipeline to convert OSM graph edges to renderable map layers

Explore the code.