Deploying a full-stack web app is less about pressing a final publish button and more about connecting repeatable steps: source control, configuration, data, builds, hosting, observability, backups, and recovery. This practical workflow explains how to build and deploy an app safely, what to track after launch, and when to revisit decisions as your application and its platform requirements change.
Overview
A full-stack deployment normally includes a browser-facing frontend, an API or server-side application, and one or more data services. These components may run on the same platform or on separate app development platforms. A typical modern app stack might combine a hosted frontend, serverless or containerized API functions, managed Postgres, object storage, and a third-party service for email or payments.
The exact providers are less important than the boundaries between components. Before choosing a platform, document where the following responsibilities live:
- Source: the repository, branches, pull requests, and release history.
- Build: dependency installation, compilation, tests, and artifact generation.
- Runtime: the process, function, or container that serves the API and background work.
- Data: the database, migrations, files, caches, and external integrations.
- Operations: logs, metrics, alerts, backups, access controls, and rollback procedures.
Separating these concerns makes a deployment easier to troubleshoot. If a release fails, you can determine whether the problem is in the build, environment configuration, database migration, runtime limits, or traffic routing instead of treating the entire app as one opaque system.
For a provider-neutral planning reference, compare deployment responsibilities against the requirements of your frontend framework, API runtime, database, and hosting layer. A managed service can reduce operational work, but it does not remove the need to understand limits, credentials, data retention, recovery, or application behavior under load.
What to track
1. Repository and build configuration
Start with a reproducible repository. Record the required runtime version, package manager, lockfile, build command, test command, output directory, and start command. Keep local development instructions close to the code, and make the deployment pipeline use the same commands wherever practical.
Protect the main branch with review and automated checks. At minimum, validate formatting or linting, type checks where applicable, unit tests, and a production build. Dependency updates should be reviewed rather than applied blindly, particularly when they affect authentication, database clients, build tooling, or server-side request handling.
2. Environment variables and secrets
Separate configuration from source code. Common values include database connection details, API keys, authentication settings, allowed origins, storage locations, and feature flags. Maintain a documented list of required variables without recording secret values in the repository.
Use separate environments for development, preview, and production. Confirm which variables are available during the build and which are available only at runtime. Frontend variables deserve special attention: anything bundled into browser code should be treated as public, even if its name appears secret.
3. Database provisioning and migrations
Provision the production database before the first release, then apply schema changes through versioned migrations. Do not rely on manually editing production tables as the normal deployment process. Test migrations against a representative copy or staging database, including indexes, constraints, seed data, and rollback implications.
For changes involving large tables or existing user data, use an expand-and-contract approach: add compatible structures first, deploy code that can use both versions, backfill carefully, and remove the old structure only after the new path is verified. See the zero-downtime database migration checklist for a more detailed treatment.
4. Frontend, API, and hosting requirements
| Component | Typical deployment requirement | Track before launch |
|---|---|---|
| Static or server-rendered frontend | Build command, output directory, runtime settings, domain, and caching behavior | Build success, asset paths, redirects, headers, and browser errors |
| API or serverless functions | Runtime version, environment variables, routes, authentication, and timeout limits | Latency, errors, memory use, logs, and provider limits |
| Managed database | Connection string, migration process, access rules, backups, and pooling strategy | Connections, query latency, storage, backup status, and failed migrations |
| Object storage | Bucket or container, access policy, upload limits, and retention rules | Failed uploads, public exposure, storage growth, and deletion behavior |
| CI/CD pipeline | Triggers, test stages, secret access, approvals, and deployment target | Failed jobs, deployment duration, dependency changes, and audit history |
Provider-specific details change, so verify dashboard labels, CLI commands, framework defaults, and free-tier constraints before each significant launch. For serverless deployments, review execution time, memory, request size, concurrency, and background-task behavior rather than assuming a conventional server model applies. The serverless function limits comparison provides a useful checklist for this review.
5. Monitoring, backups, and rollback
Instrument the application before sending real traffic. Capture structured logs, request errors, response latency, important business events, and database failures. Avoid placing passwords, tokens, or sensitive personal data in logs. An observability plan should make it possible to answer three questions: Is the app available? Is it performing acceptably? Which release or dependency change caused a problem?
Define recovery expectations for important data. Record the intended recovery point objective and recovery time objective, then test restoration rather than assuming that a successful backup automatically means a usable recovery process. The cloud app backup and restore testing plan can help structure those drills.
A rollback should be a documented action, not an emergency invention. Decide whether you will restore the previous application version, redirect traffic, disable a feature flag, or revert a compatible migration. Database changes often cannot be rolled back safely after new data has been written, which is why migration design and forward fixes matter.
Cadence and checkpoints
Use a deployment cadence that matches the risk and pace of the project. Every release should pass a lightweight gate, while broader reviews can happen monthly or quarterly.
Before every production release
- Confirm the intended commit, release notes, and approval.
- Run automated checks and a production-mode build.
- Review configuration changes and confirm required secrets exist.
- Inspect database migrations for compatibility and ordering.
- Verify backup status and confirm the rollback path.
- Test the primary user journey after deployment.
Monthly or quarterly
- Review hosting, database, function, storage, and bandwidth usage against actual demand.
- Audit unused secrets, team access, service accounts, and production permissions.
- Update dependencies deliberately and test framework or runtime changes.
- Review error rates, slow endpoints, failed jobs, and recurring support issues.
- Perform a restore exercise or confirm evidence from the most recent recovery test.
- Recheck provider dashboards, CLI workflows, security recommendations, and plan limits.
Preview environments can make pull-request testing more realistic by giving reviewers a deployable version of proposed changes. Keep preview data isolated from production and define how temporary environments are created, protected, and removed. See the preview environments guide for an operational framework.
How to interpret changes
Do not treat every metric movement as a reason to change platforms. First establish whether the change is real, user-visible, and persistent. A short-lived increase in build time may be less important than a small but repeated rise in failed requests on a key workflow.
Group changes by likely cause:
- Release-related: errors begin immediately after a deployment or dependency update.
- Traffic-related: latency or resource use rises with demand while the code remains unchanged.
- Data-related: queries slow as tables, indexes, or stored files grow.
- Platform-related: a runtime limit, build default, service configuration, or regional behavior becomes relevant.
- Process-related: failures result from missing reviews, undocumented variables, or inconsistent environments.
Use thresholds that lead to action. For example, define when a failed deployment requires a rollback, when database growth triggers a capacity review, and when repeated manual steps should become automation. Keep an incident record with the symptom, timeline, cause, mitigation, and follow-up task. This turns each production issue into an improvement to the deployment workflow.
If the current architecture no longer fits, compare alternatives against operational requirements rather than feature lists alone. A Firebase alternative, a managed Postgres service, a different serverless app hosting model, or a container platform may each be reasonable in a specific context. Evaluate migration effort, data portability, observability, access control, runtime limits, and recovery procedures before switching.
When to revisit
Revisit this deployment guide before the first production launch, after a major framework or runtime upgrade, and whenever the application adds a new data store, external integration, background worker, or authentication flow. A quarterly review is a practical default for an active application, while low-change internal tools may need only a periodic review tied to releases.
Also reopen the plan after a production incident, a significant traffic change, a provider migration, a security finding, or a change in data retention requirements. These events can invalidate assumptions that were reasonable at the original launch.
Full-stack launch checklist
- Repository, lockfile, runtime, build, test, and start commands are documented.
- Development, preview, and production configuration are separated.
- Secrets are stored outside source control and access is limited.
- Frontend and API builds have passed in a production-like environment.
- Database migrations have been tested and applied through a repeatable process.
- Custom domain, TLS, redirects, headers, and allowed origins are verified.
- Logs, error reporting, health checks, and alerts cover critical paths.
- Backups are enabled, and a restoration procedure has been tested.
- Rollback, feature-disable, and incident communication steps are written down.
- Ownership for releases, access reviews, costs, and recurring checks is clear.
After launch, schedule the next review immediately rather than leaving it to memory. Record the date, the variables to inspect, and the action that will follow each result. That simple habit keeps a build-and-deploy workflow useful as the application, team, and cloud environment evolve.