Skip to content

Environments

The Environments feature provides Git-like branching for your entire backend. Each environment is a fully isolated copy of your application — including its own database, API schema, roles, file providers, gateway routes, and security configuration — allowing you to develop, test, and stage changes without affecting production data.

Every project starts with a single master environment. From there, you can branch new environments that inherit the database schema (and optionally data) from any existing one. Each branch operates independently: changes made in one environment do not propagate to others until you explicitly merge them.


  • Environment Isolation: Each environment has its own PostgreSQL database, ensuring complete data separation between branches.
  • Branch Modes: When creating a new environment, you choose between Full (schema + data) or System (schema only) cloning strategies.
  • Configuration Copying: File storage providers, gateway routes, security settings, and environment variables can optionally be copied from the source environment during branching.
  • Status Lifecycle: Environments transition through defined states — active, branching, merging, error, and archived — to prevent conflicting operations.
  • Parent-Child Relationships: Environments maintain a tree structure that tracks lineage for diff and merge operations.
  • Schema Diff: Compare the database schemas of any two environments using forward-only diff semantics. See Environment Diff.
  • Merge: Apply schema changes from one environment to another with automatic backup, selective change application (cherry-pick), and transactional DDL. See Environment Merge.
  • Backups: Automatic pre-merge backups and manual backups stored in S3, with the ability to restore to any target environment — including environments that have been deleted. See Backups.
  • Migration History: Full audit trail of all merge operations, including the user who applied each migration, timestamp, and the specific changes applied.

All backend resources are scoped to the currently selected environment. When you switch environments using the Environment Selector in the top navigation bar, the following resources reflect that environment’s state:

ResourceScoped per Environment
Database tables & schemaYes
API Explorer (GraphQL)Yes
SQL PlaygroundYes
Role-Based AccessYes
File Storage ProvidersYes
Authentication ProvidersYes
API KeysYes
Custom API Gateway RoutesYes
Security Config (CORS, Rate Limits)Yes
Environment VariablesYes
IntegrationsYes

Note: Switching environments triggers a full context reload. The environment context is propagated across the entire platform’s backend services to ensure every request is resolved against the correct database and configuration.


The environment system is designed to provide enterprise-grade isolation between your development stages:

  1. Storage Isolation: Each environment is backed by a dedicated database. This ensures that a bug or data operation in a development environment can never impact production data.
  2. Configuration Scoping: All settings — from API keys to security policies — are independently managed per environment. Changing a CORS policy in “Staging” will not affect “Production”.
  3. Platform-wide Context: The current environment is automatically propagated across the entire platform. Whether you are browsing files, running SQL queries, or making API calls, Archie Core ensures you are interacting with the correct environment’s resources.