Environment Variables
Environment Variables
A .env.example template ships in the project root. Copy it to .env (or .env.local) and fill in your real values, or create the file with the following variables:
Pay close attention to the URL formats below. Some variables require
https://, some do not, and some require a trailing slash. Incorrect URL
formatting is one of the most common causes of issues.
# ===========================================
# Framecast AI - Environment Variables
# ===========================================
# -------------------------------------------
# Supabase Configuration
# -------------------------------------------
# For example: https://abcdefghij.supabase.co
NEXT_PUBLIC_SUPABASE_URL=your-supabase-url
NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY=your-supabase-publishable-key
SUPABASE_SECRET_KEY=your-supabase-secret-key
# -------------------------------------------
# App Configuration
# -------------------------------------------
# Full URL with http:// or https:// and no trailing slash
# For example: http://localhost:3000
NEXT_PUBLIC_APP_URL=http://localhost:3000
# -------------------------------------------
# Stripe Configuration
# -------------------------------------------
NEXT_PUBLIC_STRIPE_IS_ENABLED=true
STRIPE_PUBLISHABLE_KEY=your-stripe-publishable-key
STRIPE_SECRET_KEY=your-stripe-secret-key
STRIPE_WEBHOOK_SECRET=your-stripe-webhook-secret
# -------------------------------------------
# PayPal Configuration
# -------------------------------------------
# Sandbox: https://api-m.sandbox.paypal.com | Production: https://api-m.paypal.com
# Must include https:// and no trailing slash
PAYPAL_API_URL=https://api-m.sandbox.paypal.com
NEXT_PUBLIC_PAYPAL_CLIENT_ID=your-paypal-client-id
PAYPAL_CLIENT_SECRET=your-paypal-client-secret
# -------------------------------------------
# Razorpay Configuration
# -------------------------------------------
NEXT_PUBLIC_RAZORPAY_KEY_ID=your-razorpay-key-id
RAZORPAY_KEY_SECRET=your-razorpay-key-secret
# -------------------------------------------
# Flutterwave Configuration
# -------------------------------------------
# Test keys start with FLWPUBK_TEST- and FLWSECK_TEST-
NEXT_PUBLIC_FLUTTERWAVE_PUBLIC_KEY=your-flutterwave-public-key
FLUTTERWAVE_SECRET_KEY=your-flutterwave-secret-key
FLUTTERWAVE_ENCRYPTION_KEY=your-flutterwave-encryption-key
# -------------------------------------------
# Dodo Payments Configuration
# -------------------------------------------
# Merchant-of-record gateway. Create products in the Dodo dashboard and map
# their product IDs to each billing package in Admin > Billing Packages.
# test_mode = sandbox | live_mode = production
NEXT_PUBLIC_DODO_ENV=test_mode
DODO_PAYMENTS_API_KEY=your-dodo-api-key
DODO_PAYMENTS_WEBHOOK_KEY=your-dodo-webhook-key
# -------------------------------------------
# Paddle Configuration
# -------------------------------------------
# Merchant-of-record gateway. Create prices in the Paddle dashboard and map
# their price IDs to each billing package in Admin > Billing Packages.
# sandbox | production
NEXT_PUBLIC_PADDLE_ENV=sandbox
NEXT_PUBLIC_PADDLE_CLIENT_TOKEN=test_...
PADDLE_API_KEY=your-paddle-api-key
PADDLE_WEBHOOK_SECRET=pdl_ntf_...
# -------------------------------------------
# Astria AI Configuration
# -------------------------------------------
ASTRIA_API_KEY=your-astria-api-key
# Domain only, no https:// and no trailing slash
# For example: localhost:3000 or myapp.vercel.app
ASTRIA_WEBHOOK_URL=localhost:3000
# -------------------------------------------
# Gemini AI Configuration (Magic Editor)
# -------------------------------------------
GEMINI_API_KEY=your-gemini-api-key
# -------------------------------------------
# Resend Email Configuration
# -------------------------------------------
RESEND_API_KEY=your-resend-api-key
RESEND_SENDER_EMAIL=Your App <noreply@yourdomain.com>
# -------------------------------------------
# Google Analytics
# -------------------------------------------
# Full script URL including https://
# For example: https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID=https://www.googletagmanager.com/gtag/js?id=G-XXXXXXXXXX
NEXT_PUBLIC_GOOGLE_ANALYTICS_ID_VALUE=G-XXXXXXXXXXEach variable is explained in detail in the relevant section of the documentation (Astria, Resend, Payment Gateways, etc.). For now, just make sure this file exists in your project root.
Framecast AI uses a production Supabase instance for both local development and production. If you prefer to run Supabase entirely on your own infrastructure, refer to the official Supabase self-hosting docs.
This is how your project root directory should look after creating the .env file: