A digital store with card checkout, built by Claude Code on Elements
Card checkout with just an email, a five-use download link, a buyer library, and a creator dashboard with live sales.
How it's built
Bytestall needed product uploads, guest card checkout, download links with a limit and an expiry, emails, and live sales totals. Each of those is a part of Elements, so the agent spent its 22 minutes on the store itself.
- Card checkout with just an email. The buy button prices the product on the server and sends the buyer to Stripe Checkout. The order is recorded when the buyer returns and again when Stripe's webhook arrives, once either way. Without a Stripe key the button opens a test checkout inside the app, which records the sale through the same function, so the whole flow runs before Stripe is connected. In production the app registers its own webhook on the first checkout.
- Product uploads. The creator's product form sends the cover and the PDF or ZIP as file fields to an
@rpcfunction, which checks each file's own bytes for its type and stores both. - Download links that count. Each purchase gets a link that works five times and expires in thirty days. One SQL update checks the count and the expiry and spends a download, so every click is counted exactly once.
- Live sales totals. Each payment, download and resend notifies a channel, and the creator's dashboard re-reads its totals, so revenue and download counts move while it is open.
- Download emails. A template emails the download link along with a link to the buyer's library of everything bought with that email, and the creator can resend it with a fresh link.
- Data from SQL files. Migrations define the store and seed the creator, six products with drawn covers and real PDF and ZIP files, and a dozen past sales. The project server applied each one as soon as it was saved.
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 Sign up
Already have an account? Sign in
- 2 Install and run the demo One prompt to paste into your agent.
The prompt
What Claude was given to build this app.
Build a store for digital products named bytestall, for an independent creator selling design templates and ebooks. BUYER - Browse products with cover images, descriptions and prices. - Buy with just an email and a card. No account. - Get an email with a download link that works five times and expires in thirty days. - A library page, reached from any download email, that lists everything bought with that email. CREATOR (admin account) - Upload products: title, description, price, cover image, and the file itself (PDF or ZIP). - Sales list and totals, and a count of downloads per product. - Resend a buyer's download email. Payments by Stripe. Seed the creator, six products with covers and files, and a dozen past sales. Show the admin login on the sign-in page. Sales totals update in real time.