Environments
Alpha, Beta, and Prod — purpose, URLs, access, and promotion rules.
Three environments protect users while giving developers fast feedback. Code always moves Alpha → Beta → Prod — never skipping a stage.
Environment overview
Environment comparison
| Alpha | Beta | Production | |
|---|---|---|---|
| Purpose | Preview & code review | Integration & QA testing | Live customer traffic |
| Trigger | PR opened / updated | Merge to main | Release approval + tag |
| Stability | Experimental — may break | Stable — team-tested | Highly stable — SLA-backed |
| Data | Synthetic / anonymized seed | Staging database snapshot | Production database |
| Audience | Author + reviewers | Engineering, QA, Product | End users |
| URL pattern | alpha-{pr-id}.preview.company.com | beta.company.com | app.company.com |
| Rollback | Close PR or push fix | Revert merge on main | Rollback runbook |
Alpha — Pull Request previews
Every open pull request gets an isolated Alpha deployment.
Rules:
- Alpha deploys are ephemeral — destroyed when the PR is closed
- Use Alpha to demo changes to product and design
- Never use real customer data in Alpha
Beta — Integration environment
Beta always reflects the latest code on main. It is the single source of truth for pre-production testing.
Rules:
- All features must be validated on Beta before a production release
- Beta runs against staging database — never production data
- Beta credentials are in the team vault under
env/beta/
Production — Live environment
Production serves real users. Deployments require explicit approval.
Rules:
- Production deploys only from tagged releases on
main - Requires code owner + SRE approval
- Post-deploy monitoring is mandatory for 30 minutes
Environment variables
Each environment has its own configuration. Never share secrets across environments.
# Alpha (preview — injected by CI)
NEXT_PUBLIC_API_URL=https://alpha-api.preview.company.com
NEXT_PUBLIC_APP_ENV=alpha
# Beta
NEXT_PUBLIC_API_URL=https://beta-api.company.com
NEXT_PUBLIC_APP_ENV=beta
# Production
NEXT_PUBLIC_API_URL=https://api.company.com
NEXT_PUBLIC_APP_ENV=production