HomeCase studiesOffline-Resilient Restaurant POS and Kitchen Dispatch System...

Case study · Milan, Italy

Offline-Resilient Restaurant POS and Kitchen Dispatch System Across Multi-Branch Venues

Hospitality POS & Kitchen Operations

High-volume dining rooms stall when spotty Wi-Fi drops active table checks or delays ticket routing to kitchen stations. We engineered a cross-platform restaurant operations suite combining Flutter point-of-sale terminals and kitchen displays with a Laravel and MySQL central hub. Local SQLite persistence lets waitstaff split bills, fire course modifiers, and queue fiscal receipts offline, while WebSocket channels broadcast real-time station tickets and ingredient depletion across branches.

Industry
Hospitality POS & Kitchen Operations
Solution
A cross-platform restaurant point-of-sale, kitchen display, and central branch administration platform built with Flutter, Laravel, MySQL, and WebSocket event streaming.
Platforms
Cross-platform · Web & API
Stack
Flutter · Dart · Laravel · PHP · MySQL · Redis
Location
Milan, Italy · delivered remotely
Role
Engineering, with the team behind for mobile and QA

Delivered remotely for a business based in Milan, Italy. Names withheld by agreement.

Project Overview

Industry: Hospitality POS & Kitchen Operations

Solution scope: A cross-platform restaurant point-of-sale, kitchen display, and central venue management system built with Flutter, Laravel, MySQL, Redis, and WebSockets.

Context: Multi-floor dining rooms and busy urban venues juggle high table turnover across floor tablets, bar printers, and staggered kitchen stations. Any pause at checkout, dropped ticket on a weak Wi-Fi corner, or uncoordinated table merge delays plates and skews shift closes. We engineered an offline-capable Flutter client paired with a Laravel and MySQL core to unify floor service, kitchen pacing, and multi-branch financial control.

Service Floor & Kitchen Bottleneck

Wireless dead zones stalled active tables. Thick walls and crowded dining rooms interrupted cloud-only POS tablets, freezing split-check screens during peak service.

Unstructured ticket routing overwhelmed the pass. Printing every order line to a single kitchen spooler without station filtering or course holds caused appetizers and mains to fire simultaneously.

Manual shift closes masked ingredient shrinkage. Reconciling paper Z-tapes against separate spreadsheet inventory logs hid modifier over-portions, void abuse, and unrecorded comps.

Fragmented branch catalogs complicated group updates. Updating seasonal prices, allergen tags, or VAT brackets required logging into isolated local servers per site.

Architectural Strategy

Adopt local-first state on floor terminals. Handheld Flutter devices commit table openings, modifiers, and course holds into embedded SQLite first, synchronizing deltas to Laravel asynchronously so service never waits on WAN latency.

Split order intake from kitchen routing and stock accounting. Interactive endpoints handle check persistence and immediate LAN printer or WebSocket dispatch, pushing recipe bill-of-materials deductions and exports onto Redis workers.

Use append-only order events to prevent overwrites. Line items and payment tenders append as immutable records keyed by client ULIDs rather than overwriting shared table blobs.

Centralize governance while keeping execution local. Menus, tax matrices, and staff policies publish from Laravel and MySQL, while terminals cache versioned snapshots locally and print directly to venue ESC/POS hardware over LAN.

Core Capabilities

  • Interactive floor plan & table lifecycle: Drag-and-drop room layouts supporting table merges, split checks by seat or item, cover counts, and visual turn-time indicators.
  • Modifier & course pacing engine: Nested mandatory and optional modifiers (cooking temperatures, allergies, side swaps) paired with fire-on-hold course triggers.
  • Station-scoped Kitchen Display System (KDS): Dedicated Flutter displays for cold prep, hot line, bar, and expeditor pass featuring color-coded ticket aging and one-tap recall.
  • Direct LAN thermal printing: Deterministic ESC/POS formatting for bar chits, duplicate kitchen slips, and itemized guest bills with automatic fallback printer routing.
  • Recipe-level inventory depletion: Multi-unit bill-of-materials rules deducting raw ingredients per sold dish and modifier, including waste logging and supplier purchase orders.
  • Shift drawer & Z-report reconciliation: Blind cash counts, card batch totals, void/discount reason auditing, and tamper-evident sequential fiscal check numbering.
  • Multi-branch menu & tax overrides: Shared group item definitions with branch-specific pricing windows, happy-hour schedules, and regional VAT mappings.

