Skip to content

Add validation for required environment variables #27

@Harushii16

Description

@Harushii16

Currently the application assumes certain ENV variables exist (like VITE_SUPABASE_URL, VITE_SUPABASE_ANON_KEY, MONGODB_URI). If any are missing or malformed, runtime errors may occur without a clear message. Add validation (e.g. using zod or joi) at startup to ensure all required environment variables are present and valid. If not, the server should exit with a clear error message.

Benefits:

Developer experience improves (you get early, clear errors)

Avoid crashes further down the line with cryptic stack traces

Helps new contributors set up correctly

please assign this issue to me

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions