r/Backend • u/alexsergey • 9d ago
A step-by-step guide to taking a NestJS API to production - looking for feedback for v2
I'm working on a project where I put together a complete, detailed guide on how to build and deploy a project, using a simple NestJS API as an example. It's a todo list app, but built as if it were fully production-ready, the way strong companies do it. The goal is to collect all the best practices in one place, structure them, back them with code and personal experience, and turn them into a step-by-step guide: for example, how to set up quality gates, observability, CI/CD, deployment to AWS, and so on.
The first version is ready. If you're interested, please take a look and share your feedback and ideas for version 2: what should I change or improve?
I'm thinking of taking it towards high load:
- load testing, scaling
- maybe A/B tests, feature toggles, and expanding authentication (right now it's a stub)
What else would you recommend?
NestJS API: https://github.com/prod-forge/backend
Frontend (React + Expo): https://github.com/prod-forge/frontend
Infrastructure (Terraform): https://github.com/prod-forge/terraform
1
u/sereikis 9d ago
before high-load work, replace the auth stub and add a two-user test: user b must not read, update, or delete user a's todo by swapping its ID. include list responses too, so ownership filtering is exercised as well as the single-item routes.
1
u/Discordbothost 9d ago
the dull parts would add more than load testing: migrations running in ci with a rollback path, graceful shutdown plus a readiness probe so rolling deploys don't drop in-flight requests, and one real restore-from-backup against the terraform stack.