Educational demo — not affiliated with NVIDIA, Best Buy, or Ticketmaster, and no real retailer APIs.
From personal experience: you finally get through the queue, the GPU (or ticket) shows in your cart, and then the site turns into a stress test. Autofill puts the wrong ZIP on the first try, the wallet step wants an extra click, or the bank’s 3-D Secure page spins—and the whole time you’re guessing whether a silent timer is counting down. When the page flakes or the hold expires, you rarely get a clean answer: did payment go through, did stock go back, or are you in limbo? That ambiguity is what makes people walk away angry even when the engineering is “working as designed.”
This repo doesn’t replace a real storefront. It’s a playground for the clearer contract those moments need: reserve units when the customer enters checkout, give them a real deadline, complete the order when they finish, and restore inventory on timeout so the next person isn’t blocked by ghost stock—and so the shopper knows what happened.
Under the hood, a small Temporal workflow does exactly that for a demo SKU (founders-gpu-fe): wait for a checkout signal up to a timeout, then confirm or roll back plus a stub “cart expired” notice. The same hold timer + compensation idea shows up in GPU drops (short pay window after allocation) and Ticketmaster-style seat holds (pay within N minutes or the seats return).
Detailed steps: INSTRUCTIONS.md
Agent / maintainer notes: CLAUDE.md
Captured from a full local run: Temporal on Docker, worker on flash-sale-cart, demo at http://localhost:5173. All files are in docs/screenshots/.
Idle — stock loaded, no active workflow; Complete checkout disabled.
Hold in progress — status Running, countdown in Hold / pay, Complete checkout enabled.
After timeout — outcome expired (no checkout in time).
After checkout — outcome completed (inventory decremented).
Workflows — recent CartReservationWorkflow runs in namespace default.
Happy path — History — reserve_inventory → deadline → userCheckedOut → generate_ticket; result completed.
Timeout path — History — deadline fires → restore_inventory → send_cart_expired_email; result expired.
Timeout path — run summary — inputs and expired result (compact header view).
git clone https://github.com/logesh45/GPU-Drop-Reserver.git && cd GPU-Drop-Reserver
make setup # Python venv + pip + frontend npm install
make up # Temporal + Web UI + Postgres (Temporal metadata)Open Temporal UI: http://localhost:8080
After Temporal is up, run worker + FastAPI + Vite together with prefixed logs:
make wait-temporal # optional: block until :7233 is ready
make honchoUses the root Procfile (Honcho). Stop all with Ctrl+C, or stop only the worker from another terminal: make stop-worker (API + Vite stay up). Bring a worker back with make worker or restart Honcho.
Then open http://localhost:5173.
Alternative: three separate terminals
make worker— worker polling task queueflash-sale-cartmake ui-api— FastAPI on port 8787make ui-web— Vite on 5173 (proxies/api→ 8787)
make demo-timeout # expiry → inventory restored (see worker.log)
make demo-checkout # checkout signal → inventory stays decrementedOverride product id: ITEM=concert-floor-a make init-db (same workflow; Ticketmaster-style mental model).
- Start workflow → reserve in SQLite
- Timer + signal: wait for
userCheckedOutup to N seconds - Success: stub “order confirmed” activity
- Timeout: restore inventory + stub “cart expired” email
- Python 3.11+
- Node.js 18+ (for the Vite UI)
- Docker (Temporal server, Web UI, Postgres for Temporal persistence)
make testUse for learning only. Trademarks (NVIDIA, Best Buy, Ticketmaster) are cited to explain scenario context; this project does not use their services or endorse scraping or ToS violations.







