Vercel deployment guide and named Supabase env errors
zgbrenner adds a 222-line Vercel deployment walkthrough and tightens the Supabase client initialization to name the missing variable when the app fails to start. Both changes target someone self-hosting Gary without a DevOps background.
The new docs/VERCEL_DEPLOYMENT.md is honest about the architecture: Vercel hosts the Next.js frontend only. The Express backend needs LibreOffice installed and a persistent server process, so it has to live on Railway, Render, Fly.io, or a plain VM. The guide explains which env vars are NEXT_PUBLIC_* (browser-safe) vs. which must stay server-side, with explicit warnings not to mix them up.
On the code side, supabase.ts and auth.ts replace the generic "supabaseUrl is required" startup error with a message that names the specific missing variable. The change also accepts the standard NEXT_PUBLIC_SUPABASE_ANON_KEY name while falling back to the legacy NEXT_PUBLIC_SUPABASE_PUBLISHABLE_DEFAULT_KEY, so deployments using either convention work without changes. Runtime behavior is otherwise the same - missing config still throws.
A new frontend/.env.vercel.example separates public and private variables into clearly labeled sections. The .gitignore update adds an explicit exception so this file gets committed alongside the other example env files.
Worth noting: this commit predates the Clerk auth migration. The later Clerk PR substantially rewrites VERCEL_DEPLOYMENT.md and replaces these env examples, so treat this as a snapshot of the pre-Clerk state.
Spotted something wrong? Or know the PR text has fresher detail than the writeup above?