Vercel
Could decentralized blockchain tech eventually outcompete?
Develop Preview Ship: Our platform enables product teams to do their best work. Vercel combines the best developer experience with an obsessive focus on end-user performance.
Environment Strategy
Vercel deploys into three scopes. Mismatched env vars are the #1 cause of preview crashes.
Three Scopes
| Scope | Branch | Purpose | Env vars |
|---|---|---|---|
| Production | main | Live users | Real API keys, prod databases |
| Preview | All other branches | PR review, QA | Sandbox keys, test databases |
| Development | Local only | vercel dev | Pulled via vercel env pull |
Solo Setup
Minimum viable config for a single developer:
-
mainbranch deploys to Production - All other branches deploy to Preview
- Production env vars: real keys, prod DB connection
- Preview env vars: sandbox keys, test DB connection
- Local: run
vercel env pull .env.local— never commit.env - Each API key scoped to the environments that need it
Growth Triggers
Add a dedicated staging environment when:
| Trigger | Why |
|---|---|
| Team QA needed | Reviewers need a stable target, not per-PR previews |
| Risky migrations | Database schema changes need a pre-prod gate |
| Compliance required | Audit trail demands a named environment |
| External integrations | Third-party webhooks need a fixed URL |
Env Var Rules
| Rule | Reason |
|---|---|
| Real keys in Production only | Limits blast radius of leaked secrets |
| Sandbox keys in Preview | Preview deploys are semi-public (URL is guessable) |
vercel env pull for local | Single source of truth, no manual .env management |
Never commit .env files | Git history is permanent — secrets in commits are leaked |
| Scope every var explicitly | Unscoped vars default to all environments — over-exposes secrets |
Env Validation
Preview deploys crash when code expects env vars that only exist in Production. Guard against this:
| Pattern | When |
|---|---|
Check VERCEL_ENV before requiring keys | Non-critical integrations (analytics, email) |
| Provide fallback behavior | Feature works without the integration |
| Fail fast with clear error | Critical dependency missing — better than a cryptic crash |
The fix: read VERCEL_ENV (production, preview, or development) and relax validation for non-prod. Skip optional integrations rather than crashing the deploy.
Context
Features
Competitors
- Fleek: Decentralized Competition
- NX Cloud
- render.com
Articles
Questions
When does a preview environment need its own secrets instead of sandbox keys?
- What env vars should fail the build versus degrade gracefully?
- At what team size does a dedicated staging environment pay for itself?
- How do you audit which secrets are exposed to which Vercel scope?