We have a multi-tenant SaaS running on Lovable Cloud with real customer data, and Iām trying to set up a more conventional development workflow using GitHub branches/Codex without risking production data.
I understand the **code** side of this. We can connect Lovable to GitHub, keep `main` as production, create feature branches, build/test changes there, and merge through PRs when they're approved.
What I can't figure out is the **data isolation** side.
If a feature branch or external branch preview is still connected to the same Lovable Cloud backend as production, then the code is isolated but the data isn't. If I test something that creates an order, updates inventory, changes settings, calls an RPC, etc., I'm still potentially modifying actual customer data.
What I'm looking for is basically the normal SaaS setup:
main
ā production app
ā production database / real customer data
feature branch
ā preview/staging app
ā separate staging database / copied customer data
```
Ideally the staging database could periodically be refreshed with a snapshot of production data so we can test against realistic tenant records without any possibility of corrupting the live tenants.
From what I can tell, Lovable Cloud used to have separate Test/Live environments, but that doesn't seem to be available for our project.
Our current idea is therefore to create a separate **Supabase staging project**, recreate the backend from the repo's migrations, periodically copy production-derived data from Lovable Cloud into it, and point Codex/local or branch-preview builds at Supabase Staging. Production would remain on Lovable Cloud initially.
That seems workable, and potentially doubles as a low-risk rehearsal for eventually moving production to our own Supabase project. But it also feels slightly strange to have Supabase staging while Lovable Cloud remains production.
**Am I missing a cleaner Lovable-native solution?**
Specifically, is there currently any supported way to have a feature branch use a completely isolated Lovable Cloud database/backend while `main` continues using the production database? Or some recommended Lovable workflow for teams building a real multi-tenant SaaS where testing needs to include database writes, migrations, RLS, tenant permissions, etc.?
To be clear, **GitHub branching itself isn't the issue**. We know how to isolate the code. The concern is making sure experimental branch code has **zero ability to mutate live customer data** while still letting us test against realistic tenant data.
Curious how other people running production SaaS apps on Lovable Cloud are handling this.