# Leaving Lovable: How to Own and Extend Your App’s Code

> When an app built in Lovable outgrows it: what you already own, how to move the code to GitHub and your own hosting, and when staying is the better call.

- Author: Filipe Eduardo, Senior Software Engineer (https://filipeeduardo.dev/)
- Published: October 3, 2026
- Topic: AI-built apps · Tags: AI, GitHub, Hosting, Lovable
- Canonical URL: https://filipeeduardo.dev/blog/leaving-lovable-own-your-code

## Key takeaways

- You don’t need permission to leave: Lovable syncs your project to a GitHub repository you own, both ways, and the repository stays yours if you disconnect.
- The code is the easy part. Make sure the database, domain, payment and email accounts are in your company’s name before anything else.
- Leave when changes start breaking things or a developer needs to own the code. Until then, Lovable plus GitHub is a fine way to keep moving.

Lovable is good at getting a product to its first users. At some point many founders hit the same wall: each change breaks something else, a feature needs a real backend, or a developer joins and wants to work in their own editor. The question then is not whether Lovable was a mistake. It is how to take full control of what you built without starting over.

This post covers what you already own, how to move the code out, and when it makes sense to stay. It is part of [the guide to making an AI-built prototype ready for real users](/blog/ai-built-prototype-production-ready).

## What do you actually own?

More than most founders assume. Lovable’s GitHub integration creates a private repository for the project, keeps it in sync in both directions, and leaves it in place if you disconnect: “Your repository stays on GitHub,” and the code is yours to download, deploy or manage independently ([Lovable](https://docs.lovable.dev/integrations/github)).

The code, though, is only one of the things your app runs on. Before touching it, list every account the app depends on and check who owns each one:

Account

What to check

GitHub repository

It’s under your company’s GitHub account or organization, not a personal one

Database (usually Supabase)

The project is in your organization, you can log in, and you have backups

Domain

Registered in your company’s name, with access to its DNS

Payments (Stripe)

Your company’s account, with the live keys stored only on the server

Email, storage and AI services

Keys created under your accounts and billed to you

If any of these belongs to a freelancer, a personal email or the builder’s own account, fix that first. It’s the step that is hardest to do later, under pressure.

## How do you move the code out?

The path most teams take, in order:

1.  **Connect GitHub and check the sync.** From the project settings, connect the repository and confirm the latest changes appear there. Lovable syncs one branch at a time, usually the default branch.
2.  **Run it locally.** Clone the repository, install dependencies and create the environment file from the variables the app uses. A Lovable app is a standard React project, so any developer can run it.
3.  **Deploy it to your own hosting.** Connect the repository to a host such as Vercel or Netlify, set the environment variables there, and deploy a preview. Test the full flow: sign-up, the core feature, payments.
4.  **Move the domain.** Point your domain at the new hosting only after the preview works, and keep the old deployment for a few days in case you need to switch back.
5.  **Decide how Lovable fits from now on.** You can keep using it for interface work, since changes pushed to GitHub sync back into Lovable. Or disconnect it and work only in code. The repository stays either way.

For a small app, the move itself is often a day or two of work. The work that follows is the part AI tools skipped: database access rules, server-side checks and tests. [The ten checks before real users](/blog/ai-built-prototype-production-ready) are the place to start, along with [Supabase row-level security](/blog/supabase-rls-ai-built-app) and [secret keys in the frontend](/blog/leaked-api-keys-ai-built-app).

## When should you stay on Lovable?

Stay while the product is still finding its shape. If you are changing screens every day, testing ideas with a few users, and nobody but you touches the code, Lovable’s speed is worth more than a clean codebase.

Move when one of these becomes true:

-   **Changes break unrelated features**, and there are no tests to tell you what broke.
-   **You need backend logic** the builder handles poorly: scheduled jobs, heavy processing, integrations with other systems, complex permissions.
-   **A developer joins** and needs to work with branches, code review and their own tools.
-   **You’re about to take real money or sensitive data**, and you need someone accountable for how it’s handled.

## What changes after the move?

The code stops being something a tool regenerates and becomes something your team maintains. That means a few habits the prototype didn’t need: changes go through pull requests, the database schema changes through migrations instead of the dashboard, and each deploy is reproducible from the repository. None of it is heavy, but it’s the difference between an app you demo and an app you run.

> Outgrowing Lovable? Email me at [me@filipeeduardo.dev](mailto:me@filipeeduardo.dev) with your repository or app link. I’ll tell you what moving it involves and what to fix first.
> 
> Work with me

## Frequently asked questions

### Do I own the code I build in Lovable?

Yes. Lovable syncs your project to a private GitHub repository, and the repository stays on GitHub if you disconnect the integration. Check separately that the database, domain and payment accounts are also in your name.

### Can I keep using Lovable after moving to GitHub?

Yes. The sync works in both directions: changes made in Lovable appear in GitHub, and changes pushed to the active branch sync back into Lovable. Many teams keep it for interface work while developers handle the backend in code.

### Can I import an existing GitHub project into Lovable?

No. Lovable’s GitHub integration only exports projects created in Lovable to GitHub; it can’t import an existing repository.

## Sources

- [Lovable — Sync your project with GitHub](https://docs.lovable.dev/integrations/github)
