Demo, all content is generated
Question

Moving off Lovable to Cursor: can I keep using the same Supabase project?

Solved · 1305 views · asked by emeka · edited

My app has 400 users now and I want to continue in Cursor + Vercel. Worried about the database: do I need to migrate data? Will users need to sign up again? I don't know if I'm on 'Lovable Cloud' or 'my own Supabase', how do I check?

What I’ve tried

Connected GitHub and cloned the repo, it runs locally. Didn't touch anything database-related yet because I'm scared of breaking it for current users.

Comment
Before you change anything: make a backup of the database. Then answer below. hannah_reyes · edited

3 answers

Marked as helpful by the asker
hannah_reyes · edited

First find out which one you have. In your repo, open src/integrations/supabase/client.ts (or .env) and look at the URL.

  • If you created a Supabase account and connected it to Lovable, you'll recognize that project in your supabase.com dashboard. Then nothing to migrate. Point your local .env and Vercel env vars at the same URL + publishable key and you're done. Users, passwords, data all stay.
  • If you were on Lovable Cloud, the backend is managed for you and you don't own a supabase.com project. Then you need to move data + auth users to a Supabase project you own. Use Lovable's own export route where possible, and plan it: test on a copy first.

Either way, don't forget:

  • Auth → URL Configuration: add your new Vercel domain to Site URL / Redirect URLs, or logins break after the switch.
  • Edge functions and their secrets: they live in Supabase, not in your repo (unless supabase/functions/ is in the repo, then deploy them with the CLI).
  • Stop prompting in Lovable once you've switched, two tools writing the same repo gets messy.
Comment
It's my own project, I recognize it in the dashboard. Relief. Switched env vars on Vercel and it works. emeka · edited
Forgot the redirect URL at first, google login went to the lovable domain. Fixed now emeka · edited
Good checklist. Would add: grab the migrations with supabase db pull so your schema is in git from now on. jb_supa · edited
jb_supa · edited

For whoever finds this later and IS on Lovable Cloud: export the schema and data before you do anything else, and test the import on a fresh project. Auth users are the tricky part, password hashes need to come along or everyone has to reset.

Comment
sanne_dev · edited

One more for the list: edge functions Lovable wrote read secrets that were set through Lovable. If you deploy those functions yourself later, re-add them with supabase secrets set.

Comment