What problem does it solve?
This Skill guides teams to configure default user settings via server-side environment variables, enabling dynamic defaults without hardcoding values.
Core Features & Use Cases
- Domain-specific env configuration: Create per-domain env schemas (src/envs/<domain>.ts) to centralize default values.
- Type-safe wiring: Update server types to reflect new env-driven settings and ensure compile-time safety.
- Server-wide assembly: Build a centralized getServerGlobalConfig to expose domain settings to the application at runtime.
- User-store integration: Merge deployed env-based defaults into the user's state store for consistent behavior.
- Documentation and examples: Update .env.example and docs to reflect new env vars.
Quick Start
Create a new environment variable for a domain in src/envs/<domain>.ts. Update the server global config in src/server/globalConfig/index.ts to expose the new var. Merge the value into the user store (src/store/user/slices/common/action.ts), and update .env.example and documentation accordingly.