Context
My Club Group manufactures custom sportswear through a network of partner factories across several countries and currencies. Every purchase order used to be allocated by hand: an operations lead would weigh price lists, capacity, lead time, quality history and relationships, then pick a factory. It worked because one person held the context in their head. It did not scale, and it left no record of why a decision was made.
Constraints
- Trust before autonomy. The team would not accept a black box. Every recommendation needed a rationale a human could read and overrule.
- Sensitive data. Price lists and margins are the most confidential data in the business; brand customers evaluating the system each needed strict isolation from one another.
- Live operations. Orders kept arriving from the CRM and the order form while the system was being built; there was no pause button.
- One engineer. I designed, built, deployed and iterated the whole system alone, with feedback from operations and leadership.
My role
I owned GAIMS end to end: discovery with operations, architecture, data model, LLM pipeline, integrations with the CRM and automation layer, the web app, deployment, and the enterprise rebuild. I also built and presented the brand-specific demos.
Architecture
Two generations:
v1 was built fast on a low-code platform with serverless functions. It proved the decision model with real orders.
v2 is a TypeScript monorepo built to be sold as enterprise software, with one isolated deployment per customer:
- Orders arrive from the CRM and the order form through signed webhooks and are processed from a queue, so none is lost or handled twice.
- For each order the engine gathers what a person would weigh up (eligible factories, their track record, prices across currencies, past reviewer feedback), asks a frontier LLM for a structured recommendation, and checks the answer before anyone sees it.
- Every recommendation is stored with its confidence, rationale and the inputs behind it, so any decision can be audited later.
Three decisions
1. Structured output plus rationale, never free text. The LLM returns a typed object (factory, split plan, cost breakdown, confidence, rationale). An answer that breaks the rules is retried or handed to a person, never applied silently. This is what made operations willing to trust it.
2. Human overrides are training data, not exceptions. Every approve, reject or edit is stored as a structured feedback record. Rejections are distilled into explicit rules that the next decisions see in their context. The system improves without retraining a model, and every change is traceable to a decision someone made.
3. Rebuild instead of patch. When brand customers started evaluating the system, the low-code v1 could not give tenant isolation, redaction or reproducible deployments. I rebuilt it as the monorepo above while v1 kept serving production, replayed 2,600+ historical decisions through v2 until they came back clean, then cut production over in a single day.
Outcome
- 3,000+ purchase orders allocated in production since February 2026.
- Every order now arrives with a recommendation and its rationale, so people approve or overrule instead of deciding from scratch.
- Patent application filed on the method; NDA-stage demos to UK sportswear brands and major sports retail groups, presented to executives and IT teams.
- An immutable audit trail from order receipt to factory assignment, which did not exist before.
What I'd do differently
Start the enterprise architecture earlier. The low-code v1 was the right call for proving the decision model with real orders, but I underestimated how soon isolation and reproducibility would be the gating questions in customer evaluations. I would also instrument the override rate from day one; it is the best single metric for whether the engine is earning trust.
Stack
TypeScript, Hono, Drizzle ORM, PostgreSQL, pg-boss, OpenAI models behind an LLM-agnostic interface, n8n, Zoho CRM, Resend, React, Leaflet, Sentry, Docker.