Environment Variables
Reference for every variable in .env.example.
All env vars are validated at startup with Zod. The app will throw a descriptive error and refuse to start if a required value is missing or malformed.
| Variable | Description | Example |
|---|
DATABASE_URL | PostgreSQL connection string | postgresql://postgres:postgres@localhost:5432/shipforge |
In production use your Neon connection string.
| Variable | Description | Example |
|---|
BETTER_AUTH_SECRET | Random secret for session signing | openssl rand -base64 32 |
BETTER_AUTH_URL | Full URL of your app | http://localhost:3000 |
GOOGLE_CLIENT_ID | Google OAuth app client ID | From Google Cloud Console |
GOOGLE_CLIENT_SECRET | Google OAuth app client secret | From Google Cloud Console |
| Variable | Description | Example |
|---|
STORAGE_ENDPOINT | S3-compatible endpoint | http://localhost:9000 (MinIO) or B2 endpoint |
STORAGE_ACCESS_KEY | Access key ID | minioadmin locally |
STORAGE_SECRET_KEY | Secret access key | minioadmin locally |
STORAGE_BUCKET | Bucket name | shipforge |
STORAGE_REGION | Region | us-east-1 |
| Variable | Description | Example |
|---|
RESEND_API_KEY | Resend API key | re_... — leave empty locally (Mailpit is used) |
EMAIL_FROM | Sender address | noreply@yourdomain.com |
| Variable | Description | Example |
|---|
NEXT_PUBLIC_APP_URL | Public-facing URL | http://localhost:3000 |
| Variable | Description | Example |
|---|
STRIPE_SECRET_KEY | Stripe secret key | sk_live_... / sk_test_... |
STRIPE_WEBHOOK_SECRET | Webhook signing secret | From Stripe dashboard → Webhooks |
STRIPE_PRICE_ID_STARTER_MONTHLY | Stripe Price ID for Starter monthly | price_... |
STRIPE_PRICE_ID_STARTER_ANNUAL | Stripe Price ID for Starter annual | price_... |
STRIPE_PRICE_ID_PRO_MONTHLY | Stripe Price ID for Pro monthly | price_... |
STRIPE_PRICE_ID_PRO_ANNUAL | Stripe Price ID for Pro annual | price_... |
STRIPE_PRICE_ID_BUSINESS_MONTHLY | Stripe Price ID for Business monthly | price_... |
STRIPE_PRICE_ID_BUSINESS_ANNUAL | Stripe Price ID for Business annual | price_... |
In development, use Stripe test mode keys (sk_test_...). Create test Price objects in the Stripe dashboard using the same plan amounts as production.