Description: The server initializes using environment variables without validating types or ranges (e.g., parseInt for ports can return NaN).
Impact: Silent failures or opaque runtime errors when the server starts with an invalid configuration.
Recommended Fix: Add a Zod-based validation schema in the config layer to ensure required variables exist and are correctly formatted (e.g., ports must be numbers 1-65535).
Affected Files: src/config/index.ts, src/index.ts.
Description: The server initializes using environment variables without validating types or ranges (e.g., parseInt for ports can return NaN).
Impact: Silent failures or opaque runtime errors when the server starts with an invalid configuration.
Recommended Fix: Add a Zod-based validation schema in the config layer to ensure required variables exist and are correctly formatted (e.g., ports must be numbers 1-65535).
Affected Files: src/config/index.ts, src/index.ts.