Real-time sync across 5 roles: what the Restaurant POS taught me about state
Building a POS system across five roles meant five different views of the same order state, all needing to update in real time without stepping on each other.
Pusher handled the transport layer well, but the real challenge was scoping channels correctly — especially for unauthenticated customers placing orders via QR code, who needed updates without a login session.
The trickiest bug was stale cashier data across table sessions: closing one table's bill while a second order came in on the same physical table caused a race condition in how totals were calculated. Fixing it meant rethinking how table sessions were keyed, rather than patching the symptom.
The lesson that stuck: real-time features are easy to demo and hard to trust. Most of the actual engineering time went into edge cases, not the happy path.