MarketPilot AI

Setup checklist

Everything the CRM + Auth + Supabase + Deploy role needs to get the app live.

Supabase environment variables detected.
  1. 1 · Create the Supabase project

    Copy the Project URL and the anon (public) key into .env.local. Never put the service_role key in the browser or in NEXT_PUBLIC_*.

  2. 2 · Run the migrations

    Paste supabase/migrations/0001 → 0004 into the SQL editor in order, or run `supabase db push` if you use the CLI. This creates tables, RLS policies, the private documents bucket and the KPI view.

  3. 3 · Configure auth

    For the demo, turn off “Confirm email” in Authentication → Providers → Email, then create an account and press “Load demo data” on the dashboard.

  4. 4 · Point the app at n8n

    Set N8N_INGESTION_WEBHOOK_URL (WF-03), ORCHESTRATOR_WEBHOOK_URL (WF-01) and a shared N8N_WEBHOOK_SECRET. Ingestion calls send the secret as x-webhook-secret.

  5. 5 · Deploy

    Push to GitHub, import the repo in Vercel, add the same variables (service_role as a server-only secret), then verify sign-in, CRUD, upload and chat on the production URL.

Environment variables

NEXT_PUBLIC_SUPABASE_URL=https://xxxx.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=eyJ...
SUPABASE_SERVICE_ROLE_KEY=eyJ...            # server only
N8N_INGESTION_WEBHOOK_URL=https://n8n.../webhook/ingest
ORCHESTRATOR_WEBHOOK_URL=https://n8n.../webhook/orchestrator
N8N_WEBHOOK_SECRET=change-me

← Back to sign in