Skip to content

Add ProcessEnv type interface for environment variables #229

Description

@AbelOsaretin

What

Environment variables are accessed via process.env.VARIABLE with no type safety. Typos produce undefined silently.

Why

A typed interface prevents typos and documents which env vars are available.

Scope

  • Create a ProcessEnv interface extending NodeJS.ProcessEnv
  • Declare all expected env vars with types
  • Use the interface throughout the codebase

Acceptance Criteria

  • src/types/env.d.ts or similar with ProcessEnv interface
  • All env vars typed (string, optional/required)
  • No process.env.VARIABLE without type checking
  • IDE autocomplete for env vars

Technical Context

  • Env vars used: PORT, FRONTEND_URL, STELLAR_NETWORK, RPC_URL, ADMIN_SECRET_KEY, PROJECT_REGISTRY_CONTRACT_ID, ADMIN_API_KEY
  • TypeScript declaration merging for NodeJS.ProcessEnv

Metadata

Metadata

Labels

Stellar WaveIssues in the Stellar wave programmediumFunctionality impaired but workaround exists, edge case, partial feature

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions