🚀 Laying the foundation — how I set up the backend for SevaStrife
When you’re building a game solo (and learning on the fly), one of the first big questions is:
Where do I even start?
Backend stuff isn’t the most exciting part of game dev — but I knew I needed a solid base early on. Something secure, maintainable, and that wouldn’t blow up in my face as the project grows.
So before getting into the actual game logic, I spent some time setting up the core of the backend.
🧩 The big pieces I put in place:
I'm using Node.js + Express, with MongoDB Atlas for the database and Firebase Auth for authentication (email/password + Google sign-in).
Socket.IO is there for real-time stuff (like chat or multiplayer interactions later on).
The stack includes:
Authentication and user management.
Security layers: Helmet, CORS, rate limiting, sanitization.
Logging with Winston (and Cloud Logging in production).
API documentation via Swagger (OpenAPI).
Test setup with Jest and MongoMemoryServer for both unit and integration tests.
😅 Where I struggled (and what I learned):
I lost way too much time on Google OAuth because of small mistakes in my setup (and because I underestimated how picky it can be).
Lesson learned:
Double-check your Firebase config. Triple-check your redirect URIs.
Another thing I didn’t expect:
I thought writing tests would slow me down. But honestly?
Watching those tests run and finish with a satisfying “100% passed” feels really good.
The coverage report has become my little scoreboard — I can’t help but want to fill all the bars to green.
It’s kind of like playing Tetris with my code coverage, and I’m weirdly enjoying it way more than I thought I would.
📋 Why I bothered with all this “boring” setup before the fun part:
I want this project to be sustainable — even if I’m working on it alone, in my free time.
I didn’t want to pile up tech debt that would slow me down later.
Having proper logging, tests, and docs makes the whole thing feel more real, and less like "just a side project I might drop."
✍️ Bonus: naming the project
If you’ve been following the devlog here, you might have noticed a change:
The project is now officially named SevaStrife.
It felt right to put the focus on what the game is really about — the conflict (strife) between factions fighting over Seva, the unstable plant-based energy at the core of the game world.
Still solo, still the Black Sheep behind the scenes — but now with a name that feels more like the world I’m trying to build.
Thanks for reading! 🚀
— Black Sheep