CoreMVP

Configuration

Environment variables and configuration options.

Environment File

All configuration is in a single .env.local file at the project root.

.env.local
# 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-key

Required Variables

Prop

Type

Optional Variables

Prop

Type

Getting Local Credentials

Supabase

After starting Supabase, get credentials with:

bunx supabase status

This 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

  1. Go to Stripe Dashboard
  2. Copy the Publishable key and Secret key
  3. For webhook secret, run ./coremvp stripe:listen; it syncs STRIPE_WEBHOOK_SECRET into .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.):

VariableWhere to Get
NEXT_PUBLIC_SUPABASE_URLSupabase Dashboard > Settings > API
NEXT_PUBLIC_SUPABASE_ANON_KEYSupabase Dashboard > Settings > API
DATABASE_URLYour Postgres provider connection string
STRIPE_SECRET_KEYStripe Dashboard > API Keys (use live key)
STRIPE_WEBHOOK_SECRETStripe 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:

  1. Create products in Stripe Dashboard
  2. Add prices (one-time for lifetime, recurring for subscriptions)
  3. Products sync to your database via the webhook endpoint

See Payments for setup details.

Was this page helpful?

On this page