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.
Key Concepts
Section titled “Key Concepts”- 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, andarchived— 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.
Environment Scoping
Section titled “Environment Scoping”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:
| Resource | Scoped per Environment |
|---|---|
| Database tables & schema | Yes |
| API Explorer (GraphQL) | Yes |
| SQL Playground | Yes |
| Role-Based Access | Yes |
| File Storage Providers | Yes |
| Authentication Providers | Yes |
| API Keys | Yes |
| Custom API Gateway Routes | Yes |
| Security Config (CORS, Rate Limits) | Yes |
| Environment Variables | Yes |
| Integrations | Yes |
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.
Security & Isolation
Section titled “Security & Isolation”The environment system is designed to provide enterprise-grade isolation between your development stages:
- 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.
- 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”.
- 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.