A live online auction with outbid emails, built by Claude Code on Elements

A live online auction with outbid emails, built by Claude Code on Elements

Lots with photos and countdowns, bids at a set increment, late bids that extend the close, outbid emails, and pay-by-card links.

How it's built

Gavelrush needed bids that land for everyone at once, a close time that moves when a late bid comes in, outbid and winner emails, photo uploads and card payments. Each of those is a part of Elements, so the agent spent its 22 minutes on the auction itself.

  • Live lots and bids. Lots, bids and watchlists are LiveTables. A bid lands on every open lot card, countdown and the admin's total raised the moment it is placed, and each lot page hears only its own bid history.
  • Bidding as a function call. The lot page places a bid through an @rpc server function that locks the lot, checks the increment, extends the close by two minutes when a bid comes in late, and queues the outbid email, all in one transaction.
  • Jobs and email. A one-line cron schedule closes lots every minute, records each winner and queues the winner's email with a link to pay. The outbid email checks at send time that the bidder is still behind.
  • Card payments. The winner pays through Stripe for the amount on the lot, and the payment is recorded once whether the return page or Stripe's webhook arrives first. Without a Stripe key, a test checkout inside the app records payments through the same function, and in production the app registers its own webhook on the first checkout.
  • Photos in the database. The admin uploads lot photos straight through a server call, and the app serves each one at an address browsers keep for a year.
  • Data from SQL files. Migrations define the auction and seed one admin, four bidders and twelve lots with photos, bids and watchlists, one closing in minutes.

Why Elements

Elements is an integrated full-stack app framework and a project server. The project server checks the agent's work as it builds: it type-checks the server and browser code, analyzes the program, applies migrations and runs the tests, then reports the results to the agent. A security mistake, such as calling a server-only function from the browser, is a compile error. The agent reads the report and fixes its own mistakes before it tells you a feature is done. The same checks run on every feature you ask for next.

Run it yourself

  1. 1 Sign up

    Already have an account? Sign in

  2. 2 Install and run the demo One prompt to paste into your agent.

View the code on GitHub →

The prompt

What Claude was given to build this app.

Agent Prompt
Build a live auction site named gavelrush for a charity's online auction week.

BIDDER
- Sign up, log in.
- Browse lots with photos, description, current bid, and a countdown to close.
- Place a bid at least the minimum increment above the current bid.
- A bid in the last two minutes extends that lot's close by two minutes.
- Watch lots, and get an email when outbid.
- The winner of each lot gets an email when it closes, with a link to pay by
  card.

ADMIN
- Create lots: photos, description, starting bid, increment, close time.
- Results: each lot's winner, amount and payment status, and the total raised.

Payments by Stripe.

Seed one admin, four bidders, and twelve lots with photos, bids, and close
times spread over the next few days, with one closing in minutes. Show the
seeded logins on the sign-in page.

Bids, countdowns and the total raised update in real time.