I stopped guessing why builds break. I lint env vars. I generate .env.example from code. Not docs. I validate at runtime with Zod. One error message. I run a tiny Node script in CI. Fails fast. Context I ship small SaaS apps. Usually solo. Usually fast. And I kept losing time to env vars. The worst kind of bug. Works on my machine. Fails in CI. Or only fails after deploy. Or fails only in preview. Real examples from the last month: NEXT_PUBLIC_APP_URL was missing in Vercel preview. OAuth callback broke. DATABASE_URL existed, but pointed to the wrong DB. Brutal. STRIPE_WEBHOOK_SECRET had a trailing space. Took me 40 minutes. Cursor + Claude helped. But not by “prompting harder”. I needed a system. So I built an env pipeline: 1) single schema 2) runtime validation 3) .env.example generated from that schema 4) CI script that fails before Next.js even starts 1) I wrote one env schema. Everything else follows. I used to scatter process.env.X across files. That’s how you get silent undefined .…