Skip to content
Duc Tran

BBX Intra · 2026

A multi-tenant WMS, from the first commit

Per-warehouse API hosts resolved at runtime, access control derived from one route map, and a reusable KPI widget framework.

Company
BBX Intra GmbH
Period
Feb 2026 – Present
Role
Senior Front-end Engineer
Stack
React 19, TypeScript, TanStack Query, ECharts

Context

BBX Intra is a German consulting and software company for intralogistics and supply chain optimisation. Its product is a warehouse and logistics management platform that runs for several warehouses and is sold under several brands. In February 2026 I started its front-end from an empty repository and have been its main contributor since, with close to 600 commits.

The stack: React 19, TypeScript, Vite, MUI, TanStack Query, React Router v7 and ECharts.

One front-end, many warehouses

Each warehouse has its own API host, its own targets and its own users. Instead of a build per customer, the front-end resolves everything at runtime:

  • API host per warehouse. The warehouse in the URL decides, at runtime, which backend the app talks to.
  • Warehouse-aware routing. Users switch between warehouses seamlessly, inside one running app.
  • One route map. Routes, the navigation menu and access control are all derived from a single map. A page that a role cannot open is neither routed nor shown in the menu, and the same rule is applied to individual components.
/:warehouse/…URL · brand · sessionRoute mapsingle sourceAPI host resolverper warehouse, at runtimeRouter (v7)warehouse-awareNavigationderived menuAccess controlroute + component level
Everything that varies by tenant is resolved at runtime from two inputs: the URL and the route map.

Dashboards people run the floor with

I delivered more than ten operational and reporting dashboards: Live Ops, SLA & Service Quality, Productivity, Picking Tour Cockpit, Storage Occupancy, and Inbound/Outbound. They share a reusable KPI widget framework that handles:

  • aggregation by period, on top of working-day calendars and warehouse-specific targets;
  • drill-down from a chart to the orders behind it, and from an order to its order lines;
  • export, and dialog state kept in the URL, so a filtered view can be shared as a link.

The less visible parts

  • Authentication. Token refresh runs through Axios interceptors with a queue: when several requests fail at once, they wait for a single refresh instead of each starting their own. Session expiry is handled explicitly.
  • Bulk import. CSV and XLSX import tools with configurable data mapping and upload progress.
  • White-labelling. Each brand is a set of CSS variables. English and German translations load lazily, and a CI check fails the build when translation keys go out of sync.

Measured, not estimated: −549 kB

ECharts was imported as a whole. I switched it to selective, tree-shaken imports, then built that commit and its parent to compare. Route-level code splitting was already in place from the first commit, so this is the saving on top of it.

Before2,913.93 kBAfter2,364.45 kB
Entry chunk, raw size, measured on 22 October 2026. Gzipped, the saving is 180 kB.
MeasureBeforeAfterChange
Entry chunk (raw)2,913.93 kB2,364.45 kB−549 kB
Entry chunk (gzip)−180 kB

Keeping it maintainable

  • Rewrote the in-house virtualised data table around typed columns. It uses no third-party grid library.
  • Drove the move from JavaScript to TypeScript: about 75% of the code (75.6% of lines, 73.9% of files) is now TypeScript.
  • Enforced a layered architecture with ESLint rules, so imports that cross layers are flagged by the linter.

Tests that found real bugs

The front-end had no automated tests. I added them in layers, starting where a mistake costs the most:

  • Unit tests with Vitest, Testing Library and MSW for the core: permissions and route guards, the token refresh queue, session handling, working-day calendars, KPI calculations and the virtualised table. More than 600 tests cover 99.6% of the statements in that core.
  • End-to-end tests with Playwright: 25 read-only scenarios against the development environment, from signing in and switching warehouses to every page a role may open, period filters, language and export.

Writing them found 12 real bugs. Two were security issues: a redirect target that was trusted before it was resolved (an open redirect), and spreadsheet formulas that went through CSV export unescaped (a CSV injection). Others were a time-zone offset in scheduled job times, charts that crashed on a metric sent as null, and a table that stopped loading pages after a re-sort, which only the end-to-end tests could reproduce.

Client code and screens stay private. The diagrams are simplified and contain no proprietary code.