# Malta Warehouse

> Replacing the software that has run air cargo warehouses for more than twenty years, without ever stopping operations.

- 2026 · Air cargo · Warehouse
- Stack: TypeScript, NestJS, Kubernetes, Turborepo
- Page: https://anthonyarjona.com/work/malta

## In short

- **The problem**: A business system more than twenty years old, installed warehouse by warehouse, holding all the operational knowledge.
- **My role**: I led the team and the architecture, from the business analysis down to the cluster running the platform.
- **The decisions**: Understand the old software before writing a line; One codebase for every warehouse; What ships to production is exactly what was tested
- **The outcome**: A platform in production, six to twelve releases a day, and some 6,400 tests to keep them calm.

## Twenty years of a trade in one piece of software

In an air cargo warehouse, everything goes through the software. Every parcel is received, screened, stored, picked, presented to customs and billed, and for more than twenty years the same system had run it all. It had been through several eras, and the knowledge of the trade had ended up living in its code more than in any document. Replacing it was therefore not about writing one more application, but about taking over an entire trade without the warehouses stopping for a single day.

| The legacy system | Malta Warehouse |
| --- | --- |
| A thick client installed in each warehouse | One web platform shared by every warehouse |
| The trade buried in the code | The trade modelled in 29 contexts |
| The office only | The office, the docks and label printing |

## Understanding before writing

Rewriting a trade you have not understood means copying its flaws into newer technology. Before the first line of code, the team spent a month and a half inside the old software, in twos and threes, screen by screen. From that analysis came the business contexts of the platform, each with its domain, its use cases and its own rules, and boundaries checked by the linter rather than left to everyone’s goodwill.

A business context

```
export/
  domain/        entities, rules, invariants
  application/   use cases
  CLAUDE.md      the rules of this context
# 29 contexts, boundaries checked by the linter
```

## Taking over twenty years of data

Twenty years of data still had to move from one world to the other, losing nothing and damaging nothing. Rather than one big migration in a single move, we split it into three steps, so the old database is read only once and every load can be replayed as many times as needed.

1. **Extract**: The old database is read once, without transforming anything, and copied as is.
2. **Qualify**: A qualification report is reviewed and approved by the business before any load.
3. **Load**: Loading replays at will, without ever touching the source again.

## What ships is what was tested

Shipping often only makes sense if every delivery is safe. Every change therefore goes through a full safety net, then the image built for acceptance is exactly the one that ships to production, never rebuilt in between. That safety net is what lets the team ship several times a day without flinching.

1. **Check**: Lint, types, unit, end-to-end and integration tests, tested migrations.
2. **Accept**: The image is built once, then deployed to staging.
3. **Promote**: The same image goes to production, through a pull request.

## And today

The platform is in production and runs on the Kubernetes cluster we built and operate. Pair programming is part of how we work, every architecture decision leaves an ADR, and this is the project on which we built our agent orchestrator.

- **6–12** production releases a day

## What I would do differently

Fourteen months separated the first hosted version from the first version in use, because every MVP module had to ship together before launch. That is long, and it is as much time without real usage feedback.

Today, I would ship a single module, all the way. A small bridge would write to both the old database and the new one, the old software would go read-only on that scope, and we would replace the rest module by module. That is the Strangler Fig pattern, and users would have had real feedback in the first months, and so would we.
