This project requires several environment variables to function correctly. These variables are used for authentication, API integrations, and database connections.
SUPABASE_URL: The URL of your Supabase project (e.g.,https://your-project.supabase.co).SUPABASE_ANON_KEY: The anonymous public key from your Supabase project settings (Project Settings -> API).SUPABASE_SERVICE_ROLE_KEY: (Optional for server-side functions) The service role key with elevated privileges. Do not expose this in client-side code.
To enable analytics fetching for creators, you need to set up developer apps for the respective platforms and obtain API keys/tokens.
TIKTOK_CLIENT_KEY: Your TikTok Developer App Key.TIKTOK_CLIENT_SECRET: Your TikTok Developer App Secret.INSTAGRAM_APP_KEY: Your Instagram/Meta App Key.INSTAGRAM_APP_SECRET: Your Instagram/Meta App Secret.YOUTUBE_API_KEY: Your Google Cloud Console Project API Key (enabled for YouTube Data API v3).FACEBOOK_APP_KEY: Your Facebook/Meta App Key.FACEBOOK_APP_SECRET: Your Facebook/Meta App Secret.
RESEND_API_KEY: Your Resend API key for sending transactional emails.
ANTHROPIC_API_KEY: Your Anthropic API key for AI features (Video Insights).
- Go to your project dashboard on Vercel.
- Select your project.
- Go to Settings -> Environment Variables.
- Add each variable with its corresponding value.
- Ensure you add
SUPABASE_URLandSUPABASE_ANON_KEYas Production, Development, and Preview variables so they are available in all environments. - For server-side functions (like
/api/analytics), you may also need to addSUPABASE_SERVICE_ROLE_KEYand any other secret keys. - Redeploy your project (or push a new commit) to ensure the new environment variables are loaded.
To set up the required tables and security policies in Supabase:
- Open the database_setup.sql file in this repository.
- Copy its contents.
- Go to your Supabase project -> SQL Editor.
- Paste the SQL and click Run.
Create a .env.local file in the root directory (if not already present) to store these variables locally:
SUPABASE_URL=...
SUPABASE_ANON_KEY=...
# Add other keys as needed