Loveable to Local Environment -- Need help migration Supabase

Hi there! I am a Supabase noob, but have engineering and local environment experience. I am picking up an app that was created in Lovable with Supabase, Typescript, React, and Vite. My first goal is to create a local environment, as some of the features aren't really working well in the Loveable environment (for example, testing password reset emails). Here is what I have done so far: - Installed Docker and Supabase locally - Created a Supabase instance - Forked the GitHub repo for the app and cloned it into my local directory with the Supabase instance So now I have all the files for the app and the Supabase instance in one place, and I can access the Supabase Studio GUI, but there isn't a connection between the app and the local Supabase instance. More importantly, the local Supabase project is blank/default example. After doing some research within the documentation and other sources, I've made a list of is what I think my next steps should be, but I am trying to get confirmation before I spend a ton of time chasing my tail. Note: The Supabase project is currently on a free plan, so I don't have access to backups which I can just download. I know this would make things easier, but I don't want to upgrade the plan for what is essentially a test environment until we are closer to launch Here what I think my next steps should be: - From the local project directory, Direct Connect to the database via terminal (Or other client?) - Run pgdump to pull the entire database from the Supabase cloud project - Verify the postgres version of the dumped data - Restore the backup using supabase cli - Use psql to verify that the data has restored correctly - Somehow, pull that data into the supabase blank project which I have already created in the the “launch-line” directory (this is where I am getting stuck) 🧵with other newb questions. Thanks for any advice or suggestions!
2 Replies
Jess Boctor
Jess BoctorOP2w ago
Noob question 1: In the example string for the connection [YOUR-PASSWORD] refers to the database password, right? I don't think it refers to my Supabase account password, but I would rather be sure before wasting time with a bad assumption. Noob question 2: Should the app and the local Supabase instance be in the same directory? The tree looks like this at the moment:

- supabase
- supabase-project
-- dev
-- public
-- src
-- supabase

- supabase
- supabase-project
-- dev
-- public
-- src
-- supabase
I was trying to package everything together for the development environment, but now I am thinking it might be better to have separate directories since that is how the app will eventually be hosted.
patito1009
patito10092d ago
I wouldn't have both projects in the same repo. One for the app and another to manage your supabase project locally.

Did you find this page helpful?