CoachingAI is a Next.js application that integrates with Supabase and n8n. The project uses Netlify for deployment.
Create a .env.local file in the project root and define the following variables:
NEXT_PUBLIC_SUPABASE_URL– URL of your Supabase instanceNEXT_PUBLIC_SUPABASE_ANON_KEY– anonymous API key from SupabaseNEXT_PUBLIC_SKIP_AUTH– set totrueto bypass authentication when developingN8N_WEBHOOK_URL– serverless functions send data to this n8n webhookNEXT_PUBLIC_N8N_WEBHOOK_URL– client side webhook for the hybrid offer toolNEXT_PUBLIC_N8N_WORKSHOP_WEBHOOK_URL– webhook used by the workshop generator
Example:
NEXT_PUBLIC_SUPABASE_URL=https://project.supabase.co
NEXT_PUBLIC_SUPABASE_ANON_KEY=your_anon_key
N8N_WEBHOOK_URL=https://n8n.example.com/webhook/abc123
NEXT_PUBLIC_N8N_WEBHOOK_URL=https://n8n.example.com/webhook/hybrid
NEXT_PUBLIC_N8N_WORKSHOP_WEBHOOK_URL=https://n8n.example.com/webhook/workshop
NEXT_PUBLIC_SKIP_AUTH=trueInstall dependencies and start the development server:
npm install
npm run devThe app runs on http://localhost:3000.
The repository includes a netlify.toml configuration for Netlify.
- Push the project to your Git provider.
- Create a new site on Netlify and link it to the repository.
- Add the environment variables listed above in the Netlify dashboard.
- Netlify will execute
npm run buildand publish the.nextdirectory.
A few scripts help verify your setup:
node check-env.js– prints the current Supabase environment variables.node test-supabase.js– attempts a simple database write using your Supabase credentials.- With the dev server running you can test the n8n integration:
curl -X POST http://localhost:3000/api/test-n8n
The application stores additional details about each account. These fields are:
- Business Name
- Business Type
- Target Audience
- Business Description
- Goals
- Challenges
You will be prompted to provide this information on your first login. The same form can be revisited at any time from the Settings page to update your profile.