01 · The gaps
What is missing between a demo and a production app?
A demo is usually missing the same five things, whether it came from a founder's weekend, a vendor's first sprint or an AI builder. The table lists each gap and what closing it looks like.
| Area | What a demo usually has | What production needs |
|---|---|---|
| Authentication and permissions | A login screen, one role, checks in the browser only | Server-side checks on every request, roles, session expiry, password reset, no shared admin account |
| Data | One database, no backups, schema edited by hand | Backups you have restored once, versioned migrations, separate staging and production data |
| Secrets and configuration | Keys in the code or in the repository history | Keys in environment configuration, rotated, with different values per environment |
| Tests | None, or a few that no longer run | Automated tests on sign-up, payment, permissions and the main data flows, run on every change |
| Deploy | Run from one laptop or a builder's publish button | A scripted build and release that anyone on the team can run, with a way to roll back |
| Monitoring | Nobody knows it is down until a user says | Error tracking, uptime checks, logs you can search, an alert that reaches a person |
02 · First
How do you make authentication and permissions production-ready?
Move every permission check to the server, because a check that lives only in the browser is a suggestion.
- 01
A demo often hides the admin button for ordinary users but lets any logged-in user call the admin request directly.
- 02
If the app uses a hosted database such as Supabase, the database itself can enforce who sees which rows. Its documentation says to enable row level security on every table in an exposed schema, and that without it any role with a grant on the table can read and write it (read 17 Nov 2026, Supabase docs). With security on and no policies, access through the public key is blocked until you write them. Our security review guide lists the other common gaps.
03 · Second
What does a production data layer need?
It needs backups you have tested, changes made through versioned migrations, and separate environments.
- 01
A backup nobody has restored is a hope, so restore one into a scratch database and check the numbers.
- 02
Replace hand-edited schemas with migration files kept in the repository. Then staging can be built from the same files as production, and a failed change can be reviewed instead of remembered. Decide now who owns the data and where it lives, because moving it later is the expensive part of any rescue. Check too what personal data the app stores, since that decides how long you keep it and who may see it, and write the answer down before launch.
04 · Third
Which tests should you write first?
Write tests around the paths that lose money or trust if they break: sign-up, login, payment, permissions and the one or two flows the business depends on.
- 01
Skip broad coverage targets at the start.
- 02
These tests pin current behaviour so that later changes can be checked instead of hoped for. This is the same idea we describe for legacy code in our technical debt reduction work. Run them on every change, in a pipeline, not on one person's machine.
05 · Fourth
How should a production app be deployed?
Deploy from a script in the repository that builds the app, runs the tests and releases to a named environment.
- 01
If only one person or one builder button can publish, you have a single point of failure. If the app was made in a hosted builder, check whether you can export the code and run it elsewhere, and who holds the accounts it depends on, before you need to.
- 02
Keep the previous release available so you can roll back in minutes. Add a staging environment that matches production closely, and try each release there first. Our production checklist for Lovable, Bolt and Replit apps covers the export and hosting questions those tools raise.
06 · Fifth
What monitoring does a new production app need?
You need to learn about failures before your users report them.
- 01
That takes error tracking, an uptime check on the public address, logs you can search, and an alert that reaches a named person.
- 02
Start with the smallest set and add to it when something slips through. An app that only works while its author watches it is still a prototype, however good it looks. Write down who gets the alert and what they do first. An alert that nobody owns is noise.
07 · Sequence
In what order should you close the gaps?
Audit
Read the code and list what exists, what is risky and what to fix first. A code audit is built for this.
Lock down access
Fix permissions and move secrets out of the code. Rotate any key that was ever committed.
Protect the data
Take and test a backup, then put schema changes under version control.
Add tests and a pipeline
Cover the paths that matter and run them on every change.
Deploy, then watch
Release from the script, switch on monitoring and write down who responds.
08 · Help
When should you bring in a rescue team?
Bring one in when the gaps are wider than your team can close before a launch date, or when changes in one place keep breaking another.
- 01
AceMQ engineers can take over the code, audit it first and ship it. See software project rescue and the signs a project needs rescue.
- 02
After go-live, AceMQ can run the result under a support plan; see supported after migration. Ace8 is the modernization practice of AceMQ.