Description
We need a beginner-friendly environment setup flow. Add a safe .env.example template and a setup validation command so contributors can verify local config before running the app.
Why
Current setup can fail silently when env keys are missing or incorrect. New contributors should get clear errors and next steps.
Scope
- Add
.env.example with all required keys (no secrets):
MONGO_URI=
STRIPE_SECRET_KEY=
JWT_SECRET=
PORT=3000
DOMAIN=http://localhost:3000
- Add a setup validation script (for example:
npm run validate:setup)
- Validation should check:
- required env keys exist
PORT is numeric
DOMAIN format is valid URL
- optional: basic Mongo URI format check
- optional: Stripe key starts with
sk_test_ in local/dev
- Show clear pass/fail output with actionable messages
Deliverables
Acceptance Criteria
- Running
npm run validate:setup prints success when env is valid
- Missing/invalid keys produce readable error messages
- No secrets are committed
- Works on Windows and Linux/macOS terminals
Suggested Labels
good first issue, documentation, setup, enhancement
Description
We need a beginner-friendly environment setup flow. Add a safe
.env.exampletemplate and a setup validation command so contributors can verify local config before running the app.Why
Current setup can fail silently when env keys are missing or incorrect. New contributors should get clear errors and next steps.
Scope
.env.examplewith all required keys (no secrets):MONGO_URI=STRIPE_SECRET_KEY=JWT_SECRET=PORT=3000DOMAIN=http://localhost:3000npm run validate:setup)PORTis numericDOMAINformat is valid URLsk_test_in local/devDeliverables
.env.examplefilenpm run validate:setup)Acceptance Criteria
npm run validate:setupprints success when env is validSuggested Labels
good first issue,documentation,setup,enhancement