# quote-of-the-day-api A REST API that serves a daily rotating quote. Built with Node.js, Express, and TypeScript. ## Build Commands ```bash # Install dependencies (NODE_ENV=production requires --include=dev) npm install --include=dev # Build TypeScript → dist/ npm run build ``` ## Test Commands ```bash # Run full test suite npm test # Watch mode npm run test:watch # Run a single test file npx vitest run path/to/file.test.ts # Run a single named test npx vitest run -t "test name here" ``` ## Development Commands ```bash # Start local dev server npm run dev ``` ## Project Structure ``` quote-of-the-day-api/ ├── src/ # TypeScript source (to be created) ├── dist/ # compiled output (git-ignored) ├── package.json ├── package-lock.json ├── .gitignore ├── README.md # Project overview (currently a stub) └── CLAUDE.md # This file ``` > Update this section as source directories are added. ## Architecture Notes - **Purpose**: Serve a quote of the day via a REST API, rotating through a collection of quotes. - **Expected endpoints**: `GET /quote` — returns today's quote (deterministic per calendar day), `GET /quotes` — list all available quotes. - **Runtime**: Node.js 22 / Express 5 / TypeScript 5.x (pinned `>=5.0.0 <6.1.0`) - **Test framework**: Vitest 4.x - **Linter**: ESLint 10 + @typescript-eslint 8 ## Code Style > Update this section once a linter/formatter config is committed (`.eslintrc`, etc.). - **TypeScript**: `strict: true`, `target: "ES2020"` recommended in `tsconfig.json` - **Linting**: ESLint with `@typescript-eslint` rules; `npm run lint` must exit cleanly - Follow the conventions of the chosen language's ecosystem formatter (e.g., Prettier for JS/TS). - Keep controllers thin; put business logic in service or domain layers.