-
Notifications
You must be signed in to change notification settings - Fork 252
/
.cursorrules
34 lines (31 loc) · 909 Bytes
/
.cursorrules
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// Next.js App Router .cursorrules
// Next.js App Router best practices
const nextjsAppRouterBestPractices = [
"Use server components by default",
"Implement client components only when necessary",
"Utilize the new file-based routing system",
"Use layout.js for shared layouts",
"Implement loading.js for loading states",
"Use error.js for error handling",
"Utilize route handlers for API routes",
];
// Folder structure
const folderStructure = `
app/
layout.js
page.js
components/
lib/
styles/
public/
`;
// Additional instructions
const additionalInstructions = `
1. Use TypeScript for type safety
2. Implement proper metadata for SEO
3. Utilize Next.js Image component for optimized images
4. Use CSS Modules or Tailwind CSS for styling
5. Implement proper error boundaries
6. Follow Next.js naming conventions for special files
7. Use environment variables for configuration
`;