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.
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
- Using default values
- Non-standard configuration
Multiple environments
Create environment-specific files:NODE_ENV.
Environment-specific API URLs
For testing against different API environments:.env.local
Security best practices
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
Configuration errors on startup
Configuration errors on startup
Check that:
.env.localexists in project root- All required variables are set
- Project ID is valid UUID format
- No extra spaces or quotes around values
API calls failing with 401
API calls failing with 401
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
Can't find .env.local file
Can't find .env.local file
The file might be hidden in your file browser:

