App Package Variables
The main application (packages/app) requires Supabase configuration to connect to the backend.
Supabase project URL. For local development, use the local Supabase instance.Default (local):
http://127.0.0.1:54321Example (production): https://your-project.supabase.coSupabase anonymous key for client-side authentication. This key is safe to expose in the browser.Local development: Copy from
supabase start outputProduction: Get from Supabase Dashboard → Settings → APIApp Configuration Example
Createpackages/app/.env:
packages/app/.env
Landing Package Variables
The landing site (packages/landing) requires additional variables for authentication and payment processing.
Supabase Configuration
Supabase project URL for the Next.js landing site. Should match the app package URL.Default (local):
http://127.0.0.1:54321Supabase anonymous key for the Next.js landing site. Should match the app package anon key.
Google OAuth Configuration
Google OAuth 2.0 client ID for social authentication.Configure in Supabase Dashboard → Authentication → Providers → Google or in
config.toml for local development.Google OAuth 2.0 client secret. Keep this secure and never commit to version control.
Stripe Configuration (Optional)
Stripe secret key for payment processing. Used by the Stripe API routes.Format:
sk_test_... (test) or sk_live_... (production)Get from: Stripe Dashboard → Developers → API keysStripe webhook signing secret for verifying webhook events.Format:
whsec_...Get from: Stripe Dashboard → Developers → WebhooksStripe configuration is optional. The billing features will be disabled if these variables are not set.
Email Configuration (Optional)
Resend API key for transactional email delivery.Format:
re_...Get from: Resend Dashboard → API KeysLanding Configuration Example
Createpackages/landing/.env.local:
packages/landing/.env.local
Getting Started
Security Best Practices
- Public variables (
NEXT_PUBLIC_*,VITE_*) are safe to expose in the browser - Secret variables (API keys, secrets) should only be used server-side
- Use different keys for development, staging, and production environments
- Rotate keys regularly and immediately if compromised
- Store production secrets in secure environment variable services (Vercel, Railway, etc.)
Client Configuration
The Supabase client automatically configures authentication features:packages/app/src/integrations/supabase/client.ts
Session persistence and automatic token refresh are enabled by default for a seamless user experience.
Related Resources
Database Setup
Configure the PostgreSQL database schema
Authentication
Set up Supabase Auth with providers
Billing Setup
Configure Stripe payment integration