Groute — Fleet Management SaaS
Architecting a real-time GPS telemetry platform from zero to production — frontend, backend, ingestion pipeline, and the infrastructure it all runs on.
Real-time fleet tracking at a volume databases hate
Fleet operators need to see every vehicle, live, on a map — and query weeks of history instantly. A naive CRUD backend collapses under that write volume: thousands of GPS pings per minute, every minute, forever.
The challenge was to build a system that ingests a relentless telemetry firehose while staying cheap enough for a bootstrapped startup to run on a single VPS.
Decouple ingestion from everything else
Instead of letting devices write straight to the database, a lightweight Bun service accepts raw telemetry and pushes it onto a Redis queue. Ingestion never blocks; the queue absorbs bursts.
A consumer drains the queue in batches into TimescaleDB hypertables — time-series storage built exactly for this access pattern. The NestJS API and React dashboard read from it without ever competing with the write path.
1// ingest.ts — hot path stays tiny 2Bun.serve({ 3 port: 7070, 4 async fetch(req) { 5 const ping = await req.json(); 6 await redis.lpush('gps:queue', pack(ping)); 7 return new Response('ok'); // ~1ms, no DB touch 8 }, 9});10 11// consumer drains in batches → TimescaleDB12const batch = await redis.rpop('gps:queue', 500);13await db.copyInto('telemetry', batch); Four services, one VPS, behind Cloudflare
Each piece runs as its own service on its own subdomain: the React dashboard, the NestJS API, the Bun ingestion endpoint, and the data layer (Redis + TimescaleDB).
Cloudflare fronts everything — TLS, caching, and a WAF shielding the ingestion endpoint from junk traffic. The whole system deploys to a single hardened VPS.
A telemetry pipeline that shrugs at load
The system sustains thousands of events per minute with headroom to spare, on hardware that costs less per month than a tank of fuel. Live tracking feels instant; historical queries over millions of rows return in milliseconds thanks to Timescale’s chunked storage.
Placeholder: add a customer quote, fleet count at launch, or revenue milestone here.