Skip to main content

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 KeyDescriptionExample / Note
PADDLE_WEBHOOK_SECRETSecret from Paddle Dashboard for verifying webhookssd_...
PADDLE_PRO_PRICE_IDSComma-separated list of Price IDs for the Pro planpri_123,pri_456
PADDLE_AGENCY_PRICE_IDSComma-separated list of Price IDs for the Agency planpri_789,pri_012
PADDLE_API_URLPaddle API URL (Set to https://api.paddle.com for Prod)https://api.paddle.com
TURNSTILE_SECRET_KEYCloudflare Turnstile Secret Key (server-side)1x00...
GEMINI_API_KEYGoogle Gemini API Key for AI generations

Setting Secrets via CLI

  1. 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
  2. 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)