LovableReplitvibe codingsecurityproduction checklistsmall business

You Built Your App in Lovable or Replit. Here's How to Take It to Production.

Published Last updated Wolfgang Solutions
Teal wave of data rising over a grid of code blocks

You shipped. That's the hard part, and you should feel good about it.

Whether you used Lovable, Replit, Bolt, v0, or Cursor, you took an idea and turned it into a working application, maybe in a weekend. These AI app builders are impressive tools, and they let people build software who couldn't a few years ago.

What nobody puts in the launch post is how far "it works in the preview" is from "it works for 500 paying customers." That gap is full of security holes, missing backups, and hosting decisions that AI code generators consistently get wrong. This guide is the checklist we use to close it.

The short version. To take a Lovable or Replit app to production: (1) get your code into a GitHub repository you control, (2) decide whether to stay on the platform's hosting or move to your own, (3) move every secret server-side and rotate anything that was ever in the browser, (4) review database access rules and auth, (5) prove you can restore a backup, (6) set up monitoring and alerts, (7) put it on your own domain with working email, (8) handle payments and privacy basics, (9) cap your costs, and (10) run the pre-launch security checklist below before real customers sign up.

The Numbers Are Sobering

This isn't theoretical. Researchers have been scanning vibe-coded applications at scale, and the results should make any founder pause before sending real users to an app with real data.

A scan of 5,600 vibe-coded applications found over 2,000 vulnerabilities, more than 400 exposed secrets (API keys, database credentials), and 175 instances of exposed personally identifiable information. Out of 1,645 Lovable-created web apps specifically examined, 170 allowed anyone to access user data, including names, emails, financial records, and API keys, with no authentication required. That finding became CVE-2025-48757, and our breakdown of it includes a two-minute Supabase RLS check you can run on your own app.

Veracode's research across 100+ large language models found that 45% of AI-generated code contains security flaws, with 86% failing to defend against cross-site scripting. These aren't edge cases. This is the baseline.

What AI App Builders Get Wrong

This isn't about bashing Lovable, Replit, or any other tool. They solve a real problem. The issue is that AI code generators optimize for making code run, not making code safe. Here is what consistently falls through the cracks:

Authentication and access control. This is the big one. Researchers found Lovable-generated Supabase backends with access control logic that blocked authenticated users while allowing unauthenticated ones, the exact opposite of what you want. Row-level security policies get skipped or written to let everyone through. Admin endpoints are left unprotected.

Secrets in source code. AI assistants routinely generate code with API keys, database passwords, and tokens written directly into source files. Of the Lovable apps scanned, 10 out of 38 had Supabase credentials exposed directly in their client-side code. Anyone who opens browser developer tools can see them.

No rate limiting. You asked for a login form, and you got one. You didn't ask for one that can't be hammered 10,000 times a second, so you probably didn't get that.

Input validation. AI-generated code frequently trusts user input, which opens the door to SQL injection, cross-site scripting, and other attacks that have been preventable for decades.

No infrastructure thinking. No error monitoring, no logging, no tested backup, no deployment pipeline. The app works in the preview, and there is no plan for when it breaks at 2 AM on a Saturday.

In February 2026, a social site called Moltbook, built entirely through vibe coding, was found with a misconfigured database exposing 1.5 million authentication tokens and 35,000 email addresses. Nobody reviewed the infrastructure before launch.

Step 1: Own Your Code

Before anything else, get a copy of your code into a repository you control. If the platform account gets locked, a teammate deletes the wrong thing, or you decide to move, this is what saves you.

  • Lovable: connect the project to GitHub under Project settings → Git. Per Lovable's docs, it creates a new repository (private by default) and keeps it in two-way sync: changes in Lovable go to GitHub, and pushes to the synced branch come back into Lovable. It syncs one branch at a time and can't attach to a repository that already exists. On paid plans you can also download the codebase directly.
  • Replit: use the Git pane to connect a GitHub repository and push your commits, or use git and the GitHub CLI from the Shell.

Once the code is in GitHub, turn on branch protection for main so nothing reaches production without a pull request, and make sure at least two people (or one person and a trusted technical partner) have admin access to the repository.

Step 2: Decide Where It Runs

You have two reasonable options, and staying put is often the right one.

Stay on the platform's hosting. Lovable hosts published apps with HTTPS included, on a lovable.app address or a custom domain (custom domains need a paid plan). Replit publishes apps as Autoscale, Static, Reserved VM, or Scheduled deployments on Google Cloud, hosted in the US. For an early product with modest traffic and no special compliance needs, this is usually the cheapest and least fragile choice.

Move to your own hosting. It starts to make sense when you need a staging environment, a customer requires you to control where data lives, you want one bill and one set of access controls for all your infrastructure, or your costs on the platform climb past what the same workload costs elsewhere. For Lovable apps, Lovable's own guide to hosting outside Lovable is the place to start, and the first thing it asks is which stack you have:

  • Apps created from May 13, 2026 use TanStack Start and run server code, so the host has to run a server, not just serve files. Lovable's docs cover managed platforms that detect the build automatically (Vercel, Netlify, Cloudflare Pages) and container or server deployments.
  • Older apps are React + Vite and build to static files in dist/, which any static host or CDN can serve, as long as every route falls back to index.html.

