Environment
Type-safe Zod runtime environment variable validation across the monorepo.
Environment Package (`@repo/env`)
Runtime environment mistakes are one of the most common causes of production outages. Morax uses a dedicated packages/env powered by Zod to parse, validate, and autocomplete all environment variables across every app in your workspace.
Zod Validation Schema
Variables are validated on server startup. If a variable is missing or malformed, the process fails fast with a clear error:
packages/env/src/index.ts
Server vs. Client Safety
Secret keys (such as database credentials and auth secrets) are restricted to server-side bundles and prevented from accidentally leaking into public client bundles.
Usage Across Workspace Apps
Import env anywhere with instant type safety and editor autocomplete:
Consuming Env