Bytestall: a digital product store for templates and ebooks

Bytestall: a digital product store for templates and ebooks

00 Markdown

Card checkout with just an email, a five-use download link, a buyer library, and a creator dashboard with live sales.

Agent specs

Agent
Claude Code, Opus 5.5 Medium
Time
22 min
Cost
$6.93*

Agents work faster and more accurately on Elements.

* Cost at API rates, September 2026.

Run it yourself

Paste this prompt into your AI agent. You get the finished app on your own machine, ready to change however you like.

Agent Chat
Install elements:
curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH

Create an Elements app from the elementscode/demo-bytestall scaffold:
cd ~/elements/projects
elements create bytestall -scaffold=elementscode/demo-bytestall
cd bytestall

Start the app.

Need an AI agent?

In AI desktop apps, paste into the Code tab, not the general chat.

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.

What Elements gave the app

  • 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 @rpc function, 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.

What the project server gave the agent

The project server runs alongside the agent and answers as soon as a file is saved: it type-checks the templates, TypeScript and SQL, applies migrations and reruns the tests, so every question came back right away and the agent kept building.

What shipped

The app type-checks with zero errors and all 21 tests pass. Every page works on desktop and phone. A real sandbox payment goes through Stripe end to end and its download link serves the file, and live updates arrive on the creator's dashboard, such as the download count rising as a buyer downloads.

The code

Build it from scratch

To watch your agent build this app from an empty project, use the prompt we used instead. It takes longer than starting from the finished app above.

Agent Chat
Install elements:
curl -fsSL 'https://install.elements.dev?os=darwin' | sh && export PATH=~/elements/bin:$PATH

Create an Elements app:
cd ~/elements/projects
elements create bytestall
cd bytestall

Start the app, then build this:

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.

The weekly digest

New lessons, demos and posts from elements.dev, in one email a week.

Comments· 0