For Replit apps, the same choice applies: a managed platform, a container host such as Railway, or your own cloud account. When we move an app for a client, our default is the client's own AWS account with the infrastructure written in Terraform, so it's documented and can be rebuilt. The right answer depends on your traffic, budget, and who will maintain it.

Moving the frontend doesn't force you to move the database. A Lovable app can keep using its built-in backend from a new host, and you can migrate the data to your own Supabase project later as a separate step.

Step 3: Environment Variables and Secrets

This is where the most damaging mistakes hide.

  • Anything that starts with VITE_ is public. Lovable's docs are explicit that VITE_ variables are embedded at build time, which means they end up in the JavaScript every visitor downloads. A Supabase URL and publishable key are designed to be public. A Stripe secret key, an OpenAI key, or a service-role key is not.
  • Server-side secrets go in the platform's secret store. Lovable Secrets are encrypted, injected into Edge Functions, and never reach the browser. Replit's own security checklist says to use Replit Secrets for API keys and keep them out of client-side JavaScript, local storage, and session storage.
  • Rotate anything that was ever exposed. If a key was ever in frontend code, a public repository, a screenshot, or a chat with an AI tool, generate a new one at the provider and delete the old one. Assume it was copied.
  • Use separate keys for development and production, so a test script can't touch live customer data or charge real cards.

Step 4: Lock Down the Database and Auth

Most Lovable apps run on Supabase, either the built-in backend or a project you connected. Supabase lets the browser talk to the database directly, which is only safe if Row Level Security (RLS) is on for every table and every policy is correct.

  • Review every RLS policy. Lovable's security guidance says it sets up basic policies automatically but that you should review and adjust them early. A policy that's "enabled" but allows everyone is still open. Our CVE-2025-48757 write-up walks through the exact query and the logged-out test to prove it.
  • Watch for code that bypasses RLS. Server code using the service role skips RLS entirely, so it has to check permissions itself. This is where "users can see each other's invoices" bugs come from.
  • Test auth like a stranger would. Sign up with a second account and try to open the first account's records by changing IDs in the URL or the request. Check password reset, email verification, and what happens to sessions after a password change.
  • Rate limit login, signup, and password reset, and turn on leaked-password protection if your auth provider offers it.
  • Replit apps get two databases. Per Replit's docs, the development database is for building and the production database serves your published app. Agent can't modify production, and schema changes from development are applied when you publish, so review those changes before you hit Publish.

Both platforms ship scanners worth running. Lovable runs a Quick scan on every publish and offers a Deep scan of your app's logic, and its own security overview says plainly that these tools don't replace a thorough security review for apps handling sensitive data. Treat a clean scan as the floor, not the finish line.

Step 5: Backups You've Actually Restored

A backup you haven't restored is a hope, not a backup.

  • Know what you have. Lovable backs up the database daily and keeps roughly 14 days. Those backups cover the database only, not uploaded files in storage.
  • Keep a copy off the platform. Lovable can export the full database as a PostgreSQL archive. That export does not include storage files, edge function code, secrets, or sign-in provider settings, so back those up separately. For Replit or your own hosting, schedule a database dump to storage you control.
  • Do a test restore. Load last night's backup into a scratch database and confirm the app runs against it. Then write down how long it took. That number is your real recovery time.

Step 6: Monitoring and Alerts

You want to find out something is broken before a customer emails you.

  • Uptime check on the home page and on one endpoint that touches the database, alerting a phone, not just an inbox.
  • Error tracking on both the frontend and backend, so you see the stack trace instead of a vague "it's not working."
  • Logs you can search for at least a few weeks. Lovable has a Logs view for the built-in backend, and Replit's monitoring shows uptime, requests, resource usage, and logs for published apps.
  • A named person who gets the alert. "Everyone" means no one.

Step 7: Domain, SSL, and Email

  • Register the domain in an account your business owns, with two-factor authentication on, not in a contractor's or the platform's account.
  • SSL is handled for you on both platforms' hosting, including custom domains on Lovable. If you self-host, automate certificate renewal so it doesn't expire on a holiday.
  • Set up SPF, DKIM, and DMARC for the domain that sends your password resets and receipts. Without them, your most important emails land in spam.

Step 8: Payments and Compliance Basics

  • Never handle raw card numbers. Use your payment processor's hosted checkout or payment elements so card data goes straight to them. It keeps you out of most PCI scope.
  • Calculate prices and grant access on the server. If the browser tells your backend what the price was, someone will change it. Verify payment webhooks with the processor's signature before you grant access to anything.
  • Publish a privacy policy and terms that match what the app actually collects.
  • Know your data. Health information, financial records, or data about kids each come with legal obligations. If any of that is in your app, get advice before launch, not after a customer asks.

Step 9: Load and Cost

