Skip to content

Add environment variable validation with proper error messages for all required config #903

Description

@nanaf6203-bit

Problem

validate-env.ts only checks if env vars exist without validating format, range, or compatibility. Missing JWT_SECRET silently uses hardcoded defaults.

Expected Outcome

Clear, actionable error messages at startup when configuration is invalid.

Acceptance Criteria

  • Joi or Zod schema validation for all required env vars
  • Type coercion and defaults handled explicitly
  • Production-specific enforcement
  • Clear error messages for specific misconfigured variables

Files Affected

src/utils/validate-env.ts, src/main.ts, src/app.module.ts, package.json

Difficulty

Easy

Estimated Effort

Small (4-6 hours)

Labels

security, devops, enhancement

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions