Case Study: Turning Midas into a Trustworthy Human-in-the-Loop Data Platform
Role: Sole full stack engineer at mSupply (via Andela) · Scope: architecture, front end, API, security, CI/CD · Live: midas.msupply.com
The problem
mSupply runs several distribution business units, each with its own ERP catalog and a constant stream of supplier price sheets. The same physical product can appear dozens of times under different names, SKUs and units of measure. Without a single source of truth, pricing, sourcing and reporting all drift.
Midas exists to fix that: it matches supplier price sheets and ERP catalogs across 8 business units into a single set of golden records. AI does the heavy lifting, and product managers review whatever the model isn't sure about.
When I took the project over, the idea worked but the product didn't yet. The review flows were hard to use at volume, the codebase was difficult to change safely, and the security posture wasn't where an internal system holding commercial data should be.
My approach
I treated it as a takeover, not a rewrite. The goal was to keep the platform running for the people who depended on it while changing most of what was underneath.
- Stabilize first. Strict linting, type checks and security scanning in pre-commit hooks and CI, so every later change landed on a safety net.
- Redesign the workflows around the reviewer. The people using Midas aren't engineers — they're product managers clearing queues. Every screen was rebuilt around how fast and how confidently they can make a decision.
- Harden the stack. Proper identity, migrations, containers and pipelines, so the platform could be owned long term.
Designing for human review
The core of a human-in-the-loop product is the moment a person decides whether the machine was right. I redesigned the three review queues — supplier matching, ERP matching and golden-record review — around that moment:
- Confidence front and center. Every suggested match shows a color-coded confidence score, so reviewers can clear high-confidence matches quickly and spend their attention on the ambiguous ones.
- Side-by-side evidence. Reviewers see the candidate and the golden record together, with the attributes that drove the match, instead of jumping between screens.
- Bulk where it's safe, granular where it matters. Bulk import/export and batch actions for the obvious cases; single-record approve/reject with context for the rest.
- Navigation that scales. Coverage dashboards, taxonomy browsing, filters and search with server-side pagination, so queues with thousands of records stay fast.
With AI-assisted matching reaching a ~97% auto-match rate, the human queue is the long tail — exactly where a good review experience pays off most.
Hardening the platform
An internal tool with commercial pricing data deserves production-grade foundations:
- Microsoft Entra ID authentication end to end, with token verification on the API and an auth gate on every route in the app.
- Versioned database migrations with Alembic, so schema changes are reviewable and repeatable across environments.
- Docker and GitHub Actions CI running lint, type checks, tests and container builds on every change.
- Security headers and static hosting for the front end, with the API deployed separately as a container.
One detail worth sharing: the front end is a statically exported Next.js app. The host's directory-detection redirect silently stripped query parameters — including the OAuth ?code= callback — which broke sign-in only in production. The fix was a post-build step that removes the conflicting prefetch directories, plus explicit route rewrites. It's the kind of bug you only catch by emulating the real hosting environment locally, which is now part of the workflow.
Results
- ~70% of the codebase reworked without stopping the platform.
- ~97% AI auto-match rate, with human review focused on the cases that need it.
- 8 business units reconciled into one set of golden records.
- A codebase with automated quality gates that the next engineer can change with confidence.
What I took away
AI accuracy is only half of an AI product. The other half is how quickly a person can verify, correct and trust what the model did. Designing that loop — and the boring, solid foundations underneath it — is where most of the value in Midas came from.