Type-Safe Environment Variables in Next.js with @t3-oss/env-nextjs and Zod (2026)
Stop shipping empty API keys. Validate Next.js env vars at build time with @t3-oss/env-nextjs and Zod 4: server/client split, Turbopack, and Docker deployments.
Front-end architect at a SaaS. Owns the build system, the design system, and the war stories about both.
Stop shipping empty API keys. Validate Next.js env vars at build time with @t3-oss/env-nextjs and Zod 4: server/client split, Turbopack, and Docker deployments.
Set up a Next.js 16 monorepo with Turborepo and pnpm. Workspace structure, shared UI packages, Vercel remote caching, and CI config that actually scales.
Next.js 16 renamed middleware.ts to proxy.ts. The official codemod handles the file rename and the function signature, but I hit three things on a real production migration that the changelog glosses over.