Overview
Trazea uses environment variables to configure its connections to Supabase, Sentry error tracking, and ElevenLabs voice services. All environment variables follow the Vite convention and must be prefixed withVITE_.
Required Environment Variables
Create a.env file in the root of your project based on .env.example:
Core Configuration
Environment Variable Details
VITE_SUPABASE_URL
Your Supabase project URL. Found in your Supabase project settings under Settings > API.Format:
https://xxxxxxxxxxx.supabase.coVITE_SUPABASE_ANON_KEY
Your Supabase anonymous (public) key. Found in your Supabase project settings under Settings > API.This key is safe to use in client-side code as it respects Row Level Security (RLS) policies.
VITE_SENTRY_DSN
Your Sentry Data Source Name for error tracking. Get this from your Sentry project settings.Format:
https://[email protected]/zzzzzzRecommended for production to track and debug errors in real-time.VITE_PUBLIC_ELEVENLABS_API_KEY
API key for ElevenLabs text-to-speech service used in voice agent features.Get your API key from elevenlabs.io
Environment-Specific Configuration
Development
For local development, create a.env file with your development credentials:
Production
For production deployments, set environment variables in your hosting platform:- Vercel: Configure in project settings under Settings > Environment Variables
- Docker: Use
.envfile or pass viadocker run -eflags - Other platforms: Follow platform-specific environment variable configuration
Validation
The Supabase client (src/shared/api/supabase.ts) validates environment variables on initialization:
Supabase Client Configuration
The Supabase client is configured with the following settings:- Automatic token refresh before expiration
- Session persistence across page reloads
- OAuth provider callback handling (Google OAuth)
Next Steps
Supabase Configuration
Set up your Supabase project, authentication, and RLS policies
Deploy to Vercel
Deploy Trazea to Vercel with automatic deployments