<One sentence: what this single-page app does.>
Stack
- React + TypeScript + Vite
-
Routing: <React Router TanStack Router>; server state: ; client state: <Zustand context> -
Styling: <Tailwind CSS CSS Modules vanilla-extract> - Tests: Vitest + Testing Library; E2E: Playwright
Commands
- Dev:
npm run dev(http://localhost:5173) - Typecheck:
npx tsc --noEmit(Vite does not typecheck during dev) - Lint:
npm run lint - Tests:
npx vitest run(watch:npx vitest) - Build + preview:
npm run build && npm run preview
Layout
src/routes/orsrc/pages/screens;src/components/shared UI;src/features/<name>/feature modules (components, hooks, api, tests together)src/api/API client and query functions
Rules
- Server data goes through
hooks, not `useEffect` + `useState`. - Components: function components, props typed with an explicit
Propstype, no default exports for components except route modules. - Tests use Testing Library queries by role/label (
getByRole,getByLabelText), not test IDs, unless there is no accessible handle. - Only
VITE_-prefixed env vars reach the client bundle; nothing secret goes there. - Keep bundle size in mind: lazy-load routes (
React.lazyor the router’s lazy routes) and avoid importing whole libraries for one function.
Definition of done
npx tsc --noEmit, lint and tests pass;npm run buildsucceeds for config or dependency changes.