בדרך
חסרים פרטי חיבור
האפליקציה עולה, אבל בלי משתני הסביבה של מסד הנתונים אין למה להתחבר. הוסיפו אותם ל-.env.local והפעילו מחדש.
חסרים
NEXT_PUBLIC_SUPABASE_URLLocal dev: `pnpm supabase:start` prints these. Cloud: Project Settings → API.NEXT_PUBLIC_SUPABASE_ANON_KEY
איך מגדירים
- מעתיקים את .env.example ל-apps/web/.env.local (או לשורש הפרויקט).
- מריצים pnpm supabase:start. הפלט כולל את הכתובת ואת המפתח.
- ממלאים את הערכים החסרים ומריצים שוב pnpm dev.
תבנית
# ─── Supabase ────────────────────────────────────────────────────────────── # Local dev: `pnpm supabase:start` prints these. Cloud: Project Settings → API. NEXT_PUBLIC_SUPABASE_URL=http://127.0.0.1:54321 NEXT_PUBLIC_SUPABASE_ANON_KEY= NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY= SUPABASE_SECRET_KEY= SUPABASE_SERVICE_ROLE_KEY= # Direct Postgres connection used by drizzle-kit and the importer (bypasses RLS). DATABASE_URL=postgresql://postgres:postgres@127.0.0.1:54322/postgres # ─── Auth ────────────────────────────────────────────────────────────────── # Google OAuth client (Supabase Dashboard → Authentication → Providers → Google, # or supabase/config.toml [auth.external.google] for local). The local config reads these via # env(): export them in the shell that runs `pnpm supabase:start` (e.g. `set -a; source .env.local`). SUPABASE_AUTH_GOOGLE_CLIENT_ID= SUPABASE_AUTH_GOOGLE_SECRET= # Comma-separated sign-in allowlist. Mirrored into the allowed_emails table on import. ALLOWED_EMAILS= # ─── Google Maps Platform ───────────────────────────────────────────────── # Server-side key. Enable Places API (New) and Routes API on the project. # Set per-SKU quota caps for Place Photos, Place Details, Compute Routes Essentials and # Compute Routes Pro, plus a billing alert, BEFORE first use. Never expose this key to the client. GOOGLE_MAPS_API_KEY= # ─── Anthropic (Trip Assistant) ────────────────────────────────────────── ANTHROPIC_API_KEY= # ─── Live flight status (AeroDataBox) ──────────────────────────────────── # Powers the live-status card on the flights page, the day plan and today's home: the departure's # status, check-in desk, gate and terminal, and the arrival's status, landing time, terminal, gate and # BAGGAGE BELT. Unset = the card is absent and the flights page says so once, quietly. Nothing but a # flight number and a date is ever sent. # # The endpoint bills per call, so answers are cached in `flight_status_cache` and the TTL tightens # toward the flight: 6 h beyond a day out, 15 min inside a day, 3 min inside three hours or while # airborne, and never again once the flight has landed with its belt published, was cancelled or # diverted. Add `?refresh=1` to the status route to force one call. AERODATABOX_API_KEY= # Which gateway the key belongs to; the host chooses the auth header. # api.aerodatabox.com direct subscription → X-Api-Key (the default when unset) # aerodatabox.p.rapidapi.com RapidAPI → x-rapidapi-key + x-rapidapi-host # api.magicapi.dev MagicAPI → x-magicapi-key AERODATABOX_HOST= # The web app reads apps/web/.env.local (and Vercel env), so both must be set there too. # ─── Optional integrations ─────────────────────────────────────────────── MAPILLARY_TOKEN= # Identifying header for the FOSSGIS Valhalla routing server (their policy asks for one). ROUTING_CLIENT_ID=trip-planner-dev # Descriptive User-Agent for Wikimedia / OSRM requests made by `pnpm jobs` (their policies require one # with contact details), e.g. TripPlanner/0.1 (+https://example.org; ops@example.org) HARVEST_USER_AGENT= # ─── App ───────────────────────────────────────────────────────────────── # Not read by the app today: the OAuth callback derives its origin from the request (x-forwarded-host on # Vercel). Kept for tooling and as the canonical public URL to paste into Supabase's redirect allow-list. NEXT_PUBLIC_APP_URL=http://localhost:3000 # QA only: when "1", `?preview=during|before|after` rehearses another trip phase (URL-only, never persisted). NEXT_PUBLIC_ENABLE_PHASE_PREVIEW= # Driving times refresh themselves after every board/lodging change (one routing request per affected day, # Valhalla via ROUTING_CLIENT_ID, OSRM via HARVEST_USER_AGENT). Set to 0 to keep labelled estimates only. ROUTE_LEGS_ON_WRITE=1 # The web app reads apps/web/.env.local (and Vercel env), so ROUTING_CLIENT_ID / HARVEST_USER_AGENT must be set there too. # ─── Scheduled jobs (Vercel cron) ──────────────────────────────────────── # Random string (≥ 16 chars). Vercel sends it as `Authorization: Bearer <CRON_SECRET>` when it invokes # /api/cron/weather (hourly forecast warm) and /api/cron/legs (daily routing sweep); the routes answer # 401 to anything else and refuse every call while it is unset. Production only; local dev needs none. CRON_SECRET= # ─── Login hero ────────────────────────────────────────────────────────── # Photo set behind the login card: a folder name under apps/web/public/hero/<set>/ that holds a manifest.json # (credits, licences, focal points) and the variants written by `node apps/web/scripts/build-hero.mjs <set>`. # Leave empty for the illustrated landscape (no photos needed). Photos are data; the app never names a place. NEXT_PUBLIC_LOGIN_HERO_SET=