Next.js 14 Supabase TailwindCSS .cursorrules prompt file
About .cursorrules prompt file
What you can build
Next.js 14 Starter Kit: An application that provides a boilerplate setup for Next.js 14 projects, integrated with Supabase for backend services, TailwindCSS for styling, and pre-configured TypeScript for type safety. This starter kit will also include recommended file structures, naming conventions, and optimized performance settings.
Next.js Code Quality Checker: A tool that analyzes Next.js 14 codebases to ensure developers are adhering to the coding standards and best practices outlined in this guide. It includes checks for code style, naming conventions, unused variables, and logical errors, providing actionable feedback and suggestions.
Component Library for TailwindCSS and Stylus: A comprehensive collection of reusable UI components built with TailwindCSS for layout and utility styles, and Stylus for complex styling, designed to work seamlessly with Next.js projects. This library would include components following Shadcn UI and Radix UI principles.
React Hook Form Builder: A GUI-based application to create complex forms using react-hook-form alongside validators like Zod or Joi. This tool would help developers more efficiently design form layouts, implement controlled components, and setup client-side and server-side validation right from the interface.
Next.js Performance Optimizer: A web service that scans your Next.js project for performance bottlenecks, offering solutions and improvements such as dynamic loading suggestions, image optimization tips, and guidance on minimizing the use of global styles and client components.
Accessibility Enforcer Tool: A utility that audits Next.js applications for accessibility (a11y) ensuring that semantic HTML is used, ARIA attributes are properly implemented, and keyboard navigation support is fully enabled, providing detailed reports and fixing tips.
Internationalization Toolkit for Next.js: A plugin that facilitates managing multilingual content in Next.js projects using libraries like react-intl or next-i18next. This toolkit would offer automated translation suggestions, language switchers, and integration guides for seamless i18n support.
Error Handling and Logging Service: A service designed to integrate with Next.js 14 applications to efficiently manage error handling. It would offer insights on error logging best practices, tools for setting up server-side error tracking, and utilities for creating user-friendly error messages.
Next.js Testing Suite: A comprehensive setup for testing Next.js applications, including pre-configured units for Jest and React Testing Library. The suite would come with sample tests for common components and utilities for integration and snapshot testing.
Supabase Integration Manager: A dashboard application that simplifies managing and integrating Supabase services within Next.js projects. It would offer features like real-time database connection monitoring, API management tools, and simplified authentication setup.
Benefits
- Emphasizes TypeScript for type safety and Supabase integration for backend services, enhancing development efficiency.
- Strong focus on performance optimization, including strategies for Web Vitals and implementing lazy loading.
- Offers thorough error handling guidelines, with emphasis on early error detection and logging best practices.
Synopsis
This prompt would benefit a full-stack web developer, enabling them to create a robust, well-structured, and optimized Next.js 14 application with modern web development practices.
Overview of .cursorrules prompt
The .cursorrules file serves as a comprehensive guide for expert full-stack web developers working with Next.js 14 and associated technologies, such as Supabase, TailwindCSS, and TypeScript. It outlines best practices, coding standards, and conventions for effectively developing Next.js applications. Core areas covered include code style and structure, React and Hooks usage, state management, UI styling, performance optimization, form handling, error handling, accessibility, testing, security, and internationalization. The guide emphasizes modern development techniques, such as functional and declarative programming, component memoization, and code-splitting with React features, to enhance readability, maintainability, and performance of web applications.