# TypeScript web project
TypeScript — Browser application (React).
## Technology stack
- **Language:** TypeScript
- **Project type:** Browser application
- **Framework:** React
- **E2E tests:** Playwright — Browser-level end-to-end checks.
- **Linting:** ESLint — Static analysis for JavaScript and TypeScript.
- **Formatting:** Prettier — Consistent source formatting.
- **Package manager:** pnpm
- **Unit tests:** Vitest
## Commands
- **Install:** `pnpm install`
- **Development:** `pnpm dev`
- **Build:** `pnpm build`
- **Formatting:** `pnpm format`
- **Lint:** `pnpm lint`
- **Typecheck:** `pnpm typecheck`
- **Tests:** `pnpm test`
- **E2E tests:** `pnpm test:e2e`
- **Verify:** `pnpm verify`
- Verify these commands against the project configuration. If a command is missing, report it; do not create or change scripts only to match CLAUDE.md.
## Project structure
- `src/` — Application code.
- `tests/` — Unit and integration tests.
- `public/` — Static assets.
## Component rules
- Use strict TypeScript; avoid unjustified `any` and narrow `unknown` before use. Prefer ESM and preserve existing abstractions unless a change requires otherwise.
- Keep React state as local as practical. Compute values from existing props and state instead of storing redundant state, and preserve existing component patterns.
- Provide semantic markup, labels, keyboard access, visible focus, responsive layouts, prevent unintended horizontal overflow, and avoid console errors.
- Use effects only to synchronize with external systems.
- Keep secrets out of client code and environment variables exposed to the browser.
## Testing
- Keep tests close to behavior, add a regression test for bug fixes, cover the happy path and a meaningful edge case, and run narrow checks while working.
## Security and environment
- Do not commit secrets or environment files such as `.env` when they contain secrets; safe configuration examples without secret values are allowed. Represent credentials with environment-variable names or references and validate untrusted input.
## Workflow
- Keep changes small, update tests and documentation with code, and never overwrite unrelated work.
## Important constraints
- Preserve existing project boundaries and verify paths against the repository.
## Imports
@README.md