Guides / Prompting and shipping

How to Migrate from Lovable to Mythex (Code, Data and Domain)

Move a Lovable app to Mythex step by step: get the code out through GitHub, decide what happens to your backend and data, import, re-add secrets and go live.

Mythex Team · 2026-09-29 · 7 min read

To migrate from Lovable to Mythex, get your code out of Lovable through its GitHub integration, then bring it into a Mythex project by linking the repository or importing an archive, re-add your secrets, and test in Preview before publishing. The frontend usually moves without changes. The real decisions are about your backend: keep your existing Supabase project, or move the data somewhere else.

This guide walks through the whole move in order, and is honest about the parts that take work.

Before you start: what actually moves

A Lovable app is several things, and each one moves differently.

PartWhere it livesHow it moves
Frontend codeYour Lovable projectGitHub sync or code download
Database and usersLovable Cloud or your own Supabase projectKeep it, or export and restore
Uploaded filesLovable Cloud or Supabase storageKeep it, or copy separately
Server functionsSupabase Edge Functions, if you use themKeep on Supabase, or rewrite
Secrets and API keysLovable / Supabase settingsRe-enter by hand
DomainYour DNS providerPoint it at the new host

Write this table out for your own app first. It takes ten minutes and prevents most surprises.

Step 1: Get your code out of Lovable

Lovable's documentation (as of September 2026) describes two ways out:

  • GitHub sync. Lovable can export and two-way sync your project with GitHub, and its docs list github.com support on all plans. Connect GitHub in Lovable, and your code lands in a repository you own. Note that Lovable syncs one branch at a time.
  • Download the codebase. On Lovable's paid plans you can download the code directly from Project settings → Git.

GitHub is the better route for a migration: you get full history, and you can keep syncing while you test the new setup. See Lovable's GitHub integration docs for the current steps.

Before you leave Lovable, open the repository and look for:

  • A .env or .env.example file, which lists the environment variables the app expects
  • A supabase/ folder, which may hold database migrations and Edge Function code
  • The package.json scripts, which show how the app is built and run

Step 2: Decide what to do with the backend

This is the choice that matters most. Lovable apps typically use Supabase for the database and login, either through a Supabase project you connected yourself or through Lovable Cloud.

Option A: Keep your own Supabase project

If your app already talks to your own Supabase project, this is the simplest path. The app's code keeps calling the same Supabase URL with the same keys, so your data, users and files stay exactly where they are. You only move the frontend.

Option B: Move off Lovable Cloud

If your app uses Lovable Cloud, Lovable documents a database export under More → Cloud → Overview → Advanced settings. According to Lovable's docs (as of September 2026):

  • The export contains the full database, structure and data, including user accounts and their password hashes.
  • It does not include files in storage, Edge Function code, or your project's secrets. Sign-in provider settings are not included either.
  • Exports cover databases up to 15 GB, the file can be at most 5 GB, and you can request one export every 24 hours.
  • There is no one-click migration from Cloud to Supabase, and the supported destinations for moving the Cloud backend are managed Supabase or self-hosted Supabase.

So the practical route is usually: restore the export into your own Supabase project, re-create storage buckets, Edge Functions and auth settings there, and then treat it as Option A. See Lovable's advanced settings docs for the details.

Option C: Move everything to Mythex's database

Mythex can give a project a dedicated Postgres database. Moving your data there is possible, but it means rewriting every place the app uses Supabase's client library, and Mythex has no built-in end-user login, so you would also wire up a separate auth provider. That is a real rebuild of the backend, not a migration. Do it later, if at all, once the app is running on Mythex with Supabase.

Step 3: Bring the code into Mythex

Create a new, empty project in Mythex. Then either:

  • Import an archive. Open project settings → Export → Import into this project and upload a .zip, .tar.gz or .tgz. GitHub's Download ZIP button gives you a file that works here.
  • Link GitHub and pull. Connect GitHub in project settings, link the repository and pull. GitHub sync is a Pro feature.

Import replaces the project's files, so use an empty project. Any .env files in the archive are stripped on import, so no secrets travel by accident. After a successful import, Mythex can open a new chat where the agent installs dependencies, works out how to run the app and gets Preview running. You can steer that chat like any other. The details are in After you import.

If Preview doesn't come up on its own, ask:

This project was exported from Lovable. It's a React + TypeScript + Tailwind app that uses Supabase. Install dependencies, work out the dev command from package.json, and get Preview running. Don't change any app code yet.

Step 4: Re-add your secrets

Open project settings → Secrets and add each value your app needs. For a Supabase-backed app that usually means the Supabase project URL and the public (anon or publishable) key. Take the names from the .env.example or from where the code reads them.

Two rules:

  • Only public keys belong in frontend variables. In a Vite app, anything prefixed VITE_ is baked into the JavaScript that every visitor downloads.
  • Never put a Supabase service role key in frontend code. If a server-side function needs it, it stays server-side.

Then ask the agent to confirm the app reads them:

