Skip to main content
The Starter Kit uses environment variables to configure how it connects to the Cloud API and what features are available.

Configuration basics

Your application requires these environment variables:
.env.local

Environment-specific configuration

Local development

.env.local

Staging deployment

.env.staging

Production deployment

Never commit production credentials to version control. Use your hosting provider’s environment variable system.
Vercel:
  1. Go to Project Settings → Environment Variables
  2. Add each variable for Production environment
  3. Redeploy to apply changes
Netlify:
  1. Go to Site Settings → Build & Deploy → Environment
  2. Add environment variables
  3. Trigger new deploy
Other platforms: Follow your platform’s documentation for setting environment variables.

Configuration validation

The Starter Kit automatically validates configuration on startup via lib/deployment-mode.ts:
lib/deployment-mode.ts

Runtime configuration access

Server Components

Client Components

Server Actions

Request headers

The configuration automatically constructs required headers:
These headers authenticate your requests to the Cloud API.

Multi-project setup

To deploy the same codebase for multiple projects:
  1. Create separate deployments (e.g., separate Vercel projects)
  2. Configure different environment variables for each
  3. Each deployment gets its own PROJECT_ID and PROJECT_KEY
Example:

Troubleshooting

Check that:
  • All required variables are set
  • Project ID is valid UUID format
  • API URL is valid HTTPS URL
  • No extra whitespace in values
Verify:
  • Developer key is correct
  • Project ID matches your Cloud Admin project
  • Project API key is active
  • Restart dev server after changing environment variables
  • Clear Next.js cache: rm -rf .next
  • Restart development server
  • For production: trigger new deployment

Next steps

Environment Variables

Complete variable reference

Deploy

Deploy to production