What problem does it solve?
It prevents scattered, error-prone environment variable reads by forcing all configuration access through dedicated config modules, reducing misconfiguration and inconsistent defaults across server and client.
Core Features & Use Cases
- Centralized env access: Enforces using
apps/server/src/config.ts (server) and apps/web/src/config.ts (client) rather than direct process.env / import.meta.env usage.
- Clear defaults and conventions: Documents how to add new variables with sensible defaults, appropriate client-side
VITE_ prefixes, and placement in .env.example files.
- Operational guidance for dev/runtime: Standardizes Node 20+
--env-file usage for loading env in development and points to existing tests for key parsing logic.
- Use case: When adding a new feature flag or datastore driver, update the correct config module and
.env.example, ensuring both the runtime and client exposure rules are followed.
Quick Start
Add the new environment variable to the appropriate config module in apps/server/src/config.ts or apps/web/src/config.ts, then document it in the matching .env.example file according to whether it is server-only or client-exposed with a VITE_ prefix.