How to take a Lovable app to production

By

Published

Updated

A small product model moves from paper supports onto a solid foundation with a blue safety rail

Taking a Lovable app to production means owning the code and the database, fixing the database access rules, moving secrets and payment logic to the server, and adding a staging copy so changes get tested before real users see them. Where you host it matters less than people think.

Lovable is great for getting a product in front of people fast. The trouble starts when that app needs to hold real customers and real money. Then you need to know who owns the code, whether customer data is actually private, and what happens if a change breaks sign-up on a Friday night.

I take Lovable apps to production as part of my work. This is what I check and set up, in order.

1. Connect GitHub and own the repository

Connect the Lovable project to GitHub first, under your account or your company’s, not a freelancer’s.

Lovable syncs both ways (opens in a new tab) with one branch, usually main. Changes you make in Lovable go to GitHub, and changes pushed to that branch come back into Lovable. That means a developer can work in their own editor without breaking your Lovable project.

It also means you have a full history. If something breaks, you can see what changed and roll it back.

2. Own the database too

Most Lovable apps keep their data in Supabase, either a project you connected or Lovable Cloud.

I check who owns it and who can log in to it. Then I check the backups. Lovable Cloud keeps daily backups (opens in a new tab), and a Supabase project has its own (opens in a new tab). If the database is gone tomorrow, how much do you lose? On a real product the answer has to be “nearly nothing”.

3. Fix database access before anything else

This is where I find the most serious problems.

The app shows each user only their own data, but the database rules often allow much more. Every table with user data needs row level security turned on, with rules that match who should see what. Lovable shows these rules in its database access view (opens in a new tab).

I go through this in detail in the security checklist. Lovable’s security scan (opens in a new tab) helps here too. Run it, and still check the rules by hand.

4. Move secrets and important logic to the server

Anything in the browser can be read and changed by the user.

So API keys go in Lovable’s Secrets (opens in a new tab), never in the code. Calls to OpenAI, Stripe or your email service run in a server function. And anything that decides money or access, like marking a user as paid, happens on the server after the payment provider confirms it.

5. Add a staging copy

In most Lovable apps I see, every change goes straight to the live app.

Before real users depend on it, I set up a second copy for testing with its own database. Changes go there first. Only after they work there do they go live.

Lovable can work on a separate branch, which makes this easier. The important part is that staging has its own data, so a test can never touch a real customer.

6. Turn database changes into migration files

In a Lovable project, the database often changes through prompts or clicks in the dashboard. That’s fine while you build, and risky once there’s real data.

I turn those changes into migration files (opens in a new tab) in the repository. Then the same change runs on staging first and on the live database after, and you can see exactly what changed and when.

7. Decide where to host it

You can keep publishing from Lovable, or deploy the GitHub code to Vercel, Netlify or your own server.

I usually move hosting out when the app needs a custom server setup, preview links for every change, or when the founder wants everything in accounts they already pay for. If Lovable hosting is doing the job, there’s no rush. When you do move, this is how I deploy a Lovable app to Vercel, Netlify or AWS.

8. Set up error tracking and a first look at speed

Before launch I add error tracking, so you see a failure before a user reports it. I also check the main pages on a normal phone with a normal connection. An app that loads a lot of code up front can feel slow on a first visit from a phone.

9. Write down how to make changes

Last, a short page in the repository: how to run the app, how to deploy, where the secrets live, how to change the database. It sounds boring, but it’s what lets the next developer, or you in six months, change the app without fear.

If you’re about to launch

I can do this with you. Before launch, I go through the nine steps above on your project and tell you which ones it still needs, with a cost for each. That first look is a short audit for a fixed price.

Taking over an app explains how it works. If something is already breaking, how to fix a vibe-coded app is the place to start. Or tell me about your app in the form below.

Questions people ask

Can I export my Lovable app and host it somewhere else?

Yes. Connect the project to GitHub and the code syncs to your repository. From there you can deploy it to Vercel, Netlify or your own server. Plan the move of the database and the secrets along with it.

Do I have to stop using Lovable once a developer works on the code?

No. Lovable syncs both ways with one branch on GitHub. I keep Lovable on its own branch and merge its changes through reviewed pull requests, so nothing reaches users without a check.

Is a Lovable app good enough for production?

Many are, after some work. The screens and the basic data model are often fine. What usually needs work is database access rules, server-side logic for payments and AI calls, and a safe way to change the app once people depend on it.

Take over a stuck app

The developer left, the prototype won't hold up with real users, or the team can't keep up. I read the code, tell you what is solid and what is risky, then ship the next release.

Let’s work together.

Tell me what you are building or what needs fixing. You can also email info@ahmed-ghazy.com or find me on LinkedIn (opens in a new tab).

What happens next

  1. 1I read it and reply by email.
  2. 2If it helps, we have a short call.
  3. 3A fixed price for a clear scope, or a monthly one for ongoing work.

I use your details to respond to your enquiry. See the Privacy Notice.