Both platforms bill partly on usage. Lovable charges run credits for backend activity and AI features, and Replit bills published apps and production databases on compute, requests, and data transfer. That's fair, and it also means a bot or a bug can run up a bill overnight.

  • Set spending limits and alerts on the platform, your cloud account, and every AI API key. If you move to AWS, our AWS cost optimization guide covers the five places small businesses overpay most.
  • Rate limit anything that calls an AI model, per user and overall.
  • Add database indexes for the queries your main screens run. Slow queries are the most common reason an app that felt fast with 10 users crawls with 1,000.
  • Run a simple load test against staging with a few hundred simulated users before a launch or a marketing push.

The Pre-Launch Security Checklist

Run through this before real customers sign up. If you can't check a box, that's your to-do list.

  • Code is in a GitHub repository the business owns, with branch protection on main
  • No secret keys in frontend code or VITE_ variables; server secrets in the platform's secret store
  • Every key that was ever exposed has been rotated
  • RLS is enabled on every table, and every policy limits rows to the right user or team
  • Server code using the service role checks permissions itself
  • A second test account cannot read or change the first account's data
  • Login, signup, and password reset are rate limited
  • File uploads check type and size, and storage buckets aren't public unless they need to be
  • User input is validated on the server, not just in the form
  • The platform's security scan has been run and every critical finding is fixed
  • A backup has been restored successfully, and an off-platform copy exists
  • Uptime and error alerts reach a named person's phone
  • The domain is in the business's account with two-factor authentication
  • SPF, DKIM, and DMARC are set for the sending domain
  • Payments use hosted checkout, prices are set server-side, and webhooks are verified
  • Spending limits are set on hosting, database, and AI APIs
  • Admin pages require an admin role, not just a login

When to Bring In a CTO or a Security Review

You can do much of this yourself. Bring in help when:

  • Real customer data or payments are already in the app, and nobody technical has reviewed it.
  • The scanner reports findings you don't understand, or you fixed them by asking the AI and aren't sure the fix is real.
  • A customer, investor, or insurer sends a security questionnaire.
  • You're about to hire developers or an agency and need someone to own the architecture first. Read why you need a CTO who ships before you need a dev team.

We've Seen the Code. We Can Help.

We work with founders and small businesses who built something real and need it production-ready. We're not here to judge your codebase or tell you that you should have hired a developer from day one. You shipped, and that matters.

What we do is practical. Our AI security reviews and penetration testing find the critical vulnerabilities before they become incidents. Our web and app development work moves apps onto solid hosting, with backups, monitoring, and a deploy pipeline. And when you need someone to own the technical side going forward, we act as your fractional CTO.

If you've built something with Lovable, Replit, or any AI tool and you're wondering whether it's ready for real customers, book a free 30-minute assessment. A security review before launch is far cheaper than a breach after one.

Frequently Asked Questions

How do I move my Lovable app to production?
Connect the project to GitHub so you own the code, decide whether to stay on Lovable's hosting or deploy to your own, move every secret key out of frontend code and VITE_ variables into Lovable Secrets, review every Row Level Security policy on your database, confirm you can restore a backup, set up uptime and error alerts, connect your own domain, and run Lovable's security scan plus a pre-launch checklist before real customers sign up.
Can I deploy a Lovable app to my own hosting?
Yes. Lovable documents how to host outside Lovable. Apps created from May 13, 2026 use TanStack Start and need a host that runs server code, such as Vercel, Netlify, Cloudflare Pages, a container, or your own server. Older React + Vite apps build to static files that any static host or CDN can serve. The app can keep using Lovable's built-in backend after the frontend moves, or you can migrate the database to your own Supabase project.
How do I take a Replit app to production?
Push the code to a GitHub repository using Replit's Git pane, store API keys in Replit Secrets rather than client-side code, review the schema changes that will be applied to your production database when you publish, pick the right deployment type (Autoscale, Static, Reserved VM, or Scheduled), connect a custom domain, and set up monitoring. Then run the same security checklist you would for any app with real customer data.
Is my Lovable app secure?
Not automatically. Lovable sets up basic database policies and scans your app when you publish, but its own documentation says those tools don't replace a thorough security review. The most common problems are database tables readable by anyone, secret keys exposed in frontend code, server code that bypasses access rules, and missing rate limits on login. Test with a second account and a logged-out request before you trust it with customer data.
What should be on a Lovable app security checklist?
At minimum: code in a GitHub repository you own, no secret keys in frontend code or VITE_ variables, rotated keys for anything ever exposed, RLS enabled with correct policies on every table, permission checks in any server code that uses the service role, rate limits on login and password reset, server-side input validation, a successful test restore of your backup, uptime and error alerts, verified payment webhooks, and spending limits on hosting and AI APIs.
Do I need to rewrite my entire app if it was built with an AI tool?
Usually not. Most AI-generated codebases need targeted fixes, such as correcting authentication and database access rules, moving secrets server-side, adding rate limiting, and setting up backups and monitoring, rather than a full rewrite. A code review identifies the specific issues so you can fix the ones that matter first.
What is vibe coding and why is it a security risk?
Vibe coding is a term coined by Andrej Karpathy for using AI to generate code without deeply reviewing or understanding it. It's a security risk because AI code generators optimize for making code work, not making it safe, and they consistently skip access control, input validation, rate limiting, and infrastructure basics that experienced developers build in by default.