Navigation

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

LineControl shift timeline with Line 2 down and the What-if panel for WO-1204 comparing a move to Line 1 (total lateness 75 to 20 min) with a move to Line 3 (75 to 76 min), and an "Apply: move to L1" button.

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

  1. Step 1

    LineControl shift console at 10:45: the "Line 2 · Flex cut stopped" alert, KPI cards, the production timeline for lines L1–L4 with Line 2 down, and the Needs attention list of late work orders.
    10:45: Line 2 has stopped and late work orders appear in Needs attention.
  2. Step 2

    LineControl at 10:45 with late work order WO-1204 expanded in the Needs attention list: L2 down since 10:40, a key customer order of 60 boards, and a suggestion to compare moving it to L1 or L3 in the what-if panel.
    The late key-account order WO-1204 explained, with a suggestion to compare moves.
  3. Step 3

    LineControl after moving WO-1204 from Line 2 to Line 1: the confirmation strip with Undo, the updated timeline, and the decision log entry "10:45 · move WO-1204/1 L2 → L1".
    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.

InvariantWhy it mattersEvidence
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

LineControl system architectureBrowser, then a React and TypeScript single-page app, then a Symfony modular monolith with the Manufacturing module, then PostgreSQL: session-owned rows, deleted with the session. The backend calls an AI adapter: AI maps operators' free-text downtime notes to reason codes with verbatim evidence and drafts the end-of-shift handover with placeholders only; a supervisor confirms and approves, and the backend inserts every number.BrowserAnonymous demo session · guided scenarioReact + TypeScriptSingle-page app · Playwright end-to-end + axeJSON · RFC 9457 problem detailsSymfony modular monolithManufacturing moduleshift simulator · OEE · decision logtransactions · constraintsPostgreSQLSession-owned rows, deleted with the sessionAI adapterJSON schema + semanticvalidation · fixture modeby default · no AI numbersDocker + Caddy on a shared 4-vCPU host · synthetic data only
AI maps operators' free-text downtime notes to reason codes with verbatim evidence and drafts the end-of-shift handover with placeholders only; a supervisor confirms and approves, and the backend inserts every number.

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.