Best Practice for Managing Dev and Production Environments in a Live Game

Hi everyone,

I’ve created a basketball management browser game that’s currently online and in its MVP version. The game is live, and users are signing up and providing valuable feedback, which means I’m constantly developing and releasing new features.

Right now, though, the project feels like an open construction site. I need to deploy updates frequently, but I want to make sure I don’t break anything or interrupt games that are already in progress.

I tried creating a remix of the project for development purposes, but it requires reconfiguring Replit authentication, and it seems like the database isn’t carried over properly either.

So here’s my main question:
Is there a way to set up a proper dev environment where I can safely test and develop new features, and only deploy to production once I’m confident everything works, ideally without losing or corrupting current in-game data unless I explicitly choose to do so?

Any guidance or best practices on how to manage this type of setup in Replit would be greatly appreciated!

Thanks in advance.

2 Likes

@victoria-replit Tagging you Victoria - might be someone worth talking to about what you have cooking!

I don’t have any pearls of wisdom around this, however, I have wondered the same here and have come up with some workarounds kind of on my own, but the word on the street is that there might be some things cooking by the Replit team in this area to formalize it, which is fantastic. That really makes Replit CDE (cloud development environment) even more enterprise grade.

Thanks a lot for tagging Victoria and for sharing your thoughts. it’s really comforting to know I’m not alone in this! I’d love to hear more about the workarounds you’ve come up with, if you’re open to sharing.

Right now, I’m really walking on eggshells every time I update something, knowing that a bug could ruin someone’s in-game progress is a lot of pressure.

If you have any tips or even a basic workflow you’re using to separate dev from prod on Replit in the meantime, I’d really appreciate it!

Absolutely! We are in this together :slight_smile:

To that end, I don’t have a ton of time to reply right now, but here are the principles I’ve implemented, I know others might be more formal, but some ideas:

  • Ask Agent/Assistant to consider development and production differences.
  • Check your Database settings, if you use built in db, to see how long the retention is. Set to what you’re comfortable with (considering budget/usage).
  • Check out Workflows. You can do some really cool automations and script stuff, with Agent/Assistant help that is like dev/prod.
  • Document things as you go! Ask Agent/Assistant to document things especially large features and how they are handled in dev vs. prod. This has saved me a few times!

Best wishes and look forward to learning from you as you get further on your journey.

1 Like

Going to follow along on this one as I’m in a similar position. Built MVP and now have customers on the platform. I need to make sure that the changes don’t break anything - also means that I need to create some automated testing too…

1 Like

I have simular problem. I have developed the website, deployed it on production on my domain. Now it seems some bugs appear, which were not there on test version. Eventhough the agent keeps fixing those bugs and bugs do not exit on the dev instance, it can not push updates to the production… It always run into time out error… I hope it make sense. I reached out support seversl times, with not response foe more than 2 weeks now.. this is definetly replit server sode issue, bit i have no idea how to overcome it.

What does browser dev console show when you access production site in browser?

It shows 9 issues (I can share the screenshot if needed). I am sharing those issues with the agent and the agent confirms that issues are resolved, all those issues still exist on the production version, while everything is fine on the dev environment. So trying to debug this problem with the agent, came to the conclusion that deployment ran out of time, therefore could not be finished on time to properly populate all changes. Per my understanding (I am nto a developer), this is a server related issue, and needs to be updated on server side simply increasing time on server processing time… And again I tried to reach out to Replit support like 3-4 times, with 0 response so far…

For now, I’ve integrated Git. I have a Git “Main” and a Git “Development” branch. Git main is my stable, deployed codebase. Git development is for my bug fixes and experimentation. I only merge Git development to Main when things are sorted out and stable.

But, Replit itself doesn’t have version control.

This is sorely needed because once I did an “innocent” bug fix and it corrupted my codebase to unusable. Checkpoint rollbacks are not clean and remnants of the undesired codes persist which can themselves be sources of bugs moving forward.

My time spent doing the little fixes are 10x the time for big development steps.

Hey, Vic Kim is currently testing dev/prod DB split which should solve a lot of your problems https://x.com/victoriakimse/status/1940488865653182906 , send her a message on X to get added to the beta

2 Likes