Celtrix icon indicating copy to clipboard operation
Celtrix copied to clipboard

[FEATURE] Validate environment variables when the generated API starts

Open ChandanVarshney031 opened this issue 1 month ago • 2 comments

Description apps/api/src/env.ts loads the root .env, but a missing DATABASE_URL or a non-numeric PORT only shows up later as an obscure ORM or network error.

Proposed solution

  • After loading .env, check required variables for the chosen stack (for example DATABASE_URL, PORT, DIRECT_URL for Supabase)
  • Print one clear message listing what is missing or invalid, with a hint to copy .env.example
  • Exit with code 1 before starting the server

Acceptance criteria

  • [ ] Missing or invalid values fail fast with a readable message
  • [ ] Valid configs start exactly as before
  • [ ] Works for Express, Hono, and Fastify

ChandanVarshney031 avatar Oct 31 '26 08:10 ChandanVarshney031

Please assign me

pratikadamas avatar Nov 04 '26 15:11 pratikadamas

Hello Pratik Damas, Could you please assign this issue to me? I can work on it and resolve it.

yashbokade22 avatar Nov 18 '26 16:11 yashbokade22