QR DELIVERY QUEUE
Mission-critical courier dispatch and concurrency control for Amazon Now, Al-Haram Hub.
The Problem Space
During peak fulfillment windows, tens of couriers scan entry simultaneously. Without strict concurrency controls, duplicate sequence IDs, double-calling, and queue disputes disrupt operations.
Systemized Implementation
Constructed an atomic transaction flow in PostgreSQL using row locks and client idempotency tokens, paired with a low-latency realtime broadcasting layer.
How It Operates in Production
Developed with Next.js, TypeScript, and Supabase Realtime. Designed three distinct interfaces: an RTL mobile ticket interface for drivers, an administrative dispatch board for hub managers, and a kiosk TV display with synthesizer sound cues.
Crafted a resilient multi-screen interface (courier mobile, staff tablet, wall-mounted display) with zero-refresh WebSockets, offline warning alerts, and audio synthesize cues.
QR DELIVERY QUEUE // HIGH-CONCURRENCY DISPATCH (AMAZON NOW HUB)
Dynamic QR Ingress
Couriers scan physical hub QR on arrival; client issues idempotent arrival token without app installation.
PostgreSQL SELECT FOR UPDATE
Transactional row-level locking eliminates ticket duplication and race conditions during simultaneous burst arrivals.
Warehouse Operator Station
Real-time ticket routing console syncs package staging bays via bi-directional WebSockets under 50ms latency.
Ceiling Display & Web Audio Chime
Full-screen warehouse monitor triggers high-contrast visual callouts and distinct acoustic cues for drivers.
Data Flow & Infrastructure
Drivers scan a dynamic QR code generating a mobile ticket with a unique token. The request executes a PostgreSQL stored procedure with row-level locks. Supabase Realtime triggers broadcast events to operator workstations and wall-mounted TV monitors in under 50ms.
Database row locking (FOR UPDATE) and cryptographic idempotency keys prevent race conditions and duplicate ticket generation under heavy courier arrival bursts.
Core System Features

Mobile Courier Arrival & Contactless QR Scanner
Instant mobile entry portal generating unique arrival tickets without requiring app downloads.

Warehouse Operator Console & Staging Bays
Real-time warehouse management view displaying assigned staging doors, queue wait times, and dispatch alerts.

High-Contrast Warehouse TV Callout Screen
Full-screen ceiling monitor with Web Audio chime alerts flashing station numbers for inbound drivers.

Courier Digital Boarding Pass & Queue Position
Live mobile web ticket tracking dynamic queue position and route staging bay assignment.

Physical Hub QR Check-In Signage
High-resolution check-in signage deployed at loading docks for instant courier check-in.