Backend API Development

Fleet Telematics API Platform on NestJS

A NestJS API platform that ingests 40 million vehicle events a day and serves partners, dashboards and mobile apps from one documented interface.

View live demo Opens a working demo with sample content in a new tab.
Vantage Telematics demo on desktop and phone

On location

  • Highway Road — Vantage Telematics
    Highway RoadPhoto: Negative Space (CC0)
  • Roads Highway — Vantage Telematics
    Roads HighwayPhoto: Matthew Henry (CC0)
  • Container Van — Vantage Telematics
    Container VanPhoto: Erwan Hesry (CC0)
  • White Van — Vantage Telematics
    White VanPhoto: Forrest Cavale (CC0)
  • Car Dashboard — Vantage Telematics
    Car DashboardPhoto: Freestocks.org (CC0)

About the Project

This case study covers a fleet telematics API platform built on NestJS for a vehicle telematics provider. Devices fitted across customers' fleets report positions, ignition events and trip data around the clock, and the provider's partners, dashboards and mobile apps all need that data quickly and reliably. Before the rebuild, each consumer had grown its own integration path, and bursts of device traffic could slow everything down.

We built one documented platform in front of the data. A Kafka-backed pipeline absorbs 40 million events a day with back-pressure, a versioned REST API answers with a p95 latency of 38 ms, signed webhooks push events to partners with retries and a delivery log, and every call is metered against an API key. Uptime over the first year was 99.99%, with rolling deployments several times a week.

About the Client

The client is a vehicle telematics provider supplying tracking hardware and data to fleet operators, insurers and software partners. Its customers range from small van fleets to partners who build entire products on top of its data.

Three engineering teams work on the platform. Before the rebuild, services had evolved separately, with different conventions for validation, errors and documentation, which made partner integrations slow and made it hard for engineers to move between services.

Project Goals

  • Ingest device events at high volume without slowing the public API.
  • Offer one versioned, well-documented REST API for partners, dashboards and apps.
  • Deliver events to partners through signed webhooks they can inspect and trust.
  • Attribute every call to an API key for billing and rate limiting.
  • Give all three teams one structure for building and deploying services.

Project Overview

The Challenge and Our Solution

The Challenge

The provider’s original Express backend had grown for six years without structure. Three teams added endpoints in three styles, there was no API documentation, and partners integrating with it needed weeks of support. Ingestion from 30,000 vehicles was hitting limits, and a single slow query could stall the whole process.

Our Solution

We rebuilt the backend as a set of NestJS services: an ingestion service consuming device events over MQTT and Kafka, a query API with versioned REST endpoints generated into OpenAPI documentation, a webhook service with retries and signing, and a billing service metering usage. Services share TypeScript types from one package. The old Express API was kept alive behind a gateway while partners migrated, then retired.

High-Volume Event Ingestion With Back-Pressure

Telematics traffic is bursty: devices reconnect together after a network outage, and morning start-up brings a wave of ignition events. Devices publish over MQTT, and events flow into Kafka, which acts as a shock absorber between the devices and everything else. Consumers process at their own pace, so a burst from the field never slows the public API.

Time-series data lands in PostgreSQL with TimescaleDB, which keeps queries over long position histories fast, while Redis serves the latest known state of each vehicle for the most frequent requests.

  • MQTT and Kafka pipeline with back-pressure
  • TimescaleDB for long position histories
  • Redis for the latest vehicle state

A Versioned Public API Documented From the Code

The public API is built with NestJS and TypeScript, with validation, pagination and error formats applied consistently across every endpoint. OpenAPI documentation is generated from the code itself, so the docs partners read always match the behaviour they get.

Versioning means partners can upgrade on their own timetable. Generated documentation cut partner integration time from weeks to days, because developers can explore endpoints, see example requests and responses and start building immediately.

Signed Webhooks Partners Can Trust

Many partners prefer to be told when something happens rather than polling for it. The platform sends events such as completed trips and geofence exits to partner endpoints as signed webhooks, with automatic retries when an endpoint is unavailable.

Each partner can inspect a delivery log showing what was sent, when, and with what response, which turns "we never received it" from a support ticket into something partners can check for themselves.

  • Signed payloads partners can verify
  • Automatic retries with back-off
  • Self-service delivery log for partners

Usage Metering and One Structure for Three Teams

Every API call is attributed to a key, which feeds billing and enforces rate limits fairly across customers. The provider can see which partners use which endpoints and plan capacity accordingly.

Just as important was the internal consistency. New endpoints follow one NestJS structure — modules, validation, logging, metrics — and services run in Docker on Kubernetes with rolling deployments. Any of the three teams can now work on any service, and releases ship several times a week without downtime.

Our Process

