How do you manage Dev vs Prod in Lovable?
Hey everyone! đ
Iâve been using Lovable to build and test ideas, and itâs been awesome. Iâve never coded before, but I can create and deploy stuff fast, sometimes I even ask ChatGPT for tips on GitHub or Supabase. đ
But I have a question: how do you handle development vs production?
Code: I can use GitHub branches (main / dev ).
Database: Iâm on Supabase, but itâs just one database. If I add tables or columns in dev and something goes wrong, how do I roll back without hurting production?
Do youâŠ
Duplicate the entire database and deploy by hand, maybe with Vercel or similar?
Use Lovable to manage separate âdevâ and âprodâ setups, if so, how?
Or something else?
Would love to hear your simple workflows or tips. Thanks!
Replies
Having separate environment branches is great. I use lovable to connect only to my dev branch, and I manually merge code changes to prod after I am happy with it.
You also need to create a supabase dev environment and a prod environment. This can be a little tedious, you'd need to use your cli to make updates to prod. But it's way safer than letting lovable make changes to your production environment directly.
Hope this helps, ping if you have more questions.
@maliks786 I see the value of keeping dev and prod Supabase separate⊠even if itâs a bit more work, sounds way safer. Iâll start looking into using CLI for that. Thank you :)
Hola Andrea, realmente es genial, a veces alucina, pero es tremendamente fĂĄcil de usar y puedes crear cualquier cosa que tu imaginacion te de, un 10 por Lovable. Estoy desarrollando Mapoo.app.
hey andrea, it's better to not connect github to project until you're all ready, if you want to move in prod, create a backup and perform remix and then connect github and move to prod. if you connect supabase, any changes will not rollback, you'll need to manually edit, or pro tip: use another account, remix project and drop a prompt to create database tables based on required iteams in project. lovable uses mock data in many instances so always cross verify if using API or LLMs
@sobarinetech I hadnât thought about waiting before connecting GitHub or using remix that way, great tip, thanks! Using another account to test safely is also a smart move. As for the mock data, yeah I had noticed that before and I always make sure to remove it so I donât forget later...eheh
I work with 2 branches: main and prod. Prod is what's deployed. When I am satisfied with the state of main I update prod... using the UI of GitHub tipically.
Hosting in Vercel - it gets only updated when prod is deployed.
aaaand I am using only one DB for now. Very nasty, but I am the only one touching it... and I am extra paranoid.