How to set up a live demo of a web app you sell
A live demo of a web app you sell is a separate deployment of the same version Buyers receive. It runs on labelled sample data, takes payments in test mode only, captures outbound email and SMS, uses its own low-limit keys, and resets on a schedule. Set those 5 things up and a stranger can click through it without costing you money or reaching a real person.
If you license the same software many times, the demo stays open to strangers for months. An agency developer judging it for a client project may click through it before spending the client's budget. This guide covers each step, with examples from a common Next.js and Postgres setup.
What should a live demo show, and how do you label sample data?
Show the main workflow from start to finish, with enough sample data that every screen has something on it. Include every status a record can have, such as paid, overdue and draft, because a Buyer wants to see how each one looks. Generate the data. Never copy records from a client project, even with names changed.
Label it on every page. A thin banner works: "Demo. Sample data. Resets every 2 hours. Payments are in test mode. Emails aren't sent." Use one fictional company for the records, so nobody mistakes them for real customers.
Deploy the demo from the same commit or release tag you deliver. Then write down what differs from the version a Buyer receives:
- The demo flag and the banner
- Actions you disabled for the demo
- The seeded sample data
- Any one-click demo login
Put that note on the demo's login page and in the listing. It matters for more than tidiness. On Zero to Hundred, a Buyer can report a purchase if the software was misrepresented, and a limitation you disclosed in the listing isn't a valid ground. A demo that quietly runs a newer version than the download invites exactly that report.
Keep demo-only code, like a passwordless login route, behind the demo flag, or leave it out of the files you deliver. The handoff README guide covers documenting the delivered version itself.
How do you keep payments in test mode?
Give the demo deployment test keys only. Stripe's API keys page says sandbox keys start with pk_test_ for publishable keys, rk_test_ for restricted keys and sk_test_ for secret keys. Live keys start with pk_live_, rk_live_ and sk_live_. A live key has no reason to exist in the demo's environment.
Test payments don't move money. Stripe's testing page says sandbox transactions "don't move funds" and that the Stripe Services Agreement prohibits testing in live mode using real payment method details. The same page gives 4242 4242 4242 4242 as a test card, with any 3-digit CVC.
Make test mode visible, so a visitor never wonders whether they're paying. Print the test card on the checkout screen, next to a line like "Test mode. No real charge."
Then add a guard that fails loudly. If the demo flag is on, refuse to start unless the server key is a test key. Checking for test prefixes also catches a live restricted key or a missing one:
const key = process.env.STRIPE_SECRET_KEY ?? "";
if (process.env.DEMO_MODE === "1" && !/^(sk|rk)_test_/.test(key)) {
throw new Error("Demo mode needs a Stripe sk_test_ or rk_test_ key");
}
How do you stop the demo sending real email and SMS?
Route every outbound message through one function that checks the demo flag, then capture or drop the message there. Visitors type real addresses into invite forms and password resets. Without that check, your demo sends email to anyone a stranger names.
You have 3 workable options for email:
- Capture it. Mailpit acts as an SMTP server and gives you a web interface to view captured email. Point the demo's SMTP settings at it, and keep its interface private.
- Show it in the app. In demo mode, save the message to a table and show "the email this would have sent" on screen. The visitor still sees the email flow.
- Use the provider's test addresses for seeded accounts. Resend's test email page lists addresses such as
delivered@resend.devandbounced@resend.devthat simulate those events. They only cover addresses you choose, so they can't stand in for capture when a visitor types their own.
For SMS, Twilio's test credentials let you exercise parts of the REST API, including sending an SMS. With them, Twilio doesn't charge your account or connect to real phone numbers. The magic number +15005550006 passes validation as a From number.
Test it yourself before you share the link. Invite your own address from the demo and confirm nothing arrives.
Which keys and secrets can a demo use?
Give the demo its own keys for every outside service, separate from your own production. Google's Maps Platform security guidance recommends separate API keys for each application, to limit the damage from a compromised key and to manage quotas. Where a provider lets you, scope the key down. Stripe's keys page recommends restricted keys over secret keys, with permissions you control.
Cap what each key can spend. The OWASP guidance on unrestricted resource consumption says to configure spending limits for every service provider, and billing alerts where a limit isn't available. Set the cap at a level you'd shrug off if a bot found the demo.
Check what reaches the browser. Next.js's environment variable guide says a variable prefixed NEXT_PUBLIC_ is inlined, at build time, into any JavaScript sent to the browser. Anything with that prefix is public. Stripe's keys page says only publishable keys are safe to expose outside your back end. After a build, search the output:
grep -rE "sk_(test|live)_|rk_(test|live)_" .next/static
That catches the obvious cases. The guide to scanning source code you didn't write covers secret scanners that go further.
Shared demo login or a sandbox per visitor?
Start with a shared login that resets on a schedule, and move to a sandbox per visitor only when visitors keep tripping over each other. Here's how the main options compare:
| Option | What a visitor can try | What goes wrong | Work for you |
|---|---|---|---|
| Shared login, scheduled reset | Everything you didn't disable | Visitors see each other's changes until the reset | A seed script and a scheduled reset |
| Shared login, read-only role | Browsing and filtering | They can't try the main workflow | A role check on every write |
| Sandbox per visitor | Everything, in private | More databases or tenants to clean up | Create on first visit, delete after a few hours |
| Walkthrough video only | Nothing hands-on | Buyers can't check speed or details | Recording again after each update |
Whichever you pick, lock the demo account's own email and password. One visitor who changes them locks everyone else out until the next reset. Before you share a sandbox setup, run the 2-account permissions test so one visitor can't read another's records.
How do you reset demo data on a schedule?
Rebuild the database from a known state, clear uploaded files and sessions, and run it from a scheduler that only you can trigger. Rerunning migrations and the seed script always matches the current schema. Restoring a snapshot is faster when seeding takes minutes.
Postgres has a quick way to copy a seeded database. The Postgres template database docs say CREATE DATABASE works by copying an existing database, and you can name any database as the template. The catch is that no other sessions can be connected to the source while it's copied, and the command fails if any connection exists. Keep a seeded demo_template database that the app never connects to, and create each fresh demo database from it.
Protect the reset route. On Vercel, cron jobs call a path from your vercel.json with an HTTP GET request on the schedule you set. Vercel's cron management guide describes a CRON_SECRET environment variable that arrives as an Authorization header, so your route can check it and return 401 to anyone else. An unprotected reset route lets any visitor wipe the demo while someone else is using it.
How do you limit abuse and cost on a public demo?
Rate-limit anything a script could hammer, and turn off anything expensive or destructive. The OWASP guidance lists the controls: a limit on how often a client can call the API, tighter limits on single operations such as password recovery or OTP checks, and a maximum upload size.
In demo mode, disable or fake these:
- Account deletion, bulk export and system settings
- Outbound webhooks and "test connection" buttons
- AI model calls and other pay-per-use features
- File uploads beyond a small size and a short list of file types
Show a plain "Disabled in the demo" message when someone tries one. That tells the visitor the feature exists in the version they'd receive.
Decide whether search engines should index the demo. You probably want your listing to rank, not demo pages full of sample data. Google's noindex guide gives 2 ways: a <meta name="robots" content="noindex"> tag, or an X-Robots-Tag: noindex header. Don't also block the demo in robots.txt, or Google's crawler can't see the tag.
What should you check before you publish the demo link?
Open the demo in a private window and go through this list:
- The demo runs the same commit as the delivered files, and the listing says what differs
- Every page shows the demo banner
- Only
pk_test_,rk_test_andsk_test_Stripe keys are set, and the test-key guard is in place - An invite to your own address and a test SMS don't arrive
- Every outside service uses a demo-only key with a spend limit or billing alert
- No secret appears in the browser bundle
- The demo account can't change its email or password
- The reset runs, clears uploads and sessions, and rejects calls without the secret
- Logins, forms and uploads are rate-limited
- Expensive and destructive actions show "Disabled in the demo"
- You've decided on noindex
- The main workflow works from start to finish
How does a live demo fit a Zero to Hundred listing?
A listing needs a live demo URL or a walkthrough video on YouTube or Loom before it goes live. Either one works. If your app can't run safely in public, for example because every action calls a paid service, a walkthrough video covers it.
The demo stays on your own deployment, and the listing links to it. The license a Buyer gets is non-exclusive, so the same demo serves every Buyer who looks. When you ship an update, redeploy the demo from the new release and update the "what differs" note in the listing.
The listing help page covers what else to prepare. For the whole selling flow, read how to sell the software you built, then read what a listing needs before it can sell.