diff --git a/CLAUDE.md b/CLAUDE.md index 6f6131a..5d54c93 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -45,17 +45,18 @@ cd client && yarn build # tsc --noEmit + vite build → client/dist ### Tests ```bash cd server && yarn test # Jest (tests in server/src/tests/) +cd server && yarn test dates # Run one test file +cd server && yarn test -t "name" # Run by test name pattern ``` ### Formatting -```bash -# Prettier available in client (no config file — uses defaults) -``` +Prettier is installed in `client/` (devDependency only, no script or config) — invoke via `yarn prettier ` with defaults. ## Architecture ### API Types (types/) - OpenAPI 3.0 spec in `types/api.yml` — all API endpoints and DTOs defined here +- `api.yml` is a thin aggregator — actual endpoint specs live in `types/paths//*.yml`, shared schemas in `types/schemas/_index.yml` - `yarn openapi-ts` generates `types/gen/` (client.gen.ts, sdk.gen.ts, types.gen.ts) - Both server and client import from these generated types - **When changing API contracts: update api.yml first, then regenerate** @@ -67,6 +68,7 @@ cd server && yarn test # Jest (tests in server/src/tests/) - **Auth:** `auth.ts` — JWT + optional trusted-header authentication - **Storage:** `storage/StorageInterface.ts` defines the interface; implementations in `storage/json.ts` (file-based, dev) and `storage/redis.ts` (production). Data keyed by date (YYYY-MM-DD). - **Restaurant scrapers:** Cheerio-based HTML parsing for daily menus from multiple restaurants +- **Pizza Chefie integration:** `chefie.ts` scrapes pizzachefie.cz for Pizza day menus and salads (only active when a Pizza day is open) - **WebSocket:** `websocket.ts` — Socket.io for real-time client updates - **Mock mode:** `MOCK_DATA=true` env var returns fake menus (useful for weekend/holiday dev) - **Config:** `.env.development` / `.env.production` (see `.env.template` for all options) @@ -97,15 +99,4 @@ cd server && yarn test # Jest (tests in server/src/tests/) - Czech naming for domain variables and UI strings; English for infrastructure code - TypeScript strict mode in both client and server - Server module resolution: Node16; Client: ESNext/bundler - -## Code Search Strategy -When searching through the project for information, use the Task tool to spawn -subagents. Each subagent should read the relevant files and return a brief -summary of what it found (not the full file contents). This keeps the main -context window small and saves tokens. Only pull in full file contents once -you've identified the specific files that matter. -When using subagents to search, each subagent should return: -- File path -- Whether it's relevant (yes/no) -- 1-3 sentence summary of what's in the file -Do NOT return full file contents in subagent responses. \ No newline at end of file +- `TODO.md` tracks open bugs and roadmap items — worth scanning before starting non-trivial work \ No newline at end of file