From 402c2de96f60b7cb60740e02a9d775b1fbc6507f Mon Sep 17 00:00:00 2001 From: Cristian Magherusan-Stanciu Date: Thu, 11 Jun 2026 01:28:49 -0700 Subject: [PATCH] docs(claude): fix build/test commands and file layout in CLAUDE.md The Build & Test section instructed npm run build / npm test / npm run lint at the repo root, where no package.json exists; the root build is Go. The File Organization section mandated /src, /tests, /config, /examples directories that do not exist in this repo. Replace both sections with the real commands (go build ./... and go test ./... at the root, make build / make test-unit / make lint, npm scripts under frontend/) and the actual directory layout (cmd/, internal/, pkg/, providers/, frontend/, terraform/, docs/, scripts/, tests/). All documented commands verified against the Makefile and frontend/package.json; go build ./... run successfully at the root. No other sections changed. Closes #1179 --- CLAUDE.md | 37 ++++++++++++++++++++++++------------- 1 file changed, 24 insertions(+), 13 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 67ceb7cb8..f1d41e289 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -18,13 +18,16 @@ ## File Organization -- NEVER save to root folder — use the directories below -- Use `/src` for source code files -- Use `/tests` for test files -- Use `/docs` for documentation and markdown files -- Use `/config` for configuration files -- Use `/scripts` for utility scripts -- Use `/examples` for example code +- NEVER save working files to the root folder; use the directories below +- `cmd/`: CLI and server entry points (main packages) +- `internal/`: backend application code (API, auth, purchase, scheduler, ...) +- `pkg/`: shared library code (separate Go module, see Go Module Notes) +- `providers/`: cloud provider integrations (AWS, Azure, GCP) +- `frontend/`: TypeScript web frontend (webpack + jest) +- `terraform/`, `cloudformation/`, `arm/`, `iac/`: infrastructure as code +- `docs/`: documentation and markdown files +- `scripts/`: utility scripts +- `tests/`: end-to-end tests (Go unit tests live next to the code they test) ## Project Architecture @@ -52,15 +55,23 @@ ## Build & Test +The root of the repo is a Go project; the npm scripts live in `frontend/`. + ```bash -# Build -npm run build +# Build (backend, from the repo root) +go build ./... # or: make build + +# Test (backend) +go test ./... # or: make test-unit -# Test -npm test +# Lint (backend) +make lint # golangci-lint; also: make vet, make fmt -# Lint -npm run lint +# Frontend (run from frontend/) +cd frontend && npm ci +npm run build # webpack production build +npm test # jest --coverage +npm run lint # eslint src/**/*.ts ``` - ALWAYS run tests after making code changes