Manufacturing
LineControl
Production orders, routings, changeovers, plan vs actual and OEE, with a reproducible what-if when a line breaks down mid-shift.
In the demo you replay a day shift at a fictional insulation-board plant, jump to the 10:40 breakdown on Line 2, compare moving a late key-account order to Line 1 or Line 3, apply one and undo it. Underneath: a deterministic shift simulator with changeovers, OEE computed in PostgreSQL and checked by an independent PHP calculation, and an append-only decision log.
- My role
- Sole engineer: spec to deployment
- Walkthrough
- 90-second guided scenario
- Focus
- Deterministic re-planning
Launch guided demo (opens in a new tab)Engineering evidence
Stack: React · TypeScript · PHP/Symfony · PostgreSQL · Playwright + axe
Independently built portfolio showcase · simulated data

The business problem
When a production line breaks down mid-shift, supervisors need to know within minutes which orders will miss their due time and what re-planning would cost — usually working it out from spreadsheets, radio calls and memory.
Try the workflow
Step 1

10:45: Line 2 has stopped and late work orders appear in Needs attention. Step 2

The late key-account order WO-1204 explained, with a suggestion to compare moves. Step 3

Moved to Line 1: the timeline re-plans from the same rules and the decision log records it, with Undo.
Engineering invariants
Rules the system enforces whatever the user does, and where each one is proven.
| Invariant | Why it matters | Evidence |
|---|---|---|
| The same inputs and decisions always give identical results: the simulator is pure PHP with no clock, no randomness and integer arithmetic. | Every visitor sees the same shift, and every what-if is reproducible. | Determinism (opens in a new tab)Integration/ShiftSimulatorTest.php :: testSameInputsGiveIdenticalResults |
| OEE (availability × performance × quality) computed in PostgreSQL equals an independent PHP calculation, checked at four points in the shift. | KPIs are verifiably correct, not just plausible. | SQL vs PHP oracle (opens in a new tab)Functional/LineControlApiTest.php :: testSqlKpisMatchTheIndependentPhpCalculation |
| A moved operation never starts before the decision. Decisions are append-only, and undo is recorded as a revert. | Re-planning cannot rewrite the past and stays auditable. | Decision timing (opens in a new tab)Integration/ShiftSimulatorTest.php :: testMovedOperationNeverStartsBeforeTheDecision |
System architecture
Key decisions
The seeded file holds only disturbances; production is simulated from the current plan, so decisions really change the outcome.
Why: What-if results come from the same rules as the forecast, not from canned data.
Rejected: Replaying recorded production, and an optimisation solver (I chose explainable heuristics).
docs/specifications/009-linecontrol.md Stage 2 notes and §11 Scope control
OEE in a PostgreSQL function, cross-checked by an independent PHP test oracle.
Why: The brief asked for SQL; a reviewer warned it would be hard to test, and the oracle answers that.
Rejected: SQL-only KPIs with no independent check.
docs/specifications/009-linecontrol.md §6 and Owner decisions Q5
Engineering evidence
Tests
Golden what-if values
At 10:45 order WO-1204 is 33 min late. Moving it to Line 1 cuts late orders from 3 to 2 and total lateness from 75 to 20 min; Line 3 saves two orders and makes two others late.
Conditions: Seeded shift
Tests
PHPUnit — simulator, KPIs, what-if, AI
Simulator, KPI (SQL = PHP oracle), what-if and AI tests in PHPUnit.
End-to-end
Playwright with axe
Breakdown, what-if, apply and undo; exceptions; AI-suggested downtime reasons confirmed by a supervisor. 4/4 passing on production on 26 Nov 2026.
Conditions: Desktop; smoke test also on Pixel 7
Engineering page
“How it's engineered” in the live demo (opens in a new tab)
The full detail: rules, data model, tests and measurements, next to the running product.
I use AI-assisted development for implementation, exploration and review. I remain responsible for architecture, business rules, code quality and deployment. Critical behaviour is verified with deterministic tests, static analysis and reproducible benchmarks.
Trade-offs and limits
- Fictional plant and synthetic data
- No PLC/SCADA, ERP or MES integration
- No multi-plant, labour constraints or optimisation solver
- Public demo uses prepared AI outputs
My contribution
I built LineControl as an independent engineering showcase: product specification, architecture, frontend, backend, data model, automated tests and deployment.
Want to discuss the engineering behind this?
Launch demo (opens in a new tab)Get in touch
Source-code walkthroughs available on request.