Very new to the “vibe coding” environment but my company got tired of paying dev’s $5k a week to get subpar results. I’ve created a pretty well functioning time billing management web app and store most of the persistent data in a database. Cool. All works. I fork the repl from the main project which contains the database and via an api interaction, I call back to the hosted deployment for interacting with the database as I create forks. This keeps the agent from imploding the hard work I have in this project, and was the best way I knew to do it. Fork often, save tears has been my mode of operation.
HOWEVER, as of late, say the past couple of days, agent ignores the prompt to use the api, and creates a local database in that fork. Obviously this breaks everything, as it creates its own version of what it thinks that database looks like.
This api integration was working seamlessly; until it didn’t. Which seems to be a reoccurring theme with agent. Now it seems no matter how many times I prompt and tell the agent to use the api, it apologizes, says I am right and that it did it wrong…and then starts creating a new database again locally.
I’ve probably spent $50 in lost builds or more from this issue. Whats the secret sauce to make sure as you iterate on the application it actually uses the api database and not try and create it’s own? Is the api route a bad idea? Should I be doing this another way??
Why are you forking so much?
Read a reply I just did to a post on lost db! Your issue is forking. It’s not what n00bs like us think it is. Rather rely on GitHub sync to go back in time. That works 100% But read my post, I’ve paid school fees on this 
Oh, and the solution to your issue is covered there.
1 Like
Exactly. You don’t fork, you Git! Search around here, lots of great walkthroughs on setting up Git so I won’t go into it (probably won’t do it as well as they have!)
1 Like
@realfunnyeric Why fork? I’m a noob and I thought this was the way. I actually already have gitHub sync on and use Git to push the changes on the “remix” fork to the main.
@chrisbarker3 I read through the post on the lost db (holy cow I wouldve dropped about three bricks in that situation, glad Kody came through for you). I now have (PostgreSQL) 17.1 module and can pg_dump at will. Noice.
I will probably fork this project once more to provide me something if agent goes into burn_it_to_ASHES_mode = 1 and I can’t get my project back. Normally I would just delete the fork and try again, now I will go the way of the masters.
I’ll start building using the GIt rollbacks. Appreciate you both on this!
I may need to clarify I only forked on new features. I iterate within the fork to get the feature working correctly, or I nuke the fork and try again if it goes sideways. Reading through a lot of the forms on Git, I feel like I am doing what some do, and not doing what some do. Just thought I would add that
The key to git is to make a new branch for all your new features, or really, anytime you start a new agent chat (which is what I do).
This does NOT backup your DB, however, so if you’re going to make core db changes, make a backup of your DB manually before you branch.
And to confirm (again the noobest of the n00bs here) the actual process of the new branch should happen in git and not using the replit remix (fork) function?
it’s the forking and deleting old forks that loses your db string. hasn;t happened to me since I stopped usin ght ere-mix button on replit home page. and i’ve been doing LOTS of work since the last time this happened.
So where do you version/iteration control at? In the main and then if it goes south you just go to the git tab and roll back to a working point? Or do you create a git branch but still in main? And I understand terms get muddy here, but main being the main repl, and not a branch inside replit. If that makes sense
I’m low on time today but maybe this helps
Low time or not, that is what I needed!
That was about as intuitive as an ikea puzzle box. But I pushed a branch and pulled to main. Exactly what I was looking for. Thanks all
Bro. I’m just tired of replit at this point. Replit keeps breaking my db schema. With each rollback
How to fix it? Please
Like renaming db columns and things?
Yes it renamed some columns
I just spent a few minutes on trying to find this, and I cannot but I just read an post here about this very problem. I swear it was either @realfunnyeric or @chrisbarker3 as I have went through their post history the past few days heavily with similar problems. But do know with some searching there was a post about and I believe a fix for this. I will keep looking in a bit.