Cursor AI TypeScript .cursorrules prompt file
About .cursorrules prompt file
What you can build
Supabase-Powered Chat App: Create a real-time chat application using Supabase for authentication and data storage, and Next.js with TypeScript for the front-end. Utilize Radix UI for accessible components and Tailwind CSS for responsive styling.
TypeScript Form Generator: A web tool that generates form components using TypeScript interfaces, Zod validation, and react-hook-form, styled with Shadcn UI and Tailwind CSS.
Next.js E-commerce Platform: Build a scalable and maintainable e-commerce platform with a focus on performance using Next.js 14 App Router, Supabase for backend operations, and optimize using Tailwind CSS for responsive design.
Dynamic Component Library: Develop a component library with Radix UI and Shadcn UI components, focused on accessibility and ease of use in TypeScript projects, offering clickable links with prompts for usage examples.
Serverless Blogging Platform: Create a blogging platform with Next.js that relies on server components and Supabase for content management, featuring TypeScript interfaces for post structures and user authentication.
Real-time Analytics Dashboard: An analytics dashboard that visualizes data from Supabase in real-time using React and Next.js, styled with Tailwind CSS, providing responsive data visualizations.
AI-driven Web App Builder: A tool that allows users to generate web applications by specifying requirements in prompts, leveraging Next.js and Supabase for the backend, and producing TypeScript-based code.
Remote Learning Management System: Develop an LMS using Next.js, Supabase for user and content management, and Radix UI for user interfaces, focusing on mobile-first design with Tailwind CSS.
SEO Optimization Tool: A tool for optimizing website performance and SEO using Web Vitals, built with Next.js for server-side rendering and data fetching strategies.
Event Management Application: Create an event management application using Supabase for event data storage and authentication, with Next.js for rendering and React components for user interactions.
Benefits
- Emphasize functional, declarative programming, avoiding classes, and utilizing the RORO pattern for TypeScript functions.
- Ensure concise, modularized code, promoting named exports, lowercase directories, and error handling with early returns and guard clauses.
- Leverage React/Next.js with functional components, TypeScript interfaces, and mobile-first design using Shadcn UI, Radix UI, and Tailwind CSS elements.
Synopsis
Developers familiar with TypeScript and the Next.js ecosystem can use this prompt to build a scalable, maintainable web application with Supabase for data management and error handling best practices.
Overview of .cursorrules prompt
The .cursorrules file provides guidelines for developing applications using TypeScript, Node.js, Next.js 14, and related technologies. It emphasizes writing concise and technical code with TypeScript examples, preferring functional and declarative programming, modularization, and descriptive naming conventions. It guides error handling, validation, and structuring code with a focus on readability and maintainability. The file also includes best practices for React/Next.js development, such as using functional components, responsive design, error boundaries, and type safety with Zod for form validation. Additionally, it covers data access and authentication using Supabase, along with key conventions for optimizing performance and utilizing Next.js features. Developers are encouraged to follow these rules for consistent and efficient code implementation.