Next.js .cursorrules
A minimal .cursorrules template for Next.js projects in Cursor IDE.
Template (26 lines)
Section titled “Template (26 lines)”# Next.js Project Rules
## Tech Stack- Next.js 15 (App Router)- TypeScript with strict mode- Tailwind CSS- Prisma for database
## Commands- `npm run dev` - Development- `npm test` - Tests- `npm run lint` - Linting- `npm run build` - Production build
## Code Style- Server Components by default- 'use client' only when needed- Server Actions for mutations- Named exports only
## Gotchas- [Add your project-specific gotchas]
## File Patterns- Pages: `app/[route]/page.tsx`- Layouts: `app/[route]/layout.tsx`- API: `app/api/[route]/route.ts`- Components: `components/[Name].tsx`- Actions: `lib/actions/[name].ts`- Copy the template above
- Save as
.cursorrulesin your project root - Review and update the Tech Stack to match your project
- Add your project-specific gotchas