IDE Rule: Nextjs
IDE Rule: Nextjs is a verified IDE_RULE blueprint on Promptally in Framework IDE Rules optimized for leading AI models. Cursorrules_Mdc specification for IDE Rule: Nextjs. Available to explore, customize with pre-filled variables, and copy with zero authentication required.
Technical Specifications
| Specification | Value |
|---|---|
| Artifact type | IDE RULE (Framework IDE Rules) |
| Compatible engines | Universal / Model Agnostic |
| Input variables | None (pre-filled) |
| Approximate tokens | 435 |
| Source file | .cursorrules |
| Access tier | Free public (MIT) |
Pre-Filled Template
--- description: "Next.js with TypeScript and Tailwind UI best practices" globs: **/*.tsx, **/*.ts, src/**/*.ts, src/**/*.tsx alwaysApply: false --- # Next.js Best Practices ## Project Structure - Use the App Router directory structure - Place components in `app` directory for route-specific components - Place shared components in `components` directory - Place utilities and helpers in `lib` directory - Use lowercase with dashes for directories (e.g., `components/auth-wizard`) ## Components - Use Server Components by default - Mark client components explicitly with 'use client' - Wrap client components in Suspense with fallback - Use dynamic loading for non-critical components - Implement proper error boundaries - Place static content and interfaces at file end ## Performance - Optimize images: Use WebP format, size data, lazy loading - Minimize use of 'useEffect' and 'setState' - Favor Server Components (RSC) where possible - Use dynamic loading for non-critical components - Implement proper caching strategies ## Data Fetching - Use Server Components for data fetching when possible - Implement proper error handling for data fetching - Use appropriate caching strategies - Handle loading and error states appropriately ## Routing - Use the App Router conventions - Implement proper loading and error states for routes - Use dynamic routes appropriately - Handle parallel routes when needed ## Forms and Validation - Use Zod for form validation - Implement proper server-side validation - Handle form errors appropriately - Show loading states during form submission ## State Management - Minimize client-side state - Use React Context sparingly - Prefer server state when possible - Implement proper loading states
How to use this ide rule
- Review the pre-filled example and source files above.
- Copy the template or download
.cursorrules, then use it in your model, IDE, or workflow tool. - Compare your result with the sample output when one is provided.
Frequently Asked Questions
How do I use IDE Rule: Nextjs?
Open the ide rule on Promptally, review the pre-filled example, then copy the template or download .cursorrules and paste it into your model, IDE or workflow tool. IDE Rule: Nextjs is a static blueprint with no dynamic variables. Copy it and use it as-is.
Is IDE Rule: Nextjs free?
Yes. IDE Rule: Nextjs is free to view, copy and download on Promptally without creating an account. It is published under the MIT license.
What variables does IDE Rule: Nextjs need?
IDE Rule: Nextjs is a static blueprint with no dynamic variables. Copy it and use it as-is.