Sub topic 16
Launching and deploying
This chapter assumes you have a working MVP in a no-code tool or AI app builder, with accounts and access rules in place and basic security reviewed. Launching means putting that app in front of real users on a stable address. It is a controlled release, not a big announcement.
What deployment means on these platforms
Most builders give you two environments. A preview or development version is where you edit and break things. A published or production version is what users see. Publishing copies the current state of the app to production.
Two things often do not copy over automatically:
- Data. Test rows in your development database may be separate from production data. Check which database each environment uses.
- Settings. API keys, webhook URLs and payment keys often differ between test and live modes.
A pre-launch checklist
Work through these in order.
- Switch to live credentials. Replace test keys for payments and email with live keys. Store them in the platform's secrets or environment settings, never in page text or prompts.
- Confirm access rules. Sign in as two different users and check that neither sees the other's rows. For a database like Supabase, confirm row-level security is on.
- Verify webhooks. If a service sends events to your app, check the signature before acting on them. The function below checks an HMAC-SHA256 signature against the raw request body.
import { createHmac, timingSafeEqual } from "node:crypto";
// Verifies an HMAC-SHA256 signature (hex) sent by a service with a shared secret.
export function isValidSignature(rawBody, signatureHex, secret) {
const expected = createHmac("sha256", secret).update(rawBody).digest();
const received = Buffer.from(signatureHex, "hex");
return received.length === expected.length && timingSafeEqual(received, expected);
}- Set up a custom domain and HTTPS. Point your domain at the platform using the DNS records it gives you. Wait for the certificate to be issued before sharing the link.
- Test the core flow on production. Sign up, complete the one core flow, and sign out, using a real device.
- Prepare a way to hear about problems. Add a support email, and turn on error alerts if the platform offers them.
Release in stages
Avoid sending the link to everyone at once. A staged release limits the damage if something breaks.
The first group should be people from your validation interviews. They already have the problem, so they will tell you whether the app solves it.
Plan for rollback and backups
Publishing is easy to repeat, but a bad publish can still hurt. Before you change a live app:
- Check whether the platform keeps version history and lets you restore an earlier version.
- Export or back up your database before any schema change.
- Make changes in the development environment first, then publish.
Common errors
| Symptom | Likely cause |
|---|---|
| Login works in preview but not on the live domain | The allowed redirect URL still lists the preview address |
| Payments succeed but the app does not update | Webhook points to a test URL or fails signature checks |
| Users see an empty list | Production database has no data, or access rules block the rows |
| Browser shows a security warning | Domain is not yet using a valid HTTPS certificate |
Exercise
You publish your app and a tester reports that sign-in sends them back to an error page on your custom domain. Sign-in worked in preview. What do you check first?
Show answer
Check the authentication settings for the allowed redirect (callback) URLs. They probably list only the preview address, so add the custom domain, then retest on production.
Exercise
Why should you verify a webhook signature against the raw request body instead of trusting the event?
Show answer
Anyone can send a request to your webhook URL. A valid signature, computed with the shared secret over the raw body, shows the request came from the real service and was not altered. Parsing and re-serializing the body first can change it and break the check.