This AGENTS.md file provides comprehensive guidance for Cursor and other AI agents working with this codebase.
- React Router 7 in SSR/Framework mode
- React 19
- TypeScript
- Tailwind CSS 4 and Shadcn UI
- Turborepo
apps/web- Main React Router SaaS applicationapps/e2e- Playwright end-to-end testspackages/features/*- Feature packagespackages/- Shared packages and utilitiestooling/- Build tools and development scripts
pnpm dev # Start all apps
pnpm --filter web dev # Main app (port 3000)pnpm format:fix
pnpm lint:fix
pnpm typecheck- Run the typecheck command regularly to ensure your code is type-safe.
- Run the linter and the formatter when your task is complete.
- Write clean, clear, well-designed, explicit TypeScript
- Avoid obvious comments
- Avoid unnecessary complexity or overly abstract code
- Always use implicit type inference, unless impossible
- You must avoid using
any - Handle errors gracefully using try/catch and appropriate error types
- Use functional components
- Add
data-testfor E2E tests where appropriate useEffectis a code smell and must be justified - avoid if possible- Do not write many separate
useState, prefer single state object (unless required)
- tests should be under <package_name>/tests
- Use filename.test.ts naming convention to name test files
- Use vitest and vitest istanbul for coverage
Avoid using console.log, use the logging service like following (pseudo code):
import { getLogger } from '@qwery/shared/logger';
[...]
const logger = await getLogger();
logger.info()