Skip to content

Environment Variables

PIP AI uses environment variables for configuration. Copy .env.example to .env and configure the values below.

Supabase Configuration

VariableRequiredDescription
NUXT_PUBLIC_SUPABASE_URLYesSupabase project URL (e.g., https://xxx.supabase.co)
NUXT_PUBLIC_SUPABASE_KEYYesSupabase anon/public key
SUPABASE_SERVICE_KEYYesSupabase service role key (server-side only, bypasses RLS)

WARNING

Never expose the SUPABASE_SERVICE_KEY to the client. It is only used in server routes (server/api/).

N8N Webhook Configuration

VariableRequiredDescription
N8N_BASE_URLYesBase URL of your N8N instance
N8N_WEBHOOK_SPEC_PROCESSORYesWebhook path for spec document processing
N8N_WEBHOOK_PIP_PROCESSORYesWebhook path for PIP document processing
N8N_WEBHOOK_FLOOR_PLAN_PROCESSORYesWebhook path for floor plan processing
N8N_WEBHOOK_SECRETYesShared secret for webhook authentication

Default Webhook Paths

If not set, the following defaults are used:

N8N_WEBHOOK_SPEC_PROCESSOR=/webhook/pip-ai-spec-upsert
N8N_WEBHOOK_PIP_PROCESSOR=/webhook/pip-ai-pip-processor
N8N_WEBHOOK_FLOOR_PLAN_PROCESSOR=/webhook/pip-ai-floor-plan-processor

Nano Banana (AI Image Generation)

VariableRequiredDescription
N8N_WEBHOOK_NANO_BANANA_PROCESSORNoWebhook URL for AI image generation
N8N_NANO_BANANA_SECRETNoShared secret for Nano Banana callbacks

Development Settings

VariableRequiredDescription
NUXT_PUBLIC_DEV_AUTH_BYPASSNoSet to true to skip authentication in development
NUXT_PUBLIC_SITE_URLNoSite URL for callbacks (defaults to http://localhost:3000)

Runtime Config Mapping

Environment variables are mapped to Nuxt runtime config in nuxt.config.ts:

typescript
runtimeConfig: {
  // Server-side only
  supabaseServiceKey: process.env.SUPABASE_SECRET_KEY,
  n8nWebhookSecret: process.env.N8N_WEBHOOK_SECRET,
  n8nNanoBananaSecret: process.env.N8N_NANO_BANANA_SECRET,

  public: {
    devAuthBypass: process.env.NUXT_PUBLIC_DEV_AUTH_BYPASS === 'true',
    siteUrl: process.env.NUXT_PUBLIC_SITE_URL || 'http://localhost:3000',
    n8nBaseUrl: process.env.N8N_BASE_URL || '',
    // ... webhook paths
  }
}

Example .env File

ini
# Supabase
NUXT_PUBLIC_SUPABASE_URL=https://your-project.supabase.co
NUXT_PUBLIC_SUPABASE_KEY=eyJ...your-anon-key
SUPABASE_SERVICE_KEY=eyJ...your-service-role-key

# N8N
N8N_BASE_URL=https://your-n8n-instance.com
N8N_WEBHOOK_SECRET=your-webhook-secret

# Development
NUXT_PUBLIC_DEV_AUTH_BYPASS=true
NUXT_PUBLIC_SITE_URL=http://localhost:3000

Built with VitePress