Operations
Operations
These guides cover the path from validated configuration to a recoverable, observable production deployment.

Runbooks
| Need | Guide |
|---|---|
| Understand settings and ownership | Configuration |
| Store and rotate sensitive values | Secrets |
| Build, migrate, and release | Deployment |
| Operate PostgreSQL and file storage | Database and storage |
| Configure probes, logs, metrics, and alerts | Observability and health |
| Inspect and recover asynchronous work | Background jobs and recovery |
| Operate Stripe and SMTP dependencies | External services |
| Enforce cleanup and legal holds | Retention and lifecycle |
| Prepare for and execute recovery | Backup and restore |
| Diagnose common failures | Troubleshooting |
Production release checklist
- provision PostgreSQL, durable file/object storage, SMTP, Stripe, DNS, and TLS;
- store production secrets outside the repository;
- export the production configuration and run
./scripts/preflight.sh; - back up current durable state and verify restore readiness;
- run compatible database migrations as a deliberate release step;
- deploy the immutable application image;
- wait for
/readybefore admitting traffic; - verify Stripe webhooks, email delivery, jobs, and customer/API-key flows;
- monitor errors, queue failures, quota rejection, and billing reconciliation.
The included Kamal/GitHub workflow is a starting point. Adapt migration ordering, storage, backup, secret management, and observability to the target platform before accepting production data.

AI-assisted development
The template is organized so coding agents can follow explicit contracts, stable extension seams, small configuration files, and deterministic validation commands.
Configuration
Next SaaS uses ASP.NET Core configuration. Checked-in JSON provides safe development defaults; environment-specific values override it with double-underscore keys.