Skip to main content
Set up your development environment to work with the Cloud API and local services.

Environment variables

Create .env.local in your project root:
.env.local
1

Get your credentials

Log into Cloud Admin and create a project. Copy your:
  • Developer Key (starts with dk_)
  • Project ID (UUID format)
  • Project API Key (starts with ak_)
2

Create .env.local file

Copy the template above and replace placeholders with your actual credentials.
Never commit .env.local to version control. It’s already in .gitignore.
3

Verify configuration

Start the dev server:
If configuration is invalid, you’ll see an amber banner at the top of the page with specific errors.

Configuration validation

The Starter Kit automatically validates your environment on startup: Error-level issues (blocks API calls):
  • Missing required environment variables
  • Invalid Project ID format (must be UUID)
  • Invalid API URL format
Warning-level issues (app works but review recommended):
  • Using default values
  • Non-standard configuration
Check the browser console and terminal output for detailed validation messages.

Multiple environments

Create environment-specific files:
Next.js loads these automatically based on NODE_ENV.

Environment-specific API URLs

For testing against different API environments:
.env.local

Security best practices

Never expose sensitive credentials:
  • Don’t commit .env.local or .env.production
  • Don’t log environment variables in client code
  • Don’t share developer or API keys publicly
  • Rotate keys if accidentally exposed
For production:
  • Use your hosting provider’s secret management (Vercel, Netlify, etc.)
  • Enable environment variable encryption when available
  • Restrict API keys to specific domains in Cloud Admin

Troubleshooting

Check that:
  • .env.local exists in project root
  • All required variables are set
  • Project ID is valid UUID format
  • No extra spaces or quotes around values
Verify:
  • Developer key is correct and active
  • Project ID matches your Cloud Admin project
  • Project API key hasn’t been revoked
  • Restart dev server after changing .env.local
The file might be hidden in your file browser:

Next steps

Frontend Development

Start building your application

Cloud Admin

Manage credentials and settings