1.4 KiB
1.4 KiB
Frontend AGENTS
This directory is a Vite + React + TypeScript frontend. Follow the current split between pages, shared state/helpers, auth context, and reusable UI.
Frontend layout
src/pages: route-level screens and page-scoped state modules.src/lib: API helpers, cache helpers, schedule utilities, shared types, and test files.src/auth: authentication context/provider.src/components/layout: page shell/layout components.src/components/ui: reusable UI primitives.src/index.css: global styles.
Real frontend commands
Run these from front/:
npm run devnpm run buildnpm run previewnpm run cleannpm run lintnpm run test
Important:
npm run lintis the current TypeScript check because it runstsc --noEmit.- There is no separate ESLint script.
- There is no separate
typecheckscript beyondnpm run lint.
Frontend rules
- Keep route behavior in
src/pagesand shared non-UI logic insrc/lib. - Add or update tests next to the state/helper module they exercise, following the existing
*.test.tspattern. - Preserve the current Vite alias usage:
@/*resolves from thefront/directory root. - If a change depends on backend API behavior, verify the proxy expectations in
vite.config.tsbefore hardcoding URLs. - Use the existing
npm run build,npm run test, andnpm run lintcommands for validation; do not invent a separate frontend verification command.