Technical Architecture

Cross-platform Flutter terminals and KDS. A single Dart codebase compiles for Android handhelds, iPad counter stands, and landscape kitchen monitors. State management isolates UI rendering from a background sync engine that watches connectivity transitions and flushes pending SQLite outbox rows in strict causal order.

Laravel domain core & idempotent API. Laravel exposes versioned REST endpoints guarded by Sanctum device tokens and per-staff short PIN sessions. Every sync payload carries an idempotency key so tablet retries after packet loss never duplicate charges or kitchen fires.

MySQL transactional ledger. MySQL stores branch topologies, versioned menu manifests, open and settled checks, payment tenders, and append-only audit trails using InnoDB row-level locking and composite (branch_id, business_date, status) indexes for rapid shift queries.

WebSocket & Redis event fabric. Once Laravel persists a fired course or KDS bump, it publishes a lightweight room-scoped event into Redis, which broadcasts over WebSockets to floor tablets and kitchen screens so table statuses stay aligned across every device on the floor.

Flow: Waiter Flutter POS (SQLite outbox) → Laravel idempotent sync API → MySQL order & ledger store → Redis pub/sub & queues → WebSocket KDS screens & inventory workers

Technology Stack

Category Technology
Terminal & KDS client Flutter and Dart powering handheld waiter tablets, fixed cashier counters, and wall-mounted kitchen displays
Local offline store Embedded SQLite on POS devices buffering active table states, menu snapshots, and queued check mutations
Application API Laravel (PHP 8.4) exposing idempotent order sync endpoints, shift reconciliation APIs, and back-office tooling
Relational database MySQL storing branch catalogs, modifier trees, ledger transactions, recipe BOMs, and fiscal audit logs
Real-time dispatch WebSockets backed by Redis pub/sub streaming course fires, table merges, and ticket bumps in sub-second loops
Queue processing Redis queues executing ingredient stock deductions, end-of-shift Z-reports, and accounting exports asynchronously
Thermal printing Direct LAN ESC/POS socket driver from Flutter terminals to bar, grill, pastry, and receipt printers
Back-office portal Web console for menu scheduling, tax rule matrices, staff PIN permissions, and cross-branch margin views
Observability Device heartbeat telemetry, sync conflict logs, and printer spool error tracking per venue

Engineering Trade-offs & Solutions

Challenge Solution
Two servers adding items to the same table while partially offline risked overwriting each other's updates Modeled order lines, modifiers, and payments as append-only events with client ULIDs so Laravel merges concurrent additions deterministically.
Cloud print queues stalled kitchen output whenever venue internet jittered Built direct LAN ESC/POS socket printing inside Flutter with automatic peer failover to the main counter tablet if a printer port becomes unreachable.
Real-time recipe stock calculations slowed down check settlement transactions Decoupled settlement from inventory: MySQL commits payment tenders immediately while Redis workers process BOM ingredient deductions off-thread.
Changing menu prices mid-shift caused discrepancies on open tables Bound every open check line item to the menu version snapshot active at order entry so price edits apply cleanly to new orders only.
Kitchen displays flooded cooks with course-two mains before starters left the pass Added hold-and-fire course states in Laravel and KDS bump hooks that highlight queued mains only when the expeditor releases the course.
High-frequency floor status polling overloaded PHP-FPM workers during dinner peaks Replaced client polling with persistent WebSocket channels fed by Redis pub/sub, reserving REST calls for state mutations and reconnect catch-up.

