App Package Variables
The main application (packages/app) requires Supabase configuration to connect to the backend.
string
required
Supabase project URL. For local development, use the local Supabase instance.Default (local):
http://127.0.0.1:54321Example (production): https://your-project.supabase.costring
required
Supabase 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
string
required
Supabase project URL for the Next.js landing site. Should match the app package URL.Default (local):
http://127.0.0.1:54321string
required
Supabase anonymous key for the Next.js landing site. Should match the app package anon key.
Google OAuth Configuration
string
Google OAuth 2.0 client ID for social authentication.Configure in Supabase Dashboard → Authentication → Providers → Google or in
config.toml for local development.string
Google OAuth 2.0 client secret. Keep this secure and never commit to version control.
Stripe Configuration (Optional)
string
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 keysstring
Stripe 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)
string
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
1
Start Supabase
Run local Supabase instance:Copy the
anon key from the output.2
Create environment files
Create
.env files in both packages using the examples above.3
Start development servers
From the repository root:This starts both the landing site and app simultaneously.
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