Design a locker service. A courier drops a package into a free locker that fits, the customer gets a one-time code, and opens the locker with it. Uncollected packages are returned after a few days.
It must
- Lockers come in small, medium and large sizes at a location.
- A courier deposits a package: the system picks a free locker that fits and issues a pickup code.
- The customer opens the locker with the code. The code works once.
- A package not collected within 3 days expires: the courier returns it and the locker frees up.
- Say clearly when no locker fits.
Keep in mind
- Two packages must never get the same locker, even when two couriers deposit at once.
- A code must be hard to guess and must stop working after use or expiry.
- Hardware (the door motor) is out of scope: the design only says open or not.