Guide · docs.lovable.dev read 21 September 2026

    How to export code from Lovable — the three routes, what you get, and what to do with it

    Lovable’s documentation describes three ways to get your code out: a two-way GitHub sync available on every plan, a Download codebase button in project settings on paid plans, and a zip download from the code editor. What comes out is a web project — TanStack Start for apps created from 13 May 2026, React + Vite for older ones — that you own. This page quotes the docs for each route, lists what the export contains and what it does not, explains how the sync behaves once code is edited outside Lovable, and covers the five reasons people export, including the one the export cannot do by itself: become a mobile app.

    Verified

    The short answer. Connect the project to GitHub and the code is in a repository you control: Lovable’s GitHub page says you can "export and two-way sync your Lovable project code with github.com, GitHub Enterprise Cloud, or GitHub Enterprise Server", and lists github.com as "available on all plans". On paid plans there is also a direct download: "use the Download codebase section in Project settings → Git". And the FAQ adds a third: "You can download your codebase as a zip from the code editor or from Project settings → Git". Ownership is answered in the same FAQ, to the question of who owns the code: "You as the creator do!"

    What you get is the frontend project and its configuration. Your backend — a Supabase project, Lovable Cloud, or a third-party API — is not a folder in the zip; it lives where it runs, and the export references it. The sections below take the routes one at a time.

    Route 1 — GitHub sync, on every plan

    Open the project, go to Project settings → Git, and connect a GitHub account. Lovable creates a repository and pushes the project to it; from then on the repository and the Lovable editor stay in sync in both directions. The docs state the scope of that sync: "Changes pushed to the active GitHub branch sync back into Lovable", and "Lovable only edits and syncs one branch at a time".

    Two rules from the same page that matter later. "You can’t change the linked GitHub account on an existing project" — to switch accounts you disconnect and reconnect, and "Lovable creates a new repository on reconnect". And disconnecting is not deleting: "When you disconnect a project, Lovable removes the link between the project and its GitHub repository", while the repository "remains intact with all history and files".

    GitHub Enterprise Cloud and Enterprise Server are named as targets on the same page; whether they are limited to particular plans is not stated on the page read.

    Route 2 — Download codebase, on paid plans

    The GitHub page describes a direct download for paid plans: "On paid plans you can download your code directly from Lovable: use the Download codebase section in Project settings → Git." This produces the project as an archive without a repository. Use it when you want a snapshot — for a developer, an audit, a backup — rather than an ongoing sync.

    Route 3 — Zip from the code editor

    The FAQ names the third route: "You can download your codebase as a zip from the code editor or from Project settings → Git." Open the code view in the editor and use the download control. Which plans include the editor download is not stated on the FAQ page read; the paid-plan condition is stated for the Project settings route.

    What is in the export — and what is not

    In the export: the frontend project. The FAQ states the stack: "New Lovable apps created from May 13, 2026 use TanStack Start with server-side rendering (SSR). Older apps use React + Vite." Styling is Tailwind. The export contains the source, the configuration files, the dependency manifest, and the assets the project references — everything needed to install dependencies and run the project on a machine.

    Not in the export: the backend. Lovable projects use Lovable Cloud, Supabase, or third-party APIs for data and authentication. A Supabase project lives in Supabase and is reached from the exported code through its URL and keys; it does not migrate anywhere, and it does not need to. Whether a Lovable Cloud backend can be exported is not stated on the pages read — if your project uses it, check the Cloud documentation before relying on the export for the data layer.

    Not in the export: hosting. The FAQ states that Lovable "hosts every published app". The export gives you the code; deploying it elsewhere is ordinary web deployment, and the docs read do not detail specific hosts.

    Not in the export: secrets. Environment variables and API keys are configuration, not code. Note where each one lives before exporting; the checklist at the end covers it.

    What happens when you edit the code outside Lovable

    The sync is two-way, on one branch. The docs: "Changes pushed to the active GitHub branch sync back into Lovable" and "Lovable only edits and syncs one branch at a time". In practice: commit to the active branch from Cursor, Claude Code, VS Code or any editor, push, and the Lovable editor reflects it; prompt in Lovable, and the commit appears in the repository. Work on another branch is not synced until it is merged into the active one.

    The consequence for teams: one branch is the shared truth between the two tools, and pull-request workflows run on GitHub, outside Lovable’s view, until they land on that branch.

    Five things people export for

    1. Keep building with their own agent. The exported project is a standard web project; Cursor, Claude Code, Codex and similar agents work on it directly, on your own subscription. BYOA tools covers the bring-your-own-agent model.

    2. Host it themselves. The code runs anywhere the stack runs. Lovable hosts published apps; the export removes the dependency.

    3. Hand it to a developer. A repository with history is what a developer expects to receive.

    4. Audit it. Security review, licence review, a due-diligence request — all need the code outside the editor.

    5. Get a mobile app. This is the reason with a catch, covered next.

    The export is not a mobile app — and what to do about that

    Lovable’s FAQ answers the mobile question directly (read 21 September 2026): "Lovable builds web applications, and you can design them to be fully mobile friendly. Lovable does not generate React Native projects. If you want an installable app on phones, there are two common paths: make your published app a Progressive Web App (PWA) that users add to their home screen, or wrap your published app with a tool like Capacitor to submit it to the App Store or Play Store."

    So the export is a web project, and no setting turns it into an iOS or Android app. There are three routes from here, described in how to turn a website into an app: a PWA (no store), a wrapper such as Capacitor (a store binary whose main screen is a web view — subject to Apple’s guideline 4.2, which asks for "features, content, and UI that elevate it beyond a repackaged website"), or a native rebuild.

    The export matters most for the third route. The exported project is the complete specification of the app — every screen, state, flow and data call, already decided — and the backend it points at is reachable from native code: Supabase publishes its own Swift library, and a community-maintained Kotlin client exists. An AI agent takes the exported code and the backend schema as input and writes the native screens against the same backend. Modaal — ours — does that for Swift/SwiftUI on iOS and Kotlin/Jetpack Compose on Android from one project, on your own AI subscription, with the code on your Mac; the Free plan covers one project with unlimited prompts on one platform, and Pro is €9 per user per month on the annual plan. The full migration plan, including when not to migrate, is in migrating a Lovable app to a mobile app.

    Checklist before you export

    Backend location. Write down whether the project uses Supabase, Lovable Cloud or a third-party API, and where its keys are set. The export references the backend; it does not contain it.

    Active branch. Confirm which branch Lovable syncs; that is the one that stays in sync after export.

    Secrets. List every environment variable the project reads. They are configured, not exported.

    Stack version. Check whether the project is TanStack Start (created from 13 May 2026) or React + Vite (older, upgradable per the FAQ) — it decides how the project is run and deployed outside Lovable.

    Domain and hosting. If the app is published on Lovable hosting with a custom domain, decide whether it stays there. Export does not change hosting.

    Re-read the docs. The three routes above are quoted from pages Lovable edits; check docs.lovable.dev on the day you export.

    The three export routes

    RouteWherePlanWhat you getSync afterwards
    GitHub syncProject settings → Git → connect GitHub"available on all plans" (github.com)A repository with history, two-way synced on one branchYes — active branch, both directions
    Download codebaseProject settings → Git → Download codebase"On paid plans"An archive of the projectNo — snapshot
    Zip from the code editorCode view in the editorNot stated on the FAQ page readAn archive of the projectNo — snapshot

    Quoted from docs.lovable.dev (GitHub integration page and FAQ), read 21 September 2026.

    Frequently asked questions

    Lovable’s GitHub integration page lists github.com sync as "available on all plans", so the repository route works without a paid plan. The direct "Download codebase" control in Project settings → Git is described as available "on paid plans". The FAQ also describes a zip download from the code editor; the page read does not state a plan condition for it.

    Lovable’s FAQ answers the ownership question with "You as the creator do!" The exported repository or archive is yours to host, edit, hand over or audit.

    Per the FAQ: "New Lovable apps created from May 13, 2026 use TanStack Start with server-side rendering (SSR). Older apps use React + Vite." Styling is Tailwind. The backend — Supabase, Lovable Cloud or a third-party API — is referenced by the code, not included in it.

    No. The Supabase project lives in Supabase; the exported code connects to it through its URL and keys. Nothing about the database moves when you export, and the same project can serve a second client — including a native mobile app through Supabase’s Swift library or the community-maintained Kotlin client.

    Yes, on the active branch: the docs state that "changes pushed to the active GitHub branch sync back into Lovable" and that Lovable "only edits and syncs one branch at a time". Commits on other branches reach Lovable when they are merged into the active one.

    Not in place: "You can’t change the linked GitHub account on an existing project." The documented path is to disconnect and reconnect, after which "Lovable creates a new repository on reconnect". The original repository "remains intact with all history and files".

    No. Lovable’s FAQ states that it "builds web applications" and "does not generate React Native projects", and names two paths for phones: a PWA or wrapping "with a tool like Capacitor". A third route uses the export as the specification for a native rebuild on the same backend; the website-to-app guide and the migration guide cover all three.

    Yes. The export is a standard web project, and the FAQ says Lovable "hosts every published app" — hosting is a service, not a lock. The docs read do not give per-host instructions; deployment follows the stack (TanStack Start or React + Vite) and the host’s own documentation.

    Exported the web project? Use it as the spec for a native app.

    Modaal takes your code and your backend schema as input and writes Swift/SwiftUI and Kotlin/Compose from one project — your own agent, unlimited prompts, code on your Mac. Free for one project.

    Keep reading