DEV Community

Anushka Singh
Anushka Singh

Posted on

DROP_RUSH: Zero oversells

Launch of my new startup and not kidding I entered a mind blowing hackathon having more than 6k participants worldwide and since then I am awestruck with the aws dynamodb capabilities

HACKATHON
First and foremost I would thank the hackathon organisers to provide me v0 and aws credits to build and give life to droprush.

Code

⚡ DROPRUSH

Flash Drops. Atomic Inventory. Zero Oversells.

Next.js AWS DynamoDB Vercel TypeScript

H0 Hackathon — Track 1: Monetizable B2C App


🎯 The Problem

Every major sneaker drop, limited merch release, or flash sale suffers the same failure: overselling. Multiple users hit "Buy" at the same millisecond — and all of them succeed. Orders get cancelled, trust breaks down, brands lose credibility.

⚡ Our Solution

DropRush guarantees zero oversells using a single atomic DynamoDB write:

UpdateItem({
  UpdateExpression: "SET remainingStock = remainingStock - :one",
  ConditionExpression: "remainingStock > :zero"
})
Enter fullscreen mode Exit fullscreen mode

If 1000 users race to claim the last item — exactly 1 wins. No locks. No queues. No oversells. Ever.


🏗️ DropRush Architecture

Overview

╔════════════════════════════════════════════════════════════════════╗
║                            DROPRUSH                              ║
║                    Real-Time Flash Sale Platform                 ║
╚════════════════════════════════════════════════════════════════════╝
                         ┌─────────────────┐
                         │ 🛍️  SHOPPERS   │
                         │ Multi-tab Users │
                         └────────┬────────┘
                                  │
                                  ▼
                         ┌─────────────────┐
                         │ 👤 BRAND ADMIN  │
                         │ Product Control │
                         └────────┬────────┘
                                  │

What is my project all about?

Have you ever put yourself in a race to buy those favourite show tickets on sale! You must have, remember the COLDPLAY concert or a new hoodie left with limited stocks. Let me tell you my story about 1.5 years ago on the launch of Github copilot, they were selling a free hoodie and I was scrolling linkedin at that particular moment. What I came across was a great offer and I instantly filled the essential details and hit that button and soon within minuted hoodies were sold out and all other people remained with nothing in their cart that night/:
Sometimes the admins put the timer in which they clear the stock but when multiple users hit on these items, the items get oversold because there is no race condition applied remainingstock > 0.
I solved this problem by working on database layer instead of application layer.

What does this application layer mean here

Most flash sale platforms solve overselling problem on application layer by incorporating locks,queues and semaphores. These techniques further add latency, complexity and become single points of failure which delays user feedback and extra redis infrastructure just does get complex.

What database layer captures

I was prompted to utilise AWS databases as the hackathon requirement and magically the novelty occurred here
one atomic DynamoDB UpdateItem with ConditionExpression: remainingStock > 0.
Mathematically impossible to oversell and no need of redis dependency and application-level locks
Demonstrates scalability as millions of users can concurrently claim without delay.

My frontend is made on next.js as a backup feature otherwise the generative AI capabilities of v0 for frontend was amazing

Image of v0 frontend

Honestly the experience of building this project was wholesome and I am in hurry to convert it into a startup product.

In the meantime you can see what did i build, temporarily

Top comments (0)