Security & Auditability

Dual-layer device and staff authentication. Terminals authenticate with revocable hardware certificates and branch-bound API tokens, while servers unlock screens via fast four-digit or NFC staff PINs that stamp every void, discount, and drawer open event with the exact operator identity.

Immutable void and discount trail. Once a line item is fired to the kitchen or printed, it cannot be silently deleted; removing it requires a supervisor-approved void record carrying a mandatory reason code that stays visible on shift audit reports.

Strict branch isolation. Middleware enforces venue scoping on every query and WebSocket channel subscription so managers at one location cannot read sales ledgers or alter floor configurations belonging to another branch.

Performance & Scale

Predictable rush-hour throughput. Partitioning read-heavy menu catalogs into cached Redis manifests and keeping MySQL write transactions narrow ensures dinner-rush check creation remains fast even when multiple branches close shifts simultaneously.

Bounded local storage on handhelds. Closed checks older than the current business day automatically prune from tablet SQLite caches after server acknowledgement, keeping handheld memory footprints lean across multi-month deployments.

Operational Outcomes

  • Uninterrupted floor service during connectivity dips: Waitstaff continue opening tables, capturing complex modifiers, and printing bar chits locally without waiting on external internet recovery.
  • Coordinated kitchen pacing across stations: Expeditors and line cooks work from synchronized, course-aware digital queues rather than deciphering mixed paper strips.
  • Transparent shift accountability: Automated blind cash reconciliation, reason-coded voids, and recipe-linked inventory logs expose shrinkage early across every venue.
  • Rapid multi-branch menu rollouts: Central operators publish seasonal price books and allergen updates once in the Laravel back office and roll them cleanly to every terminal between services.

01 — Questions

asked about this kind of project

How do handheld POS terminals keep taking orders when venue Wi-Fi drops mid-service?

Each Flutter terminal maintains a local SQLite replica of the active floor plan, menu modifiers, and open checks. Order entries, course holds, and split-bill adjustments commit locally first with client-generated ULIDs and flush to Laravel in ordered batches once connectivity returns.

How are concurrent edits to the same table resolved when two servers modify one check?

Check mutations use event-sourced line-item append operations rather than full-record overwrites. Each item carries an immutable device ID and sequence timestamp, allowing Laravel and MySQL to merge independent additions cleanly while flagging conflicting payment settlements for supervisor review.

Why connect Flutter terminals directly to thermal printers over LAN instead of routing through the cloud?

Kitchen ticket printing cannot depend on external internet round-trips. Terminals communicate directly with local ESC/POS printers over venue subnets, with a designated local primary tablet acting as print relay if a handheld device roams between access points.

How does the Kitchen Display System prevent bottlenecks between cold prep, grill, and pass stations?

Menu items carry station-routing tags and prep-time offsets. When a server fires a two-course check, Laravel splits the ticket into station-scoped payloads over WebSockets and holds second-course prep alerts until the expeditor bumps course one.

How is inventory tracked accurately without slowing down checkout transactions?

Checkout commits only the financial ledger and order lines synchronously inside a MySQL transaction. A Redis queue worker then reads the recipe bill of materials for each sold modifier and posts batched stock-depletion entries asynchronously.

How do multi-branch groups manage regional menus and tax rules from a single MySQL database?

Catalog items live once at the group level while price books, VAT rates, availability schedules, and station mappings attach through branch override tables. Updates publish versioned menu manifests that terminals pull incrementally between shifts.

03 — Similar project?

describe what is different about yours

Build yours.

Tell me what exists, what you need and the deadline. Fixed price for a defined scope, or $55/day (8–9 hours work) with a written plan first.

Solitaire Corporate Park, Makarba, Ahmedabad, Gujarat 380015, India · IST (UTC+5:30) · --:-- IST · Mon–Fri 09:00–18:00 IST · US & EU overlap daily

No newsletter, no CRM. Just a reply.