DEV Community

Ivan Annovazzi
Ivan Annovazzi

Posted on

Simulate a Moving Fleet on Real Roads Before You Have a Single Real Vehicle

You're building a fleet management dashboard. You need GPS positions updating in real time, vehicles following actual road networks, realistic speed changes through intersections, and enough concurrent units to stress-test your WebSocket layer. The problem: you don't have a fleet.

Mocking this properly is harder than it sounds. Static fixtures go stale the moment your UI needs live movement. Random coordinate walks ignore roads entirely. Hand-rolling a simulator burns days you don't have.

Moveet solves this. It's an open-source, real-time vehicle fleet simulator that runs on actual road networks and streams GPS positions, routes, and traffic data over WebSockets.


What It Actually Does

Moveet ingests a GeoJSON road graph (OpenStreetMap-derived or your own), builds a bidirectional weighted graph from it, and runs a fleet of simulated vehicles across it continuously.

Each vehicle:

  • Finds routes using A* pathfinding with a haversine heuristic
  • Applies a realistic motion model - acceleration on straights, deceleration into turns
  • Emits position updates over WebSocket as it moves

On top of that, Moveet derives heat zones from high-connectivity intersections in the road graph, giving you traffic-density regions that behave like real congestion patterns.

There's also a built-in operator UI - a React + D3 renderer that draws routes directly onto SVG without touching Leaflet, Mapbox, or any tile provider. No API keys, no external dependencies.


Architecture in Three Layers

apps/ui          (React + D3 route renderer)
     |  REST + WebSocket
     v
apps/simulator   (simulation engine - road graph, A*, motion model)
     |  GET /vehicles, POST /sync
     v
apps/adapter     (optional bridge to external fleet APIs)
     |  GraphQL + Kafka / Redpanda
     v
Your app or local dev stack
Enter fullscreen mode Exit fullscreen mode

The simulator is the core. The adapter is optional - use it when you need to sync simulated vehicle state into an external fleet management API.


Up and Running in One Command

curl -O https://raw.githubusercontent.com/ivannovazzi/moveet/main/docker-compose.ghcr.yml
docker compose -f docker-compose.ghcr.yml up
Enter fullscreen mode Exit fullscreen mode

Open http://localhost:5012. You'll have a live fleet moving across a road network, streaming positions in real time.

No local Node setup, no dependency resolution, no config files to wrangle before you see something move.


Plug In Your Own Data Sources and Sinks

Moveet's plugin architecture is where it gets genuinely flexible for CI and staging environments.

Sources control where vehicle and road data come from:

Plugin Use case
Static Local GeoJSON files, great for deterministic CI runs
GraphQL Pull live road data from your own API
REST Any HTTP endpoint that returns road/vehicle data
MySQL / PostgreSQL Seed directly from your existing database

Sinks control where simulated positions go:

Plugin Use case
Console Quick local debugging
REST / GraphQL Push to your backend during integration tests
Kafka Stream into your existing event pipeline
Redis Pub/sub for downstream consumers
Webhook Fire-and-forget to any HTTP listener

This means you can wire Moveet directly into your staging stack and have your actual application code consume simulated vehicle events - same path as production, simulated data.


The Stack

TypeScript throughout (ES2022), Node.js + Express + ws on the server, React 19 + D3 v7 + Vite on the client, Turf.js for geospatial math, Vitest for testing, Turborepo for the monorepo build. Docker Compose for deployment.


When to Use It

  • Local development - realistic moving data without a staging environment dependency
  • Integration testing - deterministic scenarios via static source plugin, repeatable in CI
  • Load testing - scale vehicle count to stress-test your WebSocket handling
  • Demo environments - show a live-looking dashboard without exposing real fleet data

Get Involved

The project is on GitHub at github.com/ivannovazzi/moveet. It's early-stage and actively developed.

If you're building anything in the fleet space and have spent time wrestling with test data, take it for a spin. Issues, PRs, and feedback welcome.

Top comments (0)