Repository navigation
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #542
Adds
docs/environment-variables.md, a reference for every environment variable the three services read:apps/backend,apps/webandapps/ai_agent.What the document contains:
apps/backend/src/config.tsvalidates at boot. A missing or malformed value there prints the offending names and exits 1, so these fail loudly, and I noted thatPORTis required by the schema even thoughindex.tscarries an unreachable?? 3001fallback.RATE_LIMIT_<BUCKET>overrides, messaging), each with the file that reads it, whether it is required, its in-code default, and the failure mode — including the ones that fail silently, like a malformedRATE_LIMIT_*override being ignored with a warning, orFIRST_CONTACT_HOUR_LIMIT=abcparsing toNaNand removing the limit.JWT_SECRET,DATABASE_URL,REDIS_URL, the object-store keys,VAPID_PRIVATE_KEY,OPENAI_API_KEY) with an explicit statement that they must never be committed, and a note that only placeholders and the local MinIO throwaway credentials may appear in.env.example.NEXT_PUBLIC_*section states plainly that those values are substituted at build time, inlined into the bundle and therefore public and not rotatable without a rebuild.NEXT_PUBLIC_AUTH_TOKENis called out separately: it is a bearer token in a public bundle..env.examplenames that no code reads (RPC_URL,PROPOSALS_CONTRACT_ID,XMTP_ENV), plus the names the backend reads but.env.exampleomits (STELLAR_RPC_URL,GROUP_TREASURY_CONTRACT_ID, the object-store and GC/limit overrides, and everyNEXT_PUBLIC_*).S3_*aliases and anIDEMPOTENCY_TTL_SECONDSthat nothing consumes;infra/docker-compose.ymlsets container-levelPOSTGRES_*/MINIO_*only;scripts/loadtestis argument-driven.Verification. A throwaway script (kept outside the repo) extracts names from the code, from
.env.exampleand from the tables in the new document, then compares all three directions. It reports 88 names read by code, 31 names in.env.example, 91 distinct names documented. Lists (b) and (c) are empty; the 60 names in (a) are the ones the document adds beyond.env.example, and the three names in (d) are the ones the document flags as read by nothing.Commands used to find the reads:
Full output of the throwaway script, unedited:
Docs only — no code, config or lockfile changes.
Retargeted to
dev— the previous PR (#604) was auto-closed because contributor PRs must merge intodev, notmain.