docs(onboarding): make .env.example the canonical dev template (closes #260) - #264
Open
dchaudhari7177 wants to merge 1 commit into
Open
Conversation
README's quick start says cp .env.example .env, but that file was headed "HighFive Production Environment Variables" and carried NODE_ENV=production, PORT=3001, a production VITE_API_URL and a placeholder admin key. Compose loads it into backend, image-service and duckdb-service, and the environment: block overrides NODE_ENV and PORT, so the dev stack booted while the placeholder silently became the admin password of every fresh checkout. Rewrite it as the dev template: DEBUG, DUCKDB_SERVICE_URL and a commented HIGHFIVE_API_KEY, each annotated with what reads it and the fact that all three are optional. Production wording now lives only in .env.production.example, which is what docker-compose.prod.yml consumes. Collapse the four restatements into pointers. CLAUDE.md, CONTRIBUTING.md, docs/07-deployment-view/docker-compose.md and docs/troubleshooting.md each described a different dev .env; they now link to the template instead. troubleshooting.md also claimed DEBUG and DUCKDB_SERVICE_URL were required "at minimum", which the getenv defaults in both Flask services contradict. Also fixes the wrong directory in docker-compose.md: cd hivehive after cloning highfive.git. Lesson recorded in docs/11-risks-and-technical-debt per CLAUDE.md. Refs schutera#260
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.
Addresses #260 (auto-close keyword kept in the title only, per CLAUDE.md).
Documentation and one template file. No code, no compose change.
.env.examplebecomes the dev templateIt now carries
DEBUG,DUCKDB_SERVICE_URLand a commentedHIGHFIVE_API_KEY, each annotated with which service reads it and the fact that all three are optional. Gone: the "Production Environment Variables" heading,NODE_ENV=production,PORT=3001, the productionVITE_API_URL, andHIGHFIVE_API_KEY=your_secure_production_key_here— the placeholder that was becoming the admin password of every fresh dev box.Production wording now points exclusively at
.env.production.example, which is whatdocker-compose.prod.ymlactually consumes, and the header says so explicitly so nobody copies the wrong one.Four restatements become four pointers
CLAUDE.md.env" blockcp .env.example .env+ pointerCONTRIBUTING.mddocs/07-deployment-view/docker-compose.mddocs/troubleshooting.mdAlso fixed:
docker-compose.mdsaidcd hivehiveafter cloninghighfive.git.Two things I found beyond the issue
troubleshooting.mdwas actively wrong. It said the.env"must contain at minimum"DEBUGandDUCKDB_SERVICE_URL. Both are optional —image-service/app.py:512andduckdb-service/app.py:123areos.getenv("DEBUG", "false"), andimage-service/app.py:159defaultsDUCKDB_SERVICE_URLto the service name. So the one doc a stuck contributor reaches for was sending them to fix a non-problem. It now says to restore from the template, and that a service dying on a malformed.envis failing on a parse error (docker compose configshows it), not a missing value.A fifth restatement exists that I did not touch:
.claude/skills/esp32-onboarding/SKILL.md:32tells the agent to confirm.envcontainsDEBUG=trueandDUCKDB_SERVICE_URL=.... Same drift, but it is agent tooling rather than contributor docs, so I left the call to you — happy to fold it in.Claims verified against the tree
env_file: - .envappears atdocker-compose.yml:10(backend),:78(image-service),:131(duckdb-service); thehomepageservice has noenv_file, soVITE_API_URLnever reached it. The docs now say exactly this — the old CONTRIBUTING wording ("used byimage-serviceandduckdb-service") omittedbackend.os.getenvdefaults cited above, not assumed.Docs gate
docs/11-risks-and-technical-debt/README.mdgains a Lessons-learned entry in the required format. The general lesson: a file that ships as a template is the canonical description of itself — docs link to it, they do not restate it. Five copies meant no single one was wrong enough to notice, and the composeenvironment:overrides hid the mismatch, which is structurally the same failure as the inert-security-control incident already recorded in that chapter.make check-citations→ 7 OK, 0 problems.Note: my other open PR (#263) also appends to the Lessons-learned section. I inserted at a different anchor so the two should not textually conflict, but if they do it is a one-line rebase — say the word.
One deviation to flag
CLAUDE.md's end-of-implementation gate asks for the
senior-reviewersubagent. I could not run it in my environment, so this has not been through that gate. Everything else —make check-citations, the docs update, branch and commit conventions, the no-auto-close-keyword-in-bodies rule — has been followed.