Check which environment variables this app reads. List any that aren't set in project secrets yet, and don't print their values.

Our guide on environment variables and secrets explains the difference between public and private values.

Step 5: Test before you switch anything

Your Lovable app is still live, so there's no rush. Test the Mythex version in Preview against real flows:

  • Sign up, log in, log out, and reset a password
  • Create, edit and delete a record
  • Upload a file, if your app does that
  • Anything that calls an Edge Function or a third-party API

Supabase auth has one easy-to-miss setting: the redirect URLs allowed for login and password-reset emails. Add your Mythex preview and published addresses there, or logins will bounce back to the old domain.

Mythex's /test command has the agent click through your preview like a user and report broken flows. Our guide on testing your app before launch has a fuller checklist.

Step 6: Publish and move the domain

When everything works, publish from the workspace to get a <slug>.mythex.ai address. Test again there, because the published app is a separate snapshot of your project.

On Pro you can connect your own domain. Update the DNS records at your domain provider, add the new address to Supabase's allowed redirect URLs, and only then take the Lovable version down. Our guide on connecting a custom domain covers DNS step by step.

Common mistakes

  • Moving the database and the frontend at the same time. Move the frontend first, prove it works against the existing backend, then decide about the data.
  • Forgetting Edge Functions. If the app calls Supabase Edge Functions, they either stay on Supabase or need rewriting as server code. They don't run inside a Vite frontend.
  • Pasting the service role key into the frontend. It gives full access to your database to anyone who opens devtools.
  • Missing auth redirect URLs. Login works in Preview, then fails on the real domain.
  • Switching DNS before testing the published URL. Test the mythex.ai address first; DNS changes take time to undo.
  • Importing into a project that has work in it. Import replaces the files. Use a fresh project.

When staying on Lovable makes sense

Be honest with yourself about why you're moving. Lovable offers point-and-click visual edits on the preview and a productized backend with Lovable Cloud, and Mythex has neither. If those are what you rely on day to day, moving costs you more than it gains. Mythex is a better fit if you want a real code editor and terminal next to the chat, one credit balance for building and hosting, or to run a different stack. Our Lovable alternatives guide and the Mythex vs Lovable page compare them in more detail.

Migration checklist

  • Listed every part of the app: code, database, users, files, functions, secrets, domain
  • Code synced to a GitHub repository you own
  • Backend decision made (keep Supabase, or export from Lovable Cloud)
  • Code imported into an empty Mythex project, Preview running
  • Secrets re-added; no private keys in VITE_ variables
  • Auth redirect URLs updated for the new addresses
  • Sign-up, login, core data flows and uploads tested in Preview
  • Published and re-tested on the mythex.ai address
  • DNS moved; old app taken down only after the new one is confirmed

For the Mythex side, see GitHub, export, and import in the docs.

Questions

Can I move a Lovable project to Mythex without rebuilding it?

Usually, yes. Lovable lets you sync your project code to GitHub, and Mythex can import that code into a project from a linked GitHub repository or from a .zip or .tar.gz archive. The frontend comes across as-is; the work is in secrets, the backend and the domain.

What happens to my Supabase or Lovable Cloud database?

The database is not part of the code. If your app uses your own Supabase project, it can keep using it after the move. If it uses Lovable Cloud, Lovable documents a database export and says the supported destinations for moving that backend are managed or self-hosted Supabase.

Will my users have to sign up again?

Not if the app keeps using the same auth backend, such as the same Supabase project. Lovable's Cloud database export includes user accounts and password hashes, but moving auth to a different provider is a larger job and should be planned and tested separately.

Does Mythex have built-in login and payments like Lovable Cloud?

No. Mythex does not provide built-in end-user login or Stripe. The agent wires your own providers and keys into the app, which is why keeping an existing Supabase project is often the simplest route.

Keep reading

  • How to Add a Blog to Your Website: Options, SEO and Setup — How to add a blog to your website: Markdown files vs a built-in editor vs a CMS, subfolder vs subdomain, SEO basics, and prompts to build it with AI.
  • How to Add a Contact Form to Your Website (That Actually Reaches You) — How to add a contact form that works: save messages, get email alerts, stop spam, and avoid the mistakes that silently lose enquiries. Prompts included.
  • How to Add a Database to Your App (Without Losing Data Later) — How to add a database to an app you built: when you need one, Postgres vs hosted options, designing tables, prompts to use, and mistakes that lose data.
  • How to Add AI Features to Your App — Add summaries, chat, data extraction and classification to your app with an LLM API — keeping keys safe, costs under control and output trustworthy.
  • How to Add Analytics to Your App: GA4, Privacy-First Tools and Product Analytics — How to add analytics to your website or app: Google Analytics 4 vs privacy-first vs product analytics, what to track, cookie consent, and prompts to use.
  • How to Add Cookie Consent to Your Website — Add a cookie banner that actually blocks scripts until people agree: what needs consent, CMP vs custom, Google consent mode and a checklist. Not legal advice.

Start building free · Templates · Docs