© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
SupabaseS
Supabase•5mo ago•
4 replies
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.
Supabase banner
SupabaseJoin
Supabase gives you the tools, documentation, and community that makes managing databases, authentication, and backend infrastructure a lot less overwhelming.
45,816Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

Lovable Supabase integration
SupabaseSSupabase / help-and-questions
7mo ago
Lovable/Supabase integration (Oauth issue)
SupabaseSSupabase / help-and-questions
4mo ago
SupaBase & Lovable
SupabaseSSupabase / help-and-questions
14mo ago
Lovable x Supabase Integration — Upload of images
SupabaseSSupabase / help-and-questions
6mo ago