Environment Setup
Configure service credentials and environment variables for local development.
Environment variables separate sensitive credentials from source code. The configuration connects StarterApp to authentication providers, database services, and billing infrastructure.
Development vs Production
Development uses placeholder values and localhost URLs. Production requires real service credentials and HTTPS domains. The .env.local file is gitignored to prevent credential leaks.
Initial Configuration
Create the local environment file from the template:
cp .env.example .env.localThe .env.local file stores credentials outside version control. Each developer maintains individual configuration values.
Required Variables
Core services require configuration before the application starts:
Billing Configuration
UseAutumn Integration (Optional)
If you plan to use StarterApp's billing flows, configure UseAutumn before syncing to Convex. Otherwise you can skip this section—the default placeholder keeps billing disabled without breaking builds.
Create account at UseAutumn ↗ and obtain secret key from Settings > API Keys
Add the secret key to .env.local:
AUTUMN_SECRET_KEY=am_sk_your_key_hereEdit autumn.config.ts to define products, features, and pricing tiers matching the business model
Synchronize configuration to UseAutumn:
npx atmn pushBilling operations fail until configuration synchronization completes. Rerun npx atmn push after modifying products or features in autumn.config.ts.
Convex Environment Sync
Convex functions run in managed infrastructure requiring separate environment configuration. Sync credentials to the Convex deployment using the automated script or manual commands. When billing is not enabled, skip the Autumn secret—the sync script automatically ignores unset values.
Production Configuration
Configure production environment variables through the Convex Dashboard ↗. Navigate to Settings > Environment Variables to set production credentials directly in the web interface.
Optional Services
Additional integrations for analytics and security:
Environment Variables Reference
Complete variable listing organized by service:
Validation
Verify configuration by starting the development server:
pnpm devSuccessful startup confirms proper environment configuration. The terminal displays application URLs:
- Marketing:
http://localhost:3000 - Dashboard:
http://localhost:3001 - Docs:
http://localhost:3100
Common Configuration Errors
Security Best Practices
Environment variable management follows security principles:
- Files with
.localsuffix are gitignored automatically - Production credentials remain separate from development values
- Secrets rotate independently per environment
- No credentials appear in source code or commit history
- Team members maintain individual development configurations
Next Steps
After environment configuration:
AI Onboarding
Complete automated setup with AI-guided dependency installation and first boot.
Platform Setup
Install Node.js, pnpm, and development tools for your operating system.
Authentication
Configure OAuth providers, session management, and protected routes.
Billing
Set up UseAutumn integration, feature gates, and subscription tiers.