Oversell-proof reservations
Taking stock is one atomic MongoDB update that checks the drop is live and enough units remain. No locks, no transactions, and a unit can never be sold twice.
Where to look: src/services/reservation.service.ts
DropCart is a portfolio project. It looks like a store, but the interesting part is what happens when many people try to buy the last unit at the same time.
No sign-up needed. A temporary account is created for you and deleted after a day.
Open a live drop and press Reserve. One unit is taken from the stock in a single atomic update and held for five minutes.
Use 4242 4242 4242 4242, any future date and any CVC. No real money is charged.
Try a gift under 2000 taka, then ask for something that does not exist and watch it say so.
Your account page lists every reservation, and paid ones link to a receipt.
The browser only talks to the web app. API calls are rewritten to the Express API, so the session cookie is first-party and needs no CORS.
Taking stock is one atomic MongoDB update that checks the drop is live and enough units remain. No locks, no transactions, and a unit can never be sold twice.
Where to look: src/services/reservation.service.ts
Webhooks can repeat or arrive late. Fulfillment runs exactly once, and a payment that lands after the hold ended either re-takes the stock or is refunded automatically.
Where to look: src/services/payment.service.ts
Stripe Checkout and a mock provider share one code path, so the demo works anywhere and a local gateway can be added without touching business logic.
Where to look: src/payments/
Gemini function calling against the real catalog. Product cards come from database rows, tool arguments are validated, and each user is rate limited.
Where to look: src/copilot/
Shopper, admin and superadmin. Admins only see their own products, drops and revenue, roles are read from the database on every request, and foreign ids return 404.
Where to look: src/middleware/auth.ts
Prices are in Bangladeshi taka (৳) and times are shown in Dhaka time (GMT+6). Payments run in test mode.