Environments: dev, staging, production
Three copies of the garden
An environment is a full copy of the game and its backend. Shard Garden has three:
Dev, where a change is built and tried. Staging, a dress rehearsal. Production, the real game, with real players.
What Firebase recommends
Firebase recommends "a separate Firebase project for each environment", and says every app should have "at least one pre-production environment that's isolated from production data and resources."
Dev "should never contain any real users' data". Staging "mimics production infrastructure as closely as possible", and its data "can be fake, but it should be realistic."
Quick check
Remy wants to copy real players' gardens into staging, to test with them. What does Firebase advise?
- Use fake but realistic gardens: real players' data stays out of staging
- Copy them, since staging should match production exactly
- Test in production instead
Show the answer
Use fake but realistic gardens: real players' data stays out of staging
Firebase says "to protect user privacy, you shouldn't use actual user data in staging." Fake data can still be realistic.
Same build, different settings
The same build runs in every environment. Only its settings change, such as which Firebase project it talks to.
So the build that passed in staging is exactly the build that reaches players, not a fresh one made later.
Mind the gaps
The Twelve-Factor App, a well-known guide to running web services, names three gaps between development and production:
- TimeCode that waits weeks to ship. Keep it to "hours or even just minutes".
- PersonnelDevelopers who wrote code should be "closely involved in deploying it".
- Tools"Keep development and production as similar as possible."
Spot the gap
Remy tests on a laptop with one kind of database. Production runs a different kind. Which gap is that?
- Tools
- Time
- Personnel
Show the answer
Tools
The guide says each environment "should be using the same type and version of each of the backing services". A different database can hide bugs until production.
Keep test taps out of the numbers
Firebase also warns: "You also don't want your tests from pre-production environments to impact production analytics."
Theo's dashboards should count real players only. Firebase lets a team tag the project that holds production as a "production" environment type, so nobody mixes them up.
Quick check
A tester's 500 practice gardens in staging should show up on Theo's player dashboards.
- True
- False
Show the answer
False
Staging is a separate project with its own analytics. Test gardens counted as players would make every number wrong.
Three times, by hand?
Three environments must be set up the same way, three times. Done by hand, they slowly drift apart.
Bolt says: Next: infrastructure as code.
Fact-checked 12 October 2026
- Firebase: Environments in your development workflow firebase.google.com
- The Twelve-Factor App: Dev/prod parity 12factor.net