Get started
Environment variables
Every credential Launch Kit reads, where it goes, and whether you need it to run locally or to take a payment.
Copy .env.example to .env.local. Restart npm run dev after you change a NEXT_PUBLIC_* value.
The file
| Variable | Service | Required to | What Launch Kit does with it |
|---|---|---|---|
NEXT_PUBLIC_SITE_URL | App | Production URLs | Public site URL. Falls back to localhost in dev, then config.domainName |
NEXT_PUBLIC_SUPABASE_URL | Supabase | Sign in | Project URL for browser, server, and middleware |
NEXT_PUBLIC_SUPABASE_ANON_KEY | Supabase | Sign in | Public anon key. RLS still applies |
SUPABASE_SERVICE_ROLE_KEY | Supabase | Grant access after pay | Stripe webhook writes profiles and can create a user |
STRIPE_SECRET_KEY | Stripe | Checkout | Creates Checkout and portal sessions, verifies webhooks |
STRIPE_WEBHOOK_SECRET | Stripe | Grant access after pay | Signature check on /api/webhook/stripe |
NEXT_PUBLIC_STRIPE_PRICE_ID | Stripe | Show a working Buy button | Plan priceId in config.ts, sent to Checkout |
RESEND_API_KEY | Resend | Welcome email | sendEmail() in libs/resend.ts |
SITE_URL | Sitemap | Production SEO | next-sitemap site URL. Falls back to https://launch-kit.co |
STRIPE_PUBLIC_KEY | — | No | Listed in .env.example. Not read by the app |
Use Stripe test keys and the Resend test sender. Set:
bash
NEXT_PUBLIC_SITE_URL=http://localhost:3000Leave SITE_URL unset until you deploy. Forward webhooks with the Stripe CLI. See Stripe.
Set every row above except STRIPE_PUBLIC_KEY. Use live Stripe keys, a verified Resend domain, and:
bash
NEXT_PUBLIC_SITE_URL=https://your-domain.com
SITE_URL=https://your-domain.comThen update Supabase redirect URLs and the Stripe webhook endpoint. See Deploy.
Where to get each key
Full setup for each dashboard: