Document environment variables centrally — `.env.example`, `env.validation.ts` and README config are scattered
Nobody has claimed this yet.
Assessment
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Newbie friendliness
- 45/100
- Issue type
- Documentation
- Clarity
- Mostly clear
- Activity status
- Active
- Tech stack
- nodejs, typescript
- Domain
- documentation, tooling
Research direction
Start by reading src/config/env.validation.ts to see how the schema is declared, then look at scripts/export-openapi.ts as a model for a generator script. Compare .env.example, .env.production.example and .env.secrets.template against the schema keys, and confirm .gitignore covers .env. Done means docs/ENVIRONMENT.md is generated by an npm run docs:env script, a CI check fails when a schema key is missing from .env.example, and the README links to the new doc.
Written by the indexing model from the issue text.
Description
Problem
Environment variable knowledge is spread across four places that must be kept in sync manually:
src/config/env.validation.ts— 507 lines, the largest config file, containing the validation schema.env.example.env.production.example.env.secrets.templateREADME.mdlines 237-252 ("Configuration & deployment"), which names a handful of variables inline
There is no single reference document, and nothing verifies that the three .env templates cover every key that env.validation.ts requires. A new required variable can be added to the validation schema with no corresponding template entry, and the failure mode is a boot-time crash for someone following the README.
Why it matters
Onboarding friction, and a real class of deployment bug. The README instructs contributors to copy .env.example → .env and populate it (line 105). If that file is incomplete relative to the validation schema, a fresh setup fails in a way that looks like a bug rather than a missing config key.
Suggested Direction
- Generate the docs. Write a script (
scripts/, whereexport-openapi.tsandvalidate-openapi.tsalready live) that imports theenv.validation.tsschema and emitsdocs/ENVIRONMENT.md: variable name, type, required/optional, default, and a one-line description. Add it asnpm run docs:env. This keeps the docs correct automatically as the schema changes. - Add a CI check that every key in
env.validation.tsappears in.env.example. This is the check that actually prevents the failure mode, and it is a small script. - Reconcile the three templates. They presumably differ by environment; make the differences intentional and documented rather than accidental. Consider generating all three from one source of truth.
- Replace the README's inline config list with a link to
docs/ENVIRONMENT.md, keeping only the deployment-relevant narrative (rate-limit tiers, Sentry) in place.
Constraints
- Never commit real secrets.
.env.secrets.templatemust stay a template — verify.gitignorecovers.envbefore adding any generation step that reads env files. - The generation script must not print secret values, only names, types, and defaults. Redact anything that looks sensitive even in the template.
env.validation.tsis 507 lines — if a generator cannot introspect the schema cleanly, that itself is a reason to restructure the file into composable per-domain schemas (config, auth, database, observability). Consider that as a follow-up.
Acceptance Criteria
-
docs/ENVIRONMENT.mdexists and is generated fromenv.validation.ts. -
npm run docs:envregenerates it. - A CI check fails if a validation key is missing from
.env.example. - All three
.envtemplates are reconciled and their differences are documented. -
README.mdlinks todocs/ENVIRONMENT.md. - No secret values appear in any generated output.
- Dominant language
- TypeScript
- Stars
- 7
- Forks
- 55
- Avg merge
- 1d 17h
- Merged PRs (30d)
- 5
Getting set up
- Ships a Dockerfile or Docker Compose file
- Has a pull request template
- Read the contributing guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from SourceXXL/alian_structure-api
-
good first issue help wanted security
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#266 ·
-
Parallelize the cache-warming loop in `cache-warming.service.ts` — warmers run strictly sequentiallyPossibly taken @syntaxsuuvam-spec claimed this 3 days ago. Opengood first issue performance
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
SourceXXL/alian_structure-api#240 ·
-
documentation help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
SourceXXL/alian_structure-api#215 ·
-
good first issue refactor tooling
Difficulty 2/5 1-3 hours Newbie friendliness 80/100
SourceXXL/alian_structure-api#199 ·
-
help wanted intermediate refactor
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
SourceXXL/alian_structure-api#196 ·
All issues in SourceXXL/alian_structure-api
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
AvaProtocol/ava-sdk-js#276 ·
Maintainers usually reply within 1 day
-
useFragment does not require `variables` when the fragment's variables type has required fieldsOpen
Difficulty 2/5 1-3 hours Newbie friendliness 75/100
apollographql/apollo-client#13493 ·
Maintainers usually reply within 1 day
-
Custom hosts written as trailing-dot FQDNs (`host.local.`) aren't detected as local backendsPossibly taken @roboomp claimed this today. Openbug prio:p2 providers triaged
Difficulty 2/5 1-3 hours Newbie friendliness 82/100
can1357/oh-my-pi#15798 · 3 comments ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
code-yeongyu/oh-my-openagent#10172 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
PDFCraftTool/pdfcraft#189 ·