Stack Your Scoops
motivation
Built for a real client launching a mystery-box commerce brand — the brief was a full storefront-to-fulfillment pipeline, not a demo.
what it does
A customer storefront, an admin back office, and a warehouse fulfillment console in a single Next.js deployment, with role-based access for customer, admin, and warehouse users. Handles checkout, coupons, Razorpay and Stripe payments with a cash-on-delivery fallback, Shiprocket shipping with a deterministic rate fallback, and a rarity-weighted mystery-box allocation engine.
technical detail
Stock decrements during checkout use a conditional update inside the order transaction, so concurrent checkouts for the last unit of an item cannot oversell it. Coupon and discount math lives in one shared module used by both pre-checkout validation and order creation, so the two call sites cannot drift apart. CI runs lint, typecheck, and tests against a throwaway Postgres container on every push, and deploys to Vercel production automatically on merge to main.