~/projects/groute $ cat case-study.md
CASE STUDY — 01

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.

Co-Founder & Lead Engineer 2026 — Present
ReactNestJSBunRedisTimescaleDBCloudflare
01 — The Problem

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.

bash
$ tracker status --fleet all
142 vehicles online
168 events/sec incoming
ERROR: postgres write queue saturated
retrying… retrying… dropped 1,204 events
02 — The Approach

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.

ts
 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);
03 — The Architecture

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.

GPS Devices Cloudflare Bun Ingest Redis Queue TimescaleDB NestJS API React Dashboard
04 — The Results

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.

0+
GPS events / min ingested
0.9%
uptime since launch
0ms
p95 dashboard latency
0
engineer, full stack
05 — Live View

Watch the pipeline breathe