Skip to main content

Environment Variables

Set all of these in Portainer (or .env.local for local dev).

VariablePurpose
RESEND_API_KEYResend API key
RESEND_FROM_EMAILVerified sender address — domain must be verified in Resend dashboard
RESEND_TO_EMAILNotification recipient address
PRINTFUL_API_KEYPrintful API token
PRINTFUL_STORE_IDPrintful store numeric ID
PRINTFUL_WEBHOOK_SECRETPrintful webhook signing secret — returned once on registration, store immediately
SUPABASE_URLSupabase project URL
SUPABASE_SERVICE_ROLE_KEYSupabase service role key (server-only, never expose to client)
NEXT_PUBLIC_APP_URLPublic base URL e.g. https://makinmagic.com — used to build questionnaire links

Gotchas

  • RESEND_FROM_EMAIL must use a domain verified in the Resend dashboard — not just any DNS domain. Add and verify at resend.com → Domains.
  • PRINTFUL_WEBHOOK_SECRET is only shown once when you register the webhook. If lost, re-run npm run register:webhooks and update the env var in Portainer.
  • SUPABASE_SERVICE_ROLE_KEY bypasses row-level security — never expose it client-side or in NEXT_PUBLIC_* vars.