Codapult
DocsBlogPricingPluginsDemo
Get Codapult
Logo

Build your SaaS with AI. Keep the architecture under control.

Get Codapult

Product

  • Pricing
  • Architecture
  • Modules
  • AI platform
  • Plugins

Developers

  • MCP
  • CLI
  • Documentation
  • Launch your SaaS
  • Build a B2B SaaS

Resources

  • Blog
  • FAQ

Connect

  • Contact
  • GitHub

Compare

  • SaaS template comparison
  • Codapult vs Supastarter
  • Codapult vs Makerkit
  • Codapult vs ShipFast
  • Codapult vs SaaSBold
  • Codapult vs Gravity
  • Codapult vs Nextbase
  • Codapult vs BuilderKit

Featured on

Codapult on LaunchNestCodapult on LaunchNestbetterlaunch.cobetterlaunch.coFeatured on LaunchBuffFeatured on LaunchBuffCodapult on PeerPushCodapult on PeerPushFeatured on LaunchItFeatured on LaunchIt
© 2026 Codapult·All rights reserved·Privacy Policy·Terms of Service
Full source code · One-time purchase · Self-host anywhere
All articles

Getting Started

  • Introduction
  • Quick Start
  • Your First 30 Minutes
  • Project Structure
  • License and Permitted Use
  • Starter Profiles and Recipes
  • Product Recipes

Configuration

  • Environment Variables
  • App Configuration
  • Which Modules Should I Enable?
  • Provider Matrix
  • Capability Coverage

Database

  • Database and Provider Guide
  • Database
  • Migrations

Authentication

  • Authentication
  • OAuth Providers
  • Two-Factor & Passwordless
  • Enterprise SSO (SAML)

Ai

  • AI Runtime Architecture and Evals
  • AI Features
  • Streaming Chat
  • RAG and Semantic Search
  • Quotas and Memory

Teams

  • Teams & Organizations
  • Permissions & RBAC
  • SCIM Provisioning

Security

  • Data Retention Policy
  • Security

Deployment

  • Enterprise E2E Evidence
  • Enterprise Production Readiness
  • Deployment, Backup, and Restore Runbook
  • Deployment
  • Troubleshooting

Payments

  • Payments & Billing
  • Stripe Setup
  • LemonSqueezy Setup
  • Polar Setup
  • Payment Webhooks

Api

  • API Layer
  • tRPC
  • GraphQL

Email

  • Email
  • Email Templates

Infrastructure

  • Infrastructure
  • Self-Hosting
  • File Storage
  • Docker
  • Background Jobs
  • Terraform & Pulumi
  • Kubernetes

Ui

  • UI & Theming

I18n

  • Internationalization

Content Management

  • Content Management

Admin

  • Admin Panel

Monitoring

  • Analytics & Monitoring

Modules

  • Module Architecture
  • Waitlist
  • Audit Log
  • White-Labeling
  • Workflow Automation
  • A/B Testing
  • Welcome Page
  • Referrals
  • GDPR Export and Deletion
  • Promotions
  • Outgoing Webhooks

Plugins

  • Plugin System
  • CRM Plugin
  • Helpdesk Plugin
  • Email Marketing Plugin

Upgrading

  • Upgrading Codapult

Developer Tools

  • AI Agents & IDEs
  • MCP Server
  • Testing
  • Build Your First Feature with Codapult MCP
  • How Guard Blocks an Architectural Regression
Deployment

Deployment, Backup, and Restore Runbook

Operational procedures for deploying Codapult, applying migrations, recovering data, and validating a restored environment.

Deployment order

Use the same sequence for Vercel, Docker, ECS, and Kubernetes:

  1. Run CI with the target commit: format, lint, unit/integration tests, build, and Chromium E2E.
  2. Build one immutable artifact and record its commit SHA. Promote that artifact; do not rebuild separately for production.
  3. Take or confirm the database backup required by the provider's retention policy.
  4. Apply database migrations with pnpm db:migrate.
  5. Deploy the application artifact.
  6. Verify GET /api/health, logs, error tracking, and the enterprise E2E evidence.
  7. Monitor the first migration and traffic window before removing the previous artifact.

Database migrations must be forward-compatible with the application currently serving traffic. For breaking schema changes, use expand/contract: add the new shape, deploy code that can read both shapes, backfill, then remove the old shape in a later release.

Database backup matrix

Codapult does not copy production database credentials or data into the application container. Backups belong to the database provider and must be encrypted, retained, and access-controlled there.

ProviderBackup procedureRestore target
Turso/libSQLEnable and verify the provider's scheduled backup or point-in-time retention for the database. Record the database name, group, and retention policy with the release.Restore to a separate database/branch first, validate it, then switch TURSO_DATABASE_URL and TURSO_AUTH_TOKEN.
PostgreSQLCreate an encrypted custom-format dump with pg_dump --format=custom --file=codapult-$(date +%Y%m%d-%H%M%S).dump "$DATABASE_URL" and retain provider snapshots/PITR as the primary recovery path.Restore into an empty or isolated database with pg_restore --clean --if-exists --dbname="$DATABASE_URL" backup.dump after confirming the target explicitly.
Local SQLiteStop the application before copying local.db; this is a development convenience, not a production backup strategy.Copy the database to a new local path, set TURSO_DATABASE_URL=file:..., then run migrations.

Never place dumps, database URLs, auth tokens, or .env.local in the repository, Docker image, CI artifacts, or issue tracker.

Restore procedure

  1. Declare the incident owner and freeze destructive maintenance jobs.

  2. Identify the recovery point and create an isolated restore target. Do not overwrite the primary database for the first validation.

  3. Restore the provider snapshot or dump into that target.

  4. Set the target application's database variables and run pnpm db:migrate.

  5. Check schema parity and application health:

    npx @codapult/cli db schema-diff
    curl -fsS "$APP_URL/api/health"
    pnpm exec playwright test --project=chromium e2e/security-boundaries.spec.ts
  6. Verify authentication, organization membership, a representative read-only dashboard flow, and payment/webhook records.

  7. Switch the deployment to the validated target using the hosting provider's secret/configuration mechanism.

  8. Re-run health checks and monitor error rate, database latency, background jobs, and webhook delivery.

  9. Preserve the original database and restore evidence until the incident is closed.

For PostgreSQL, run restore commands only against an explicitly confirmed target. pg_restore --clean is destructive for objects in that target.

Application rollback

Application rollback and database rollback are separate decisions:

  • If the schema is backward-compatible, redeploy the previous immutable image and keep the migrated database.
  • If a migration changed data or removed a column, do not blindly roll back the application. Ship a forward fix or restore an isolated database after confirming the recovery point.
  • Keep migration files append-only. Do not edit an applied migration to repair production state.
  • After rollback or forward fix, repeat /api/health, security-boundary E2E, and the relevant domain integration tests.

Object storage recovery

When STORAGE_PROVIDER is s3 or r2, enable bucket versioning and a retention/lifecycle policy in the provider account. The application database stores object references; a database restore without the corresponding bucket version is incomplete. Record the bucket, region/endpoint, retention policy, and restore owner with the release.

Release evidence

For each production deployment retain:

  • commit SHA and image digest;
  • migration command output and database provider;
  • backup/recovery-point identifier;
  • health-check and E2E result;
  • deployment URL, operator, and rollback/forward-fix decision.

The runbook is complete only when the restored environment has been tested and the recovery path is recorded. A configured backup without a verified restore is not recovery evidence.

Enterprise Production ReadinessDeployment