Sub topic 17
Launching and deploying
This chapter assumes you have a working MVP with accounts and access rules, and that you have tested it with a few real users. Launching means putting the app on a public address, switching real services on, and making sure you can undo a bad release. For a no-code or AI-built app, most of the work is configuration, not code.
What "launch" involves
A launch has five parts:
- A production environment that is separate from your test one.
- A domain name and HTTPS.
- Production credentials for every connected service.
- A check that access rules and webhooks work with real traffic.
- A way to see errors and to roll back.
Skipping the first item causes most launch trouble. If you test and serve real users from the same database, one experiment can damage real data.
Separate staging from production
An environment is a complete copy of the app with its own data and settings. Use at least two.
- Staging is for testing changes. It holds fake data and uses test keys.
- Production is what users see. It holds real data and uses live keys.
Many builders give you a preview URL and a published URL, but both may still point at one database. Check this explicitly. If your backend is a service such as Supabase, create a second project for production and run the same table and policy definitions in both.
Pre-launch checklist
Run through these in staging first, then repeat the important ones in production.
| Area | Check |
|---|---|
| Access | Sign in as two different users. Confirm each sees only their own rows. |
| Policies | Confirm row-level security is enabled on every table that holds user data. |
| Secrets | No API keys appear in page source, browser network calls, or shared project links. |
| Sign-up confirmation and password reset emails arrive and the links point to the production domain. | |
| Payments | A live-mode test purchase works and can be refunded. |
| Webhooks | Each external service points at the production URL and the signature check passes. |
| Errors | A broken form shows a readable message, not a stack trace. |
| Backups | You know how to restore the database, and a backup exists. |
Check the access rules by hand. An AI builder may report that your rules are in place when a table is open to anyone with the public key. Open a private browser window, call the data endpoint without signing in, and confirm it returns nothing.
Domain, HTTPS and redirects
A custom domain makes the product look trustworthy and lets you move platforms later without changing the address users know.
- Buy the domain from a registrar.
- In your hosting platform, add the domain and copy the DNS records it asks for. Typically that is a CNAME record for
wwwand an A record or ALIAS record for the bare domain. - Wait for DNS to propagate. This can take minutes or up to a day.
- Confirm the platform issues an HTTPS certificate. Most do this automatically once DNS resolves.
- Redirect
http://tohttps://and pick one ofwwwor bare as the main address.
After the domain changes, update every place that stores the old URL. These include the authentication redirect settings, the payment provider's success and cancel URLs, email templates, and webhook endpoints. Forgotten redirect URLs are a common cause of "sign-in works in staging but fails live".
Verify webhooks in production
Once your app is public, anyone can send requests to your webhook address. Check the signature before acting on an event. This example verifies 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);
}Use the raw body, not a parsed and re-serialized copy, because any change in whitespace changes the signature. Store the secret in the platform's environment settings. Production and staging should use different secrets.
If your no-code tool handles webhooks through a visual trigger, look for a "verify signature" option. If none exists, add a small function in front of it or restrict who can call it.
Release in stages
Launching to everyone at once hides problems until they are large. Release in widening circles.
Concrete options for limiting exposure:
- Invite-only sign-up. Require an invitation code or an approved email list during beta.
- Waitlist. Collect emails first and admit people in batches.
- Feature flag. A setting that turns a feature on for chosen users only. Some builders support this. Otherwise, add a boolean field such as
beta_enabledto the user record and check it in the screen or workflow.
Rollback
A rollback restores an earlier working version. Learn how yours works before you need it.
- Most hosted builders keep version history. Find the "restore" or "revert" control and try it once in staging.
- Code-generating builders often sync to a Git repository. Reverting means moving to an earlier commit.
- Rolling back the app does not roll back the database. If a release changed table structure, an older app version may fail against the new schema. Prefer additive changes, such as adding a column, over renaming or deleting columns during the beta.
Monitoring after launch
Plan for what you will look at in the first week.
- Error logs. Check the platform's logs daily. Add an error reporting service if the builder supports it.
- Uptime check. A free monitor that requests your home page every few minutes and emails you on failure.
- Usage limits. No-code plans cap records, workflow runs, API calls and storage. Look at current usage against the plan limit, since hitting one can stop the app without warning.
- Cost. Set a billing alert on every paid service, especially anything that charges per request, such as AI model calls.
- Support channel. Publish one email address or form, and answer within a day.
The numbers you choose to track belong to the next chapter. For launch, you only need to know the app is up, errors are visible, and users can reach you.
Common mistakes
- Leaving test mode on in the payment provider, so real customers cannot pay.
- Publishing with a development database that holds your fake records.
- Forgetting to update authentication redirect URLs after the domain changes.
- Sending the launch announcement before checking sign-up and password reset in production.
- Announcing widely on day one, then discovering a plan limit or a missing access rule.
- Making schema changes with no backup.
Exercise
Your staged release reached 15 beta users. A new version changed the status column of the tasks table to a different name, and users now see errors. You roll the app back to the previous version, but the errors continue. Why, and what should you have done differently?
Show answer
Rolling back the app does not roll back the database. The older app version still expects the status column, but the table now uses the new name, so queries fail. Make schema changes additive instead: add the new column, copy the data, update the app to use it, and remove the old column only after the new version is stable. Take a backup before any schema change so you can restore if needed.
Exercise
List three checks you would run in production, not only in staging, before announcing the launch, and say what each one protects against.
Show answer
Examples: (1) Sign in as two different users and confirm each sees only their own data, which protects against an open access rule. (2) Make a live-mode payment and refund it, which protects against test mode or wrong keys blocking real customers. (3) Trigger a webhook from the production service and confirm the signature check passes, which protects against forged events and wrong endpoint or secret settings. Other valid answers include testing password reset links on the production domain or calling the data endpoint while signed out.