MarketPilot AI
Everything the CRM + Auth + Supabase + Deploy role needs to get the app live.
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_*.
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.
For the demo, turn off “Confirm email” in Authentication → Providers → Email, then create an account and press “Load demo data” on the dashboard.
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.
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