As Software Architect at Code B, Every month I work on a few MVP(Minimum Viable Product) applications using the MEAN/MERN stack and always want them to be ready for sudden traffic.
Below is the most common stack I use for scalable deployment.
The best practice is to not develop this part and use third-party services.
I stick with AWS Cognito or Google Firebase Authentication depending on the client's cloud preferences.
I prefer to go with managed services for databases and MongoDB Atlas is mostly what I use.
Firestore is also a good option if the frontend needs real-time data(Stock Price, Sports score, etc). AWS API Gateway is also a good option for sockets.
For scalable deployment of APIs, I think Google Cloud Run is best. We can scale down to 0 containers, so very cost-efficient and it's very easy to set up.
For CI/CD I use Google Cloud Build but am planning to test Github actions for this in the future.
Also, AWS Farget is a good option that I use with Github actions.
I use Netlify for deploying frontend applications. It's super easy to connect with git repo and set up CI/CD pipeline.
The cloud cost of MVP for the above stack is minimum:
Authentication: ~0$, Database: ~0$, API:~0$, Frontend:~0$
Hope this will be helpful!
Share this with anybody you think would benefit from this. Have any suggestions? Feel free to message me on LinkedIn.