How We Delivered It

  1. Traffic and Integration Review

    We analysed device traffic patterns and interviewed partners about where existing integrations were slow or fragile.

  2. Platform Conventions

    A shared NestJS service template defined validation, errors, pagination, logging and OpenAPI generation for every team.

  3. Ingestion Pipeline

    MQTT, Kafka and TimescaleDB were set up and load-tested with replayed device traffic before the public API moved across.

  4. API, Webhooks and Metering

    Versioned endpoints, signed webhooks with delivery logs and per-key metering were built and opened to pilot partners first.

  5. Migration and Operations

    Consumers moved to the new API in stages, with Kubernetes rolling deployments and monitoring in place from the first day.

Key Features

What We Delivered

  • High-volume ingestion

    Kafka-backed pipeline with back-pressure, so a burst from devices never slows the public API.

  • Versioned public API

    REST endpoints with validation, pagination and OpenAPI docs generated from the code itself.

  • Signed webhooks

    Partners receive events with retries, signatures and a delivery log they can inspect.

  • Usage metering

    Every call attributed to an API key for billing and rate limiting.

Outcome

Results and Impact

  • 40 million events a day ingested with a p95 API latency of 38 ms.
  • Partner integration time cut from weeks to days thanks to generated documentation.
  • 99.99% uptime over the first year, with rolling deployments several times a week.
  • New endpoints follow one structure, so any of the three teams can work on any service.

Services

Services Behind This Project

The Docker & Kubernetes, NestJS expertise we used to build this backend api development — and can bring to yours.

  • Docker & Kubernetes

    Applications packaged in Docker, deployed with CI/CD, and run on Kubernetes when they need to scale — with monitoring, secrets and rollbacks built in.

  • NestJS Development

    Structured, testable Node.js backends with NestJS: REST and GraphQL APIs, microservices, queues and real-time services built to be maintained.

FAQ

Frequently Asked Questions

Why NestJS for an API platform?

NestJS gives TypeScript services a consistent structure — modules, dependency injection, validation and decorators that generate OpenAPI documentation. For a platform built by several teams, that consistency matters as much as raw performance, and NestJS performs well when paired with the right data stores and caching.

How does the platform cope with bursts of device data?

Devices publish into Kafka through MQTT, and Kafka buffers events so downstream consumers process at a steady pace. The public API reads from separate stores, so even a large reconnection burst from the field does not affect partners calling the API.

What makes a webhook "signed"?

Each payload carries a signature calculated with a secret shared between the platform and the partner. The partner recalculates it on receipt to confirm the event really came from the platform and was not altered. Retries and a delivery log complete the picture.

Can you add usage-based billing to an existing API?

Usually, yes. Metering is added at the gateway or middleware level, attributing each call to an API key and recording it for billing and rate limiting. The main work is agreeing what to count, how to price it and how customers will see their usage.

How do you achieve high uptime with frequent releases?

Services run on Kubernetes with rolling deployments, health checks and the ability to roll back quickly. Combined with automated tests and monitoring, that let this platform ship several times a week while maintaining 99.99% uptime over its first year.

What affects the cost of building an API platform like this?

Data volumes, the number of consumers and their needs, existing systems to migrate from, documentation and developer-portal requirements, and the operational setup all play a part. A review of current traffic and integrations is the best starting point for a realistic plan.

Similar Work

Related Projects

Case studies built with the same technologies or for similar needs.

  • Bricks Wall — Barrow Building Supplies
    • Node.js
    • NestJS
    • TypeScript

    API & ERP Integration

    ERP to Web Shop Integration

    A NestJS integration layer moving 312,000 messages a day between an ERP, a web shop and the accounts system.

  • Semi trucks line up to pick — Northline Freight
    • React
    • TypeScript
    • Node.js

    Web Application Development

    Freight Dispatch & Driver Tracking Platform

    A live dispatch board built in React and Node.js that replaced a spreadsheet-and-phone workflow for 120 drivers.

  • Containers Bins — Kellner Industrie
    • Java 21
    • Spring Boot
    • Spring Batch

    Enterprise Integration

    Warehouse Order Service & Event Integration

    A Spring Boot order service processing 9,600 orders a day across four warehouses, with event-driven stock sync.

  • Tools Workshop — Quotely
    • Ruby on Rails
    • Hotwire (Turbo & Stimulus)
    • PostgreSQL

    SaaS Product Development

    Field-Service Quoting SaaS

    A Rails MVP taken from idea to paying subscribers in ten weeks, with Stripe billing and Hotwire interactivity.

  • Antique Watch — Ridgemont Auctions
    • Elixir
    • Phoenix Channels
    • Go

    Real-Time Web Platform

    Live Auction Bidding Platform

    An Elixir and Go platform holding 11,000+ concurrent bidders per sale with bid latency measured in milliseconds.

  • Kestrel Wealth demo — home page
    • Next.js
    • React
    • TypeScript

    Headless CMS Website

    Wealth Management Insights Hub

    A Next.js front end over headless WordPress that took a compliance-heavy content library from slow to near-instant.

Let’s Connect

Want Results Like These?

Share your project details and our experts will get back to you within one business day with the best solution — free consultation, no obligation.