Introduces src/lib/site-url.ts with getSiteUrl(), getSiteUrlFromRequest(), and getSiteHostname() helpers that cascade through NEXT_PUBLIC_SITE_URL, AUTH_URL, VERCEL_URL, and localhost so no code path ever falls back to a third-party domain we may not own. - forgot-password route now derives the base URL from the incoming request origin so reset links always match the host the user hit - email-sender, layout metadata, email preview, and QR code routes use the new helper; email footers display the derived hostname instead of a hardcoded brand string - .env.example clarifies the real expected values for AUTH_URL and NEXT_PUBLIC_SITE_URL per environment Made-with: Cursor
60 lines
2.8 KiB
Text
60 lines
2.8 KiB
Text
# ─── Database (Supabase pooled connection) ────────────────────
|
|
DATABASE_URL="postgresql://postgres.<ref>:<password>@aws-0-us-east-1.pooler.supabase.com:6543/postgres"
|
|
|
|
# ─── Object Storage (Supabase Storage, S3-compatible) ─────────
|
|
STORAGE_ENDPOINT="https://<ref>.supabase.co/storage/v1/s3"
|
|
STORAGE_REGION="us-east-1"
|
|
STORAGE_ACCESS_KEY=""
|
|
STORAGE_SECRET_KEY=""
|
|
STORAGE_BUCKET="echos-ocr"
|
|
|
|
# ─── Upstash QStash (job queue) ───────────────────────────────
|
|
QSTASH_TOKEN=""
|
|
QSTASH_CURRENT_SIGNING_KEY=""
|
|
QSTASH_NEXT_SIGNING_KEY=""
|
|
|
|
# ─── Vercel AI Gateway ────────────────────────────────────────
|
|
AI_GATEWAY_API_KEY=""
|
|
|
|
# ─── Auth.js (required — generate with: npx auth secret) ─────
|
|
AUTH_SECRET=""
|
|
# AUTH_URL must match the canonical origin this deployment serves.
|
|
# Local dev: http://localhost:3000
|
|
# Production: https://<your-canonical-domain>
|
|
# Preview: https://<project>-git-<branch>-<team>.vercel.app
|
|
AUTH_URL="http://localhost:3000"
|
|
|
|
# ─── OIDC SSO (optional) ──────────────────────────────────────
|
|
AUTHENTIK_ISSUER=""
|
|
AUTHENTIK_CLIENT_ID=""
|
|
AUTHENTIK_CLIENT_SECRET=""
|
|
|
|
# ─── Brevo transactional email ────────────────────────────────
|
|
BREVO_API_KEY=""
|
|
EMAIL_FROM_NAME="Echo OCR"
|
|
EMAIL_FROM_ADDRESS="mars@noreply.stillwell.cloud"
|
|
|
|
# ─── Vercel Cron Secret ────────────────────────────────────────
|
|
# Vercel auto-sets this on Pro. Used to authenticate cron job requests.
|
|
CRON_SECRET=""
|
|
|
|
# ─── Public site URL (used for OG metadata, canonical links) ─
|
|
# Used by transactional emails, OpenGraph tags, and QR codes.
|
|
# If unset, the app falls back to AUTH_URL, then VERCEL_URL, then localhost.
|
|
NEXT_PUBLIC_SITE_URL=""
|
|
|
|
# ─── Environment indicator ────────────────────────────────────
|
|
NEXT_PUBLIC_ENV=""
|
|
|
|
# ─── Integration OAuth credentials ────────────────────────────
|
|
# Planning Center Online — create an OAuth app at
|
|
# https://api.planningcenteronline.com/oauth/applications
|
|
# Redirect URI: {AUTH_URL}/api/integrations/oauth/planning_center/callback
|
|
PCO_CLIENT_ID=""
|
|
PCO_CLIENT_SECRET=""
|
|
|
|
# Google Sheets — create OAuth credentials in Google Cloud Console,
|
|
# enable the "Google Sheets API", and add the redirect URI:
|
|
# {AUTH_URL}/api/integrations/oauth/google_sheets/callback
|
|
GOOGLE_CLIENT_ID=""
|
|
GOOGLE_CLIENT_SECRET=""
|