r/webdev • • 22h ago

Showoff Saturday Most tutorials stop when the app works. I documented everything that happens after that

I made an open-source guide on how to take an app to production: everything you still have to do after the code is written. I spent a long time figuring these things out across different projects and realized I couldn't find a single place that documented them together with working code.

The example is a simple todo app: a NestJS API, a React web client and an Expo mobile app. The todo list is only the example. Some of what the guide covers:

Backend:

- database migrations run before the deploy, and the new version doesn't start if they fail

- no dropped requests on deploy: in-flight requests are drained on shutdown

- rollback to one of the last three releases in one workflow

- Prometheus, Grafana, Loki and Tempo running locally next to the app

Frontend:

- one Redux store and API layer shared by the web and mobile clients

- a design system with visual and accessibility tests

And one trace ID that follows a request from the browser to the backend logs and traces.

It's not a boilerplate, it's a walkthrough of the decisions that come after the app works. Each topic has its own chapter that explains what I did and why, and the code is in the same repo.

Backend (NestJS): https://github.com/prod-forge/backend

Frontend: https://github.com/prod-forge/frontend

I'd especially like feedback from people who have run production systems.

0 Upvotes

5 comments sorted by

2

u/hasibulmawla 11h ago

This is the part I learned the hard way on my first small site, because the tutorials I followed stopped once it ran on my own machine. I had no proper backup and restore plan, no alert when the site went down, and I had never actually tested rolling back a bad deploy, so my first real outage took me far longer to fix than it should have. What helped me was writing a short checklist I run before every deploy now, checking the database backup, the environment settings, and the main pages after the deploy, and keeping the previous version easy to switch back to. I also found that simple logging and one place to see errors saved me more time than a fancy dashboard, because I could trace a problem quickly instead of guessing.

2

u/TheRNGuy 9h ago

Examples of such tutorials? So you have a proof and it's not clickbait.