Inspiration

Three days before moving out of my hostel, I was staring at a mirror I'd lived with for four years. It was a good mirror — heavy, well-framed, completely useless to me now. Too risky to transport 400km home. I needed someone local to want it right now and pay a fair price. I tried OLX. I tried Facebook Marketplace. Both felt like shouting into a void — post a listing, wait days, haggle over WhatsApp, get ghosted.

Then I found Whatnot — a US platform where sellers stream live video of their items and buyers bid in real time. Exactly what I needed. Except: not available in India.

A $22 billion live commerce market. A proven business model. Zero Indian equivalent. I had three days before moving, a hackathon deadline, AWS credits, and a Vercel account.

I built BazaarLive.


What it does

BazaarLive is a full-stack live auction marketplace built for Indian buyers and sellers.

A seller opens their phone, streams live video of their item, sets a starting bid, and goes live. Buyers join the auction room, watch the stream, and bid in real time. When bidding ends, the winner pays instantly via UPI through Razorpay. The full cycle — list, stream, bid, pay — takes under 30 minutes.

Key features:

  • 📸 AI-powered listing — upload a photo, Gemini 2.5 Flash generates the title, description, and suggested starting price in 4 seconds
  • 🎥 Live video streaming — sellers broadcast from their phone camera via LiveKit WebRTC
  • Real-time bidding — every bid appears on all screens simultaneously via Ably WebSockets, sub-100ms
  • 🔥 DSQL conflict resolution — when two buyers bid at the exact same millisecond, Aurora DSQL's OCC resolves it with no deadlock
  • 💳 UPI checkout — winners pay via Razorpay, the fastest checkout flow in the world for Indian users
  • 🤖 AI auction summary — after every auction ends, an AI narrative is generated from the full bid history
  • 🛍️ 7 launch categories — Sarees, Jewellery, Thrift Fashion, Home Decor, Handbags, Collectibles, Art & Crafts

Business model: 8% seller commission + 2% payment processing = 10% take rate. Deliberately priced below Whatnot's 12.5% to accelerate supply-side growth in a new market.


How I built it

Frontend: Next.js 14 App Router deployed on Vercel, mobile-responsive design with portrait video layout optimised for Indian smartphone users.

Databases — the core architectural decision:

Aurora DSQL handles everything transactional — users, auctions, bids. The key reason: DSQL's Optimistic Concurrency Control (OCC) resolves simultaneous bid conflicts without deadlocks.

-- Two buyers bid simultaneously
UPDATE auctions SET current_price = $1 WHERE id = $2 AND status = 'live'
-- DSQL detects the write-write conflict at COMMIT
-- One succeeds. One gets SQLSTATE 40001 — rejected in <50ms.
-- The loser sees: "You were outbid — someone else bid at the same time!"

DynamoDB handles high-frequency ephemeral data — viewer counts, live feed events, session state — with a clean single-table design and 7-day TTL auto-expiry. Two databases, two different jobs.

Real-time layer: Ably WebSockets. After every bid commits to DSQL, the server publishes to channel auction:<id>. Every connected browser receives the update and the bid feed scrolls live.

AI features: Gemini 2.5 Flash for item description generation (vision + text) and post-auction narrative summaries. Seller onboarding time dropped from ~8 minutes to ~60 seconds.

Auth: Clerk with Google and phone OTP — the two sign-in methods Indian users actually use.

Payments: Razorpay in test mode with UPI, cards, and net banking.

Live streaming: LiveKit WebRTC with server-side token generation scoped to auction room IDs.


Challenges I ran into

Serverless has sharp edges. Three separate production bugs all had the same root cause — assuming Node.js persistence on Vercel:

  1. Fire-and-forget Ably publish — the publish was not awaited, so Vercel killed the function before the event reached Ably. Buyers waited 20+ seconds to find out who won. Fix: always await side effects before returning NextResponse.json().

  2. Stale Ably singleton — a module-level let client = null worked locally but produced stale clients on warm Vercel instances that silently failed. Fix: fresh new Ably.Rest() per publish call.

  3. Bot simulation loop dying — the simulation used a fire-and-forget background loop that was killed the moment the HTTP response returned. Fix: run the loop synchronously within the function, using request.signal (AbortController) for real cancellation.

Aurora DSQL constraints. DSQL does not support foreign keys or some PostgreSQL extensions. The schema had to be redesigned around application-level consistency, and token-based auth with short expiry required a robust retry mechanism in the connection pool.

Mobile streaming UX. Getting a portrait live stream that feels natural on a phone — while keeping the bid button and live feed visible without scrolling — required more iteration than expected. The final layout (62dvh portrait video, 38dvh bid panel below it) was arrived at by literally holding the phone and counting pixels.

Cold-start problem. A marketplace with no sellers has no buyers. Bot simulation solves the demo. The real answer is recruiting the first 50 sellers personally. That's week one post-launch.


Accomplishments that I'm proud of

  • The OCC demo is live and real. One button fires two simultaneous bids against Aurora DSQL. Judges can watch the conflict resolve on screen in under 50ms. This is not simulated — it goes through the full transaction pipeline.

  • End-to-end in 10 days. Auth, AI listing, live video, real-time bidding, DSQL conflict resolution, DynamoDB feed, Razorpay checkout, AI auction summary, bot simulation, mobile-responsive UI — all working and deployed.

  • AI cut seller onboarding from 8 minutes to 60 seconds. The biggest barrier to marketplace supply is listing friction. A seller uploads one photo and the AI handles the rest — title, description, condition assessment, suggested price.

  • The product actually solves the original problem. I tested it with the mirror scenario. List in 45 seconds. Go live. Bids arrive. Auction ends. Payment link sent. That's a real product, not a demo.


What I learned

Distributed systems are humbling. Understanding OCC conceptually is different from building a product where the conflict is the feature. Watching two transactions race and seeing DSQL pick a winner in real time changed how I think about concurrency.

Serverless requires a different mental model. Every assumption from local Node.js development — shared memory, persistent connections, background tasks — breaks on serverless. Design for statelessness from day one.

AI as onboarding, not gimmick. The description generator wasn't in the original spec. I added it after watching myself spend 8 minutes writing a test listing. The AI does it in 4 seconds. That's the difference between a seller who lists once and a seller who lists every week. Retention lives or dies on that gap.

The best architecture diagrams come from real constraints. The two-database decision (DSQL for transactions, DynamoDB for feed state) wasn't from a textbook. It came from asking: what would actually break at a million concurrent auctions? Real problems produce better architecture than theoretical ones.


What's next for Bazaar Live

  • 🌍 Multi-region Aurora DSQL — active-active writes from Mumbai and Virginia for sub-30ms bid latency across India
  • 📅 Scheduled auctions — sellers set a future date and time to go live; the auction is listed in advance so buyers can browse upcoming drops and plan ahead
  • 🔔 Pre-auction buyer alerts — buyers follow categories or specific sellers and get notified when a scheduled auction goes live, driving higher viewership and faster bidding from the first second
  • 🛡️ Buyer protection escrow — hold payment until buyer confirms receipt
  • 🇮🇳 Hindi UI — the database schema is already bilingual, the frontend is one translation file away
  • 📦 Shiprocket integration — instant shipping quotes at checkout, end-to-end logistics
  • 📊 Seller analytics — which items get the most viewers, when do bidding wars start, what starting price maximizes final price
  • 🏪 Seller storefronts — persistent pages for repeat sellers to build audience and following

Built With

Share this project:

Updates