S
Supabase•2mo ago
jimalebob

Supabase Branches + Lovable Integration

Hey everyone 👋 I’m trying to set up two environments for my project with Supabase + Lovable: I have main project in lovable and then i made a copy of it first one is main second one is for dev Main (production) → should stay connected only to the Supabase main branch Dev (development) → should stay connected only to the Supabase dev branch The goal: When I use Lovable in Dev, all schema changes, migrations, and function updates should go only to the dev branch. When I use Lovable in Prod, everything should stay only on main. The problem: No matter what I do, Lovable keeps resetting the env file back to the main branch API URL. That means even in Dev it’s writing to Main, which defeats the purpose of branching, i've changed the url and api key to match dev branch. What I’ve tried so far: Created a dev branch in Supabase Dashboard using branches via-dashboard. Double-checked keys (anon & service role). But Lovable still overwrites env with Main’s credentials.
3 Replies
tomaspozo
tomaspozo•2mo ago
I don't believe Lovable supports branching... this guide shows a different approach: https://www.productcompass.pm/p/lovable-branching
How to Build and Scale Full-Stack Apps in Lovable Without Breaking ...
Branching: separate dev, test & prod - a complete no-code guide with proven workflows for building real products (not prototypes) with Lovable.
Tahar
Tahar•2mo ago
Hello, @jimalebob May I take a look at your project? It’s possible that the environment value may have been set incorrectly.
garyaustin
garyaustin•2mo ago
Do not ask to look at other users projects. This is your first post here also and I suspect you are a user that has been banned here before for soliciting access to people's projects.

Did you find this page helpful?