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
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
What
Environment variables are accessed via
process.env.VARIABLEwith no type safety. Typos produceundefinedsilently.Why
A typed interface prevents typos and documents which env vars are available.
Scope
ProcessEnvinterface extendingNodeJS.ProcessEnvAcceptance Criteria
src/types/env.d.tsor similar withProcessEnvinterfaceprocess.env.VARIABLEwithout type checkingTechnical Context
PORT,FRONTEND_URL,STELLAR_NETWORK,RPC_URL,ADMIN_SECRET_KEY,PROJECT_REGISTRY_CONTRACT_ID,ADMIN_API_KEYNodeJS.ProcessEnv