Supabase Setup & Configuration
This guide covers the configuration and secrets management for the Supabase backend services.
Edge Function Secrets
To make the Edge Functions work (e.g., Paddle Webhooks, OAuth, etc.), you must set the following secrets in your Supabase project.
Required Secrets
You can set these via the Supabase Dashboard or using the CLI.
| Secret Key | Description | Example / Note |
|---|---|---|
PADDLE_WEBHOOK_SECRET | Secret from Paddle Dashboard for verifying webhooks | sd_... |
PADDLE_PRO_PRICE_IDS | Comma-separated list of Price IDs for the Pro plan | pri_123,pri_456 |
PADDLE_AGENCY_PRICE_IDS | Comma-separated list of Price IDs for the Agency plan | pri_789,pri_012 |
PADDLE_API_URL | Paddle API URL (Set to https://api.paddle.com for Prod) | https://api.paddle.com |
TURNSTILE_SECRET_KEY | Cloudflare Turnstile Secret Key (server-side) | 1x00... |
GEMINI_API_KEY | Google Gemini API Key for AI generations |
Setting Secrets via CLI
-
Create a local env file (e.g.,
.env.prod) with the secrets:PADDLE_WEBHOOK_SECRET=your_secret_here
PADDLE_PRO_PRICE_IDS=pri_xxx,pri_yyy
PADDLE_AGENCY_PRICE_IDS=pri_zzz,pri_aaa
# ... other secrets -
Push to Supabase:
# For Production
npx supabase secrets set --env-file .env.prod --project-ref <your-project-ref>
# For Local Dev (uses .env)
# Secrets are automatically loaded from .env in local dev
Function Configuration (config.toml)
The services/supabase/config.toml file controls the configuration for Edge Functions, including:
- JWT Verification: Whether to require a valid Supabase JWT (
verify_jwt = true). - Import Map: Path to the import map file.
Example:
[functions.api-v1-hashtag-analytics]
verify_jwt = false # Public function (handles its own auth or is open)