# One Record

> How a small API, written so nobody had to retype data, became the platform where the biggest names in freight track their shipments.

- 2021 · Freight · Shipment tracking
- Stack: NestJS, Nx, Azure
- Page: https://anthonyarjona.com/work/one-record

## In short

- **The problem**: Shipments retyped from one office to another, then tracking that required a different link for every warehouse.
- **My role**: I built the first version, then took the lead of the team that grew it and rewrote it.
- **The decisions**: One platform for every warehouse; A rewrite in TypeScript, one language from front to back; A read model, guided by monitoring
- **The outcome**: More than 2.5 million shipments processed, more than 340 client companies and an API 14 times faster.

## In the beginning, copy and paste

The story starts with a chore nobody liked. Some of our clients handle sea freight and use our software on both sides of the Atlantic, but each office lives on its own database, so a shipment entered at one end had to be retyped at the other. In 2021, the whole web team was the two of us, a teammate who had joined a month after me and myself, when we were asked whether we could build an API. We said yes. I knew Symfony and API Platform well, the first version ran within weeks, and two months later it was carrying real data in production.

## Ten tabs, then one

The real turning point came with WFS, the world’s largest independent air cargo handler, present at nearly 200 airports. We already had a tracking tool, but it thought warehouse by warehouse, with a different link for each. For a forwarder working with ten airports, that meant ten addresses, ten logins and as many open tabs. So we turned our small API into a platform that brings every warehouse together. Now a forwarder logs in once and sees each of its parcels, whether it is waiting at Roissy, Lyon or Marseille.

_Before: one tab per warehouse (CDG, ORY, LYS, MRS, NCE, TLS, BOD, NTE, LIL, SXB). After: a single One Record tab listing every parcel._

## Rewriting it to last

An API that grows fast always ends up showing its seams. API Platform had saved us precious time, but it encouraged us to expose our tables as they were, so every change to the database risked breaking our clients. Getting out of that would have meant working around it and losing a good part of what makes it strong. At the same time, management wanted to bring the whole thick-client ecosystem to the web. So we rewrote the platform in TypeScript with NestJS, one language from front to back, so the teams coming from thick clients would only have one technology to learn.

| V1 · Symfony, API Platform | V2 · NestJS, TypeScript |
| --- | --- |
| An API mirroring the tables, almost one to one | Rethought tables and isolated business rules |
| Heavy reads hard to optimise | Control over every query |
| Two languages between the API and the interface | One, from front to back |
| Few tests | Many more tests |

## When monitoring spoke up

In 2025, we plugged much finer monitoring into Grafana, and the alerts themselves came looking for us. Following the thread, the culprit was easy to find, since most of the traffic went through a single endpoint, the one listing shipments, hit thousands of times a day. Every call rebuilt the list from a dozen tables. Drawing on what we were learning on Malta Warehouse, we prepared a table cut to be read in one go, then proved it on staging and in production before routing a single read to it.

- Before: 560 ms
- After: 38 ms

## And today

The small API of the early days has processed more than 2.5 million shipments, and more than 340 companies have an account on it, among them several of the largest forwarders in the world. It also saw the team grow, since our first habits, from managing code to tickets and reviews, were forged alongside it.

- **2.5M** shipments processed

## What I would do differently

I do not disown the first version, it is what taught us our trade. But I would never again let the database draw the API. We had exposed our tables almost as they were, and every change to the product then ran into that choice, made without thinking. Today, I would start by understanding the business, its rules and its invariants, before writing a single route.
