All work
Reference architectureA pattern we build with, written up in full. Not a delivered client project.

ERP bridge: one number, agreed by three systems

Stock in the ERP, orders in the shop, movements on the floor — and a deliberate layer that decides who is right.

Area
ERP, systems and integrations
Written
2026
Built with
  • TypeScript
  • Node.js
  • PostgreSQL
  • Message queue
  • OpenAPI
Rows of fibre optic patch panels with dense orange cabling.
Inside this project

The problem

Two systems disagree about the same number and everyone has learned which one to distrust. Usually nobody decided that the ERP owns stock and the shop owns orders — it accumulated. So a sync runs nightly, conflicts resolve by whichever job finished last, and a mis-picked order is discovered by a customer.

Integration work is mostly not code. It is deciding, explicitly, which system owns each field.

How we build it

1. An ownership map

One page per entity: product, price, stock, customer, order, invoice. For each field: which system is the source of truth, who may write it, and what happens when two writes race. This gets signed off before anything is built.

2. A bridge, not a mesh

Every system talks to one integration service with a versioned schema, instead of six point-to-point scripts that only one person understands. Inbound events are queued and idempotent — the same message arriving twice does not double a stock movement.

3. Visible reconciliation

A scheduled job compares both sides and reports differences as a list a human can work through, rather than silently overwriting. Drift becomes a number someone watches, not a surprise.

4. Migration with a rehearsal

Data moves in a dry run against a copy first, with a diff report and a rollback path. The real run is the third time we have done it, not the first.

What you would get

  • The field-level ownership map, agreed in writing
  • An integration service with a documented API and replayable event log
  • Reconciliation reports and alerting on drift
  • A migration runbook, rehearsed before the cutover

Where it gets hard

Legacy ERPs often have no usable change feed, so the bridge has to poll and diff — which makes the reconciliation job a permanent part of the system rather than a temporary crutch. Rounding rules for tax and unit conversion are where most “obvious” mismatches actually live. And every custom field someone added in a hurry is a migration decision waiting to be made.

Typical architecture

Three systems talking through one bridge, with drift reportedERP · stockshop · ordersfloor · movesbridgeversioned schemareconciledrift report
A pattern we build from, not this project’s own design. No client data or client system is depicted.

Next

Offline-first app for people who work in basements

Read it

Have a version of this problem?

Tell us what your setup looks like. We will tell you which parts of this apply and which do not.