Configuration
Environment variables and configuration options.
Environment File
All configuration is in a single .env.local file at the project root.
# App
NEXT_PUBLIC_APP_URL=http://localhost:3000
# Supabase
NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
# Postgres app data
DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres
# Stripe
NEXT_PUBLIC_STRIPE_PUBLISHABLE_KEY=pk_test_...
STRIPE_SECRET_KEY=sk_test_...
STRIPE_WEBHOOK_SECRET=whsec_...
# Optional: AI
GOOGLE_API_KEY=your-google-api-keyRequired Variables
Prop
Type
Optional Variables
Prop
Type
Getting Local Credentials
Supabase
After starting Supabase, get credentials with:
bunx supabase statusThis outputs the auth values:
API URL: http://127.0.0.1:54321
anon key: eyJ...Copy those auth values to your .env.local, then add a direct Postgres DATABASE_URL for app data.
Stripe
- Go to Stripe Dashboard
- Copy the Publishable key and Secret key
- For webhook secret, run
./coremvp stripe:listen; it syncsSTRIPE_WEBHOOK_SECRETinto.env.local
After the listener syncs the webhook secret, restart bun run dev so the app loads the active signing secret.
Production Configuration
Never commit secrets to version control. Use environment variables in your deployment platform.
For production, set these in your hosting platform (Vercel, Railway, etc.):
| Variable | Where to Get |
|---|---|
NEXT_PUBLIC_SUPABASE_URL | Supabase Dashboard > Settings > API |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase Dashboard > Settings > API |
DATABASE_URL | Your Postgres provider connection string |
STRIPE_SECRET_KEY | Stripe Dashboard > API Keys (use live key) |
STRIPE_WEBHOOK_SECRET | Stripe Dashboard > Webhooks > Signing secret |
Stripe Products
Stripe products are managed in your Stripe Dashboard. The template syncs products via webhooks into your Postgres app database.
To set up products:
- Create products in Stripe Dashboard
- Add prices (one-time for lifetime, recurring for subscriptions)
- Products sync to your database via the webhook endpoint
See Payments for setup details.
Was this page helpful?