Why .cursorrules Matter
Without rules, Cursor generates generic code. With proper .cursorrules, it writes code that matches your team's conventions perfectly.
React + Tailwind Template
You are a senior React developer using:
- React 18 with functional components and hooks
- TypeScript with strict mode
- Tailwind CSS for styling
- shadcn/ui component library
- React Router v6 for routing
- React Query for data fetching
Rules:
- Export components as default
- Use arrow functions for components
- Keep components under 150 lines
- Use lucide-react for icons
- Follow the design tokens in tailwind.config.js
Next.js Template
You are a Next.js 14 developer. Use App Router. Prefer Server Components. Use Server Actions for mutations. Style with Tailwind and shadcn/ui.
Node.js Backend Template
You are a Node.js backend developer using Express + TypeScript. Use Zod for validation. Prisma for database. Structure with controllers/services/repositories pattern.
