Dropfront Live

Creator product drops that sell out exactly, never oversell, even under a million-buyer stampede.

Dropfront Live is a drops commerce platform for creators and D2C brands. A seller launches a limited-stock drop with an exact quantity and a go-live countdown. Fans hit a fast drop page with a real-time stock counter, and every purchase runs inside a single strongly consistent transaction that conditionally decrements stock and writes the order together. The database itself enforces "sell exactly N, reject the rest fast and clean." No Redis counters, no Lua scripts, no reconciliation job, no oversell-then-refund disasters.

Inspiration

We kept seeing the same story in creator commerce: a limited drop goes viral, the inventory counter lags behind the stampede, and the brand ends up overselling and sending apology refunds. Almost every flash-sale guide answers this with a Redis counter, Lua scripts, and a background job to reconcile the cache against the order table. We wanted to prove that overselling is not an inventory problem, it is a consistency problem, and that a strongly consistent database can be the entire correctness boundary with none of that fragile glue.

What it does

Dropfront Live lets a creator or brand launch a limited-stock product drop with an exact quantity and a go-live countdown. Fans land on a fast drop page with a live remaining-stock counter and buy a unit through a single atomic transaction that conditionally decrements stock and writes the order together. The seller dashboard shows live revenue, sell-through, and a per-unit audit trail, plus a one-click Stress Test that fires thousands of concurrent buyers at a live drop and renders a real-time race ending on a hard receipt: units sold equals inventory exactly, oversold equals zero.

How we built it

We built it on Next.js 14 with the App Router, TypeScript, Tailwind, and hand-rolled shadcn-style components. The correctness lives in one tiny transaction against Amazon Aurora DSQL over the PostgreSQL wire protocol: a conditional UPDATE that decrements remaining only while it is above zero, then an order insert, with bounded retries on optimistic-concurrency aborts. The same store interface has an in-memory backend so the app runs with zero config, and judges can paste their own DSQL connection string in Settings to flip to live infrastructure per request.

UPDATE drops
   SET remaining = remaining - 1
 WHERE id = $dropId
   AND remaining > 0
RETURNING remaining;

If two buyers race for the last unit, one transaction claims the row and the other gets zero rows back and a clean sold-out.

Challenges we ran into

The first hard problem was making rejections fast and clean instead of ugly. Aurora DSQL uses optimistic concurrency, so heavy contention on one inventory row triggers serialization aborts; we added a bounded retry-and-reject path so a real winner is never wrongly turned away and losers fail in milliseconds. The second was proving the guarantee visually: we run thousands of concurrent attempts through the exact buy path a fan uses, then play the results back as a live tile race so the proof is honest, not a mockup.

Accomplishments that we're proud of

We are proud that the demo is genuinely true: every tile in the stress test is a real purchase attempt through the same code path, and sold can never exceed inventory because the database enforces it. We also kept the whole thing shippable, it runs with no credentials in demo mode, builds in a single Docker image, and gracefully upgrades to live Aurora DSQL with one connection string.

What we learned

We learned how much accidental complexity the standard flash-sale architecture carries, and how much of it disappears when the database is strongly consistent. We also got a much sharper feel for designing around optimistic concurrency: keeping the transaction tiny, making the conditional decrement the single guard, and treating retries as a first-class part of the contention path rather than an afterthought.

What's next for Dropfront Live

Next we want to add Stripe sandbox checkout so the order carries a real payment intent, verified one-per-fan enforcement with Clerk, a waitlist-to-claim queue for sold-out drops, webhooks so sellers can wire drops into their existing fulfillment, and a multi-region always-on demo that keeps a drop consistent even if one region goes dark.

Built with

Next.js 14, TypeScript, Tailwind CSS, shadcn-style UI, Amazon Aurora DSQL, PostgreSQL, node-postgres, Vercel, Docker.

Built With

Share this project:

Updates