Amazon Locker

Who makes the code, how the bank learns it, how the customer gets it, and what still works when the bank goes dark for a week.

  • Demo bank: 1 small · 1 medium · 1 large (real banks: dozens, ILLUSTRATIVE)
  • Codes: six digits · first 100000 · single use
  • Reserved block: 200000–209999 · this bank only · e.g. 200042
  • Pickup window: 3 days (pickup_days=3)

Courier

Scans the parcel at the bank and puts it in the door that opens. He never learns, carries, or displays the code; when the bank is dark his phone only relays an opaque ticket.

Backend

Takes the scan, picks the smallest locker that fits (best fit, then lowest id), makes the six-digit code, pushes the ticket, and texts the customer. Source of truth while the bank is online.

Bank link

How a ticket reaches the bank: first its own cellular modem, then the courier's phone over Bluetooth, and only when both are dark does the bank mint a code itself.

Locker Bank

One cabinet at one spot: lockers in three sizes, a controller, keypad, battery-backed clock, cellular modem, and its own copy of every ticket. The authority on its own occupancy.

Notification

Texts the code to the customer. Fully async, so a rush or an outage never blocks a door opening; the text may wait, the deposit does not.

Customer

Receives the code by text and types it on the bank's keypad. The bank checks its own copy and opens the door.

Code ranges

Per-bank reserved code blocks, so a dark bank can still mint unique codes. This bank's block is 200000–209999; its alone.

Expiry job

Frees lockers whose codes passed pickup_days=3. Runs on the bank by its local clock; the backend reconciles on reconnect.