← all posts

Shipping a Factory Order System for 1,000+ Orders a Day

Tayyab Javed ·2026-03-14 · 7 min read
#architecture #laravel #case-study

A print factory floor doesn't care about your elegant abstractions. It cares whether the right job sheet prints, the right barcode scans, and the order moves to the next station without a human chasing it. Here's how I built a system that handled a thousand of those a day without falling over.

Model the floor, not the database

The breakthrough was designing around physical stations — artwork, print, finishing, dispatch — instead of CRUD tables. Each order is a state machine that can only move forward, and every transition is logged. When something goes wrong, you can replay exactly where it stalled.

Barcodes are the source of truth

Every job sheet carried a barcode. Scanning it was the only way to advance an order, which meant the system's state always matched the physical reality on the floor — no more 'the computer says it shipped' arguments.

public function advance(Order $order, Station $to): void
{
    abort_unless($order->canMoveTo($to), 409, 'Invalid transition');

    DB::transaction(function () use ($order, $to) {
        $order->transitions()->create(['to' => $to->id]);
        $order->update(['station_id' => $to->id]);
    });
}

Lessons that held up

Keep the write path dead simple and fast. Put the cleverness in reporting, where latency doesn't matter. And make the system match the floor, not the other way around — the people doing the work won't change their process for your schema.

Questions? Book a visual audit or ping me on LinkedIn.