Is your vibe-coded app ready for production? A checklist
An ordered checklist for taking an app built with Lovable, Bolt, Replit, v0, Cursor or Claude Code to production: secrets, database access, configuration, dependencies, the server, backups and monitoring.
TL;DR
- Scan the repository's whole history and the built JavaScript for secrets, and rotate anything that was ever exposed.
- If the app uses Supabase (opens in a new tab), every exposed table needs Row Level Security with real policies: the public key is fine, an open table is not.
- Set build-time variables at build and server variables on the server, then run the app on a hardened server with HTTPS, backups you have restored once and an alert that reaches you when it is down.
- No checklist finds every bug: authorization in your own code, business logic and abuse need tests and a second pair of eyes.
On this page
A vibe-coded app is ready for production when strangers cannot reach data that is not theirs, no secret is exposed, it runs correctly outside the builder's preview, and you will find out when something breaks and be able to restore it. For a typical app built with Lovable (opens in a new tab), Bolt (opens in a new tab), Replit (opens in a new tab), v0 (opens in a new tab), Cursor (opens in a new tab) or Claude Code (opens in a new tab), that comes down to the checks below, in the order to do them, each with how to check it and where a deeper article shows the details.
The builder's preview hid three things: strangers (the production domain is everyone's, including people who read your JavaScript), real data (test rows become customers' names and orders) and a server someone has to keep patched, backed up and running.
How to use this vibe-coded app production checklist
- Go in order. Sections 1 and 2 protect your users' data; finish them before anyone signs up. Sections 3 to 7 keep the app working and recoverable.
- Check, then tick. Every item has a check you can run and see pass or fail. "The AI said it added security" is not a check.
- Write down what you find: what was checked, when, what was fixed, in a short file in the repository.
- Repeat it. Run sections 1 and 2 again after every database change and before every large release: AI tools change a lot of code quickly, and a policy that was right last month may not cover this month's new table.
Most items can be checked on the repository and the database before the app is deployed; the deploy itself is covered in how to deploy an app you built with AI to your own server.
1. Secrets
A secret is any value that grants access, such as an API key, a database password, a token or a signing secret; a leaked one lets someone act as your app.
1.1 No secret in the repository or its history. An AI tool can write a key straight into a config file, and a later "fix" moves it to an environment variable without removing it from the history. In a test for this series, gitleaks found nothing in the files of a repository and a planted key in its first commit. Check: gitleaks git and trufflehog git over the repository, plus a git grep for your providers' key prefixes. Details: how to scan a git repository for leaked secrets.
1.2 No secret in the frontend. Values in VITE_, NEXT_PUBLIC_ and similar variables are compiled into the JavaScript that every visitor downloads. A Supabase URL and its publishable key belong there; a Stripe secret key, a Supabase secret key or an OpenAI key never do. Check: build the app and search the output folder (dist/ or .next/static) for each secret's prefix, for example grep -r "sb_secret_" dist/. Details: environment variables in production explains which values end up in the bundle.
1.3 Env files stay out of Git. Check: .gitignore lists .env and .env.* (with !.env.example if you keep an example), and git ls-files | grep env shows only the example.
1.4 Anything ever exposed is rotated. A key that was in a commit, a public bundle, a screenshot or a shared chat counts as leaked, even if you deleted it. Rotating it, making a new one and revoking the old, is what makes the leak harmless; removing it from Git history comes second, if at all. Check: for each finding from 1.1 and 1.2, the old key no longer works at the provider.
1.5 Secret keys live only on the server. Check: each secret is in the server's environment or your deploy tool's secret store, readable only by the app, and nowhere in the repository.
2. Who can reach your data
Lovable's built-in backend runs on Supabase, and many other AI-built apps use Supabase or Firebase (opens in a new tab). In both, the browser talks to the database's API directly. That design is safe only if the database itself decides who may see each row.
2.1 Every exposed table has Row Level Security on. The Supabase anon key, now called the publishable key, is meant to be public. What protects your data is Row Level Security (RLS): without it, a table in the public schema can be read, changed and deleted by anyone with your project URL and that key, and both are in your JavaScript. Tables created in the Supabase dashboard have RLS on by default; tables created with SQL, for example in migrations an AI tool writes, do not. Check: in the SQL Editor, list the tables in public with relrowsecurity false (the query is in the article linked below), or open Advisors, then Security Advisor, and look for 0013_rls_disabled_in_public. Details: the Supabase anon key is public; Row Level Security is what protects you.
2.2 Each table has policies that match what users should do. RLS with no policy blocks everything, which is safe but breaks the feature. A policy with using (true) allows everything, which looks like security and is not. Check: every table has a policy per action it needs (select, insert, update, delete), owner-only data compares auth.uid() with the owner column, and the list of policies whose condition is just true contains only data that really is public.
2.3 Test as a stranger and as another user. Check: call the API with only the public key and confirm private tables return nothing and writes are refused. Then sign in as test user A and try to read and change user B's rows. Both must fail.
2.4 The admin key never reaches a browser. Supabase's secret key, and the older service_role key, bypass RLS entirely. Check: it appears only in server code, such as an Edge Function or your own API, never in a public variable or client file.
2.5 Your own API routes check who is asking. If the app has server routes (Next.js (opens in a new tab) route handlers, an Express API, Edge Functions), each one that reads or changes user data must check the signed-in user and that the record belongs to them. RLS cannot help when a route uses the secret key. Check: for each route, call it signed out and as another user, and confirm it refuses.
2.6 Sign-up and sign-in are configured for production. Check: the auth provider's site URL and redirect URLs list the production domain, not the preview; email confirmation works from the real domain; test accounts and default passwords are gone. The redirect settings are covered in the guide to deploying an AI-built app.
3. Configuration that works outside the preview
3.1 Build-time values are set at build time. Public variables are baked into the JavaScript when the app is built, so setting them on the server afterwards changes nothing; server variables must be given to the running process. A value set in the wrong place is undefined after deploy. Check: search the built output for each public value, and start the server with a check that exits when a required variable is missing. Details: environment variables in production.
3.2 No localhost or preview URLs in the build. Check: grep -rnoE 'https?://(localhost|127\.0\.0\.1)(:[0-9]+)?' dist/ finds nothing, and neither does a search for your builder's preview domain.
3.3 Production mode is on. Check: the app runs with NODE_ENV=production (or your framework's equivalent), debug pages and verbose error output are off, and error messages shown to users do not include stack traces.
3.4 The first deploy's usual errors are fixed. A 404 when refreshing a page, CORS errors, 502 from the proxy and blocked mixed content all come from the move to a real server. Check: refresh a deep link, sign in, and load every page with the browser console open. Details: 404 on refresh, CORS and 502: fixing an app after its first deploy.
Before you release, see what to check in a staging environment with production-like configuration and test data.
4. Dependencies
4.1 No known vulnerabilities you have not looked at. Check: npm audit lists known vulnerabilities in your dependency tree and exits with an error when there are any (--audit-level sets the severity that counts). Read the list; update what is used in production.
4.2 Updates keep arriving. Check: the lockfile is committed, and something proposes updates regularly, such as GitHub (opens in a new tab)'s Dependabot.
4.3 Every dependency is one you meant to add. Check: skim package.json. Remove packages the app no longer uses, and look up any name you do not recognise before you trust it.
5. The server and the deploy
5.1 It deploys the same way every time. A deploy from a repository, through a pipeline or a script, beats copying files by hand, because you can repeat it and roll it back. Check: you can deploy a change by pushing it. For the steps, see how to deploy an app you built with AI to your own server, the builder-specific guides such as deploying a Lovable app, and how to deploy a web app to a VPS for the server side.
5.2 HTTPS everywhere. Check: http:// redirects to https://, the certificate renews automatically, and the browser console shows no mixed-content warnings. Browsers treat localhost as secure, so mixed content only shows up once you are on a real domain.
5.3 The server is hardened. Check: SSH accepts keys only, a firewall lets in only SSH and web traffic, security updates install themselves, and the app does not run as root. How to harden an Ubuntu server walks through it, with deeper articles on securing SSH and automatic security updates.
5.4 Only the web server is reachable from the internet. Docker's docs say traffic to a published container port is routed "before the firewall rules can be applied", so a UFW firewall does not protect it. Check: from another machine, scan your server's ports; only 22, 80 and 443 should answer, and the database port should not. Docker ignores your UFW firewall explains the cause and the fix.
5.5 Files that should not be public are not. Check: https://your-domain/.env and https://your-domain/.git/config return 404, not a file.
6. Backups you have restored
6.1 The database is backed up, off the server. On Supabase Cloud, the Free plan has no automatic backups; Pro keeps daily backups for 7 days. On your own server, backups are entirely yours. Check: you know where last night's backup is, and it is not only on the same machine.
6.2 A restore has worked once. Check: restore the latest backup into a scratch database and open the app against it. Backups for a small production server that you can restore shows how.
6.3 Uploaded files are backed up too. User uploads in object storage or on disk are not in the database dump. Check: they are in the backup, or the bucket has versioning or its own copy.
7. Knowing when it breaks
7.1 An uptime check from outside. Check: a monitor requests your site every few minutes and alerts you by email or phone when it fails. Test the alert by stopping the app once.
7.2 Disk, memory and certificate alerts. Check: you are alerted before the disk fills up and before a certificate expires. Monitoring a small server shows how.
7.3 Logs you can read. Check: you know the one command that shows the app's recent logs, and errors there include enough context to find the cause without exposing secrets or users' personal data.
7.4 A way back. Check: you can roll back to the previous version in minutes, and you know whether that also rolls back the database.
8. Decide where the backend lives
Many builder apps run on Supabase Cloud. Keeping it while you move the frontend to your own server is a sound first step. Before running Supabase yourself, know that the official self-hosted setup leaves backups, upgrades, HTTPS, auth emails and monitoring to you, and some platform features do not exist there. Self-hosted Supabase vs Supabase Cloud compares them with November 2026 prices.
What a checklist cannot catch
This list catches common, mechanical mistakes. It does not catch:
- Logic errors in your own code. A route that returns an order by its id without checking whose order it is, a discount code that can be applied twice, a role check done only in the browser. Scanners do not understand what your app is supposed to do. Tests that sign in as two different users and try each other's data do.
- Unknown key formats. Secret scanners find the formats they know. In the scan test for this series, two scanners disagreed about a Supabase-style key. A clean scan lowers the risk; it does not prove there is nothing.
- Abuse. Sign-up spam, scraping, someone calling your paid AI endpoint in a loop. These need rate limits, quotas and spending caps at your providers, decided for your app.
- What the AI changes next. Every regenerated file can undo a fix.
- Legal and compliance duties. Privacy notices, data processing agreements, where personal data may be stored.
Doing this with OpsCrew
OpsCrew is an open-source tool that deploys an app from its GitHub repository to a server on your own cloud account, and several items on this list are what it checks and sets up:
npx opscrew scanis free and checks the repository for leaked secrets, exposed Supabase or Firebase data such as tables without Row Level Security, and risky configuration, including env files that Git does not ignore; each finding names its file and line (sections 1 and 2).- On a server it sets up, the server gets a
deployuser with key-only SSH, a firewall that lets in only SSH and web traffic, fail2ban and automatic security updates, with container ports kept off the internet except the proxy's (section 5). npx opscrew verifychecks the live site's DNS, HTTPS, health endpoint and headers, and that.envand.gitare not served;npx opscrew securere-checks the server's hardening (sections 5.2 to 5.5).
See what OpsCrew sets up and checks. It does not replace the tests in 2.3 and 2.5, and it cannot see policies or tables that exist only in your database and not in your repository.
Where to go next
Start with a secret scan of the repository's history and Row Level Security on every Supabase table. When the app is ready to move, deploy it to your own server and harden that server.
Key facts
| Fact | Value | Source |
|---|---|---|
| Supabase Security Advisor, public table without RLS | 0013_rls_disabled_in_public, level ERRORAnyone with your project URL can read, edit, and delete all data in this table. | Database Advisors (opens in a new tab)Verified on |
| GitHub secret scanning on public repositories | Free, over the entire historyPrivate organisation repositories need GitHub Secret Protection (Team or Enterprise plan). | About secret scanning (opens in a new tab)Verified on |
| Backups on Supabase Cloud's Free plan | NonePro keeps daily backups for 7 days, Team for 14. | Supabase pricing (opens in a new tab)Verified on |
Frequently asked questions
Can I trust code written by AI in production?
Treat it like code from a fast new colleague: useful, and in need of review. Test the important flows, especially sign-in, payments and anything that reads or changes user data, with two different test accounts.
Do I need a security expert before launching?
Not for a typical small app, if you work through a checklist like this one and fix what it finds. If the app handles payments directly, health or financial data, or many users' personal data, pay for a review by someone experienced before launch.
Sources
- Row Level Security (opens in a new tab)
- Understanding API keys (opens in a new tab)
- Database Advisors (opens in a new tab)
- Supabase pricing (opens in a new tab)
- About secret scanning (opens in a new tab)
- Removing sensitive data from a repository (opens in a new tab)
- npm audit (opens in a new tab)
- Env variables and modes (opens in a new tab)
- How to use environment variables in Next.js (opens in a new tab)
- Packet filtering and firewalls (opens in a new tab)
- Mixed content (opens in a new tab)
- Security: what OpsCrew sets up and checks (opens in a new tab)
Related articles
- Deploying
How to deploy an app you built with AI to your own server
From a Lovable, Bolt.new, Replit, v0 or Claude Code project to a live URL on a server you control: code, build, backend, secrets, HTTPS and what breaks on the way.
- AI and DevOps
AI DevOps agents for small teams: what they can do safely
What an AI agent for DevOps does well for a team without an ops person, where it goes wrong, and the rules that let it work on real infrastructure: read-only first, reviewed changes, approvals bound to what you reviewed, narrow credentials, no secrets in the chat.
- AI and DevOps
Claude Code for DevOps: skills, MCP and approvals
What Claude Code offers for operations work per Anthropic's docs (permission modes, rules, hooks, the sandbox, skills, MCP, plugins, CI), with a tested setup that stops it changing infrastructure and a read-only triage skill.