Section 04 · Infrastructure & Setup

Environments

Environment tiers, configuration, protection, and deployment verification

9 items 6 critical 3 recommended

This guide walks you through auditing a project's environment setup, configuration, and protection.

The Goal: Production Parity

Staging should behave exactly like production so bugs surface before release, not after. Dev environments should enable deep debugging. Non-production environments should be invisible to the public internet.

  • Tiered — production, staging, and dev environments with clear workflows
  • Parity — staging runs in production mode with matching env vars
  • Debuggable — dev environments have verbose logging and stack traces
  • Protected — staging and dev behind Cloudflare Zero Trust
  • Verified — webhooks bypassing Zero Trust validate signatures

Before You Start

  1. Confirm you're in the target repository's root directory
  2. Have staging and dev URLs ready for browser testing
  3. Have Cloudflare account ID and API token available (for ENV-008)
  4. Have the user available for questions about environment architecture