Demo, all content is generated
Question

Moving my Lovable app to my own Vercel account, what do I need to change?

Solved · 1201 views · asked by bakery_bo · edited

My bakery ordering app is built in Lovable with Supabase. I want to host it on Vercel under my own account (and my own domain) but keep editing in Lovable. I have the GitHub sync on. What breaks when I do this? I'm nervous about the orders during the switch.

What I’ve tried

Imported the GitHub repo in Vercel, it built and the preview URL loads, but I haven't pointed the domain yet.

Comment
Following, I want to do the same with mine. gabriel_ss · edited

2 answers

Marked as helpful by the asker
rafa_dev · edited

Good news: it's a Vite + React app, Vercel handles it well. Checklist before you switch the domain:

  1. Deep links. Refresh on a sub page of the Vercel preview. If you get a 404, add vercel.json:
    { "rewrites": [{ "source": "/(.*)", "destination": "/index.html" }] }
  2. Supabase keys. Lovable often hardcodes the Supabase URL and anon key in src/integrations/supabase/client.ts. That's fine (the anon key is public), just know it's there, not in env vars.
  3. Auth URLs. In Supabase → Authentication → URL Configuration, add your Vercel preview URL and your domain to Redirect URLs, otherwise login/magic links redirect to the old Lovable URL.
  4. Test an order end to end on the preview URL.
  5. Then move the domain. Do it at a quiet hour. The old Lovable URL keeps working meanwhile, so nothing is lost.

Editing in Lovable keeps working: it pushes to GitHub, Vercel deploys from GitHub.

Comment
Refresh gave a 404 exactly like you said, added the file. Did the switch Sunday night, first order came in Monday 7am on the new domain! bakery_bo · edited
Congrats on the first order! rafa_dev · edited
Also update the Site URL in Supabase to the new domain, that's what email templates use. hannah_reyes · edited
mira_dev · edited

For preview deploys: Supabase redirect URLs accept wildcards, e.g. https://*-yourname.vercel.app/**, so logins work on every preview without adding each URL by hand.

Comment