Local setup
Web app configuration
Create apps/web/src/app/supabase.settings.ts from the example file:
export const webSupabaseSettings = {
url: 'http://127.0.0.1:54321',
anonKey: '<from supabase status>',
billingProvider: 'mock', // or 'stripe' | 'custom'
// requireEmailConfirmation defaults to true (matches config.toml)
};Supabase
| Task | Command |
|---|---|
| Start stack | npm run db:start |
| Reset DB (local only) | npm run db:reset |
| Status / keys | npm run db:status |
Never run db:reset on shared or production databases.
Studio is available at the URL printed by db:status.
Edge Functions
Environment file: supabase/functions/.env
GENERATION_PROVIDER=mock
# FAL_API_KEY=... # optional
# GENERATION_WEBHOOK_SECRET=... # production webhooksServe locally: npm run functions:serve
Self-serve billing (mock checkout)
Migration 0043 gates update_organization_plan behind private.platform_settings.self_serve_billing.
Local supabase db reset enables it via seed. Do not enable on production — use verified billing webhooks instead. See Custom billing provider.
Common issues
| Symptom | Fix |
|---|---|
| HTTP 402 on generate | Top up credits (mock billing or plan change) |
| fal 422 on image URL | Use data URI rewrite for localhost references |
| Jobs stuck queued | Check GENERATION_PROVIDER, Edge logs |
| Video won’t play | Add host to CSP media-src in apps/web/src/index.html |
Last updated on