# TypeScript web project
TypeScript — Browser application (React).
## Project
- **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 AGENTS.md.
## Project structure
- `src/` — Application code.
- `tests/` — Unit and integration tests.
- `public/` — Static assets.
## Code style
- Treat `unknown` as an input boundary: validate it once, then pass the narrowed type through the call chain. Model missing values and failure states explicitly instead of weakening checks.
- Store a value in React state only when it changes independently of props; derive the rest during render. Tie effects to the values they synchronize and clean up external subscriptions.
- Give every control an accessible name, expose validation state to assistive technology, and make each interaction possible without a pointer. Check reflow at narrow widths and honor reduced-motion preferences.
- Lift state only to the nearest owner that shares it, and represent loading, empty, and failed data as distinct UI states.
## Testing
- Test pure decisions as units and wiring at integration boundaries. For a bug fix, preserve a failing input as a regression case; keep tests deterministic and independent of live services where possible.
## Security
- Keep secret material in the project's configured secret store and refer to it by environment-variable name. Minimize sensitive data in logs; reject malformed external input before a privileged side effect.
## Workflow
- Inspect the working tree before editing and preserve existing user changes. Keep the final diff focused, then report which checks ran and what they returned.