TypeScript Next.js .cursorrules prompt file
About .cursorrules prompt file
What you can build
Enterprise Dashboard Builder: A platform for creating custom enterprise dashboards using Next.js, Tailwind, and Shadcn UI. Users can integrate their data sources through Node.js APIs and visualize data using various widgets.
Task Management System: Develop a collaborative task management system leveraging Next.js and Prisma with PostgreSQL for handling tasks, projects, and teams efficiently with real-time collaboration features.
E-commerce Platform Starter Kit: A robust e-commerce starter kit built with TypeScript, React, and Next.js. It supports product listings, a shopping cart, and secure checkout processes, integrated with Shadcn UI for design.
Content Management System (CMS): A customizable CMS for developers, built using Next.js and Turborepo, featuring drag-and-drop page builders, and direct database connections with Prisma for PostgreSQL.
Tailwind CSS Helper Tool: A web-based tool to generate responsive Tailwind CSS classes dynamically, with a preview option to see changes in real time and export options for integration into existing projects.
SaaS Template Using Next.js: An out-of-the-box SaaS application template that includes user authentication, subscription management, and billing, utilizing Stripe API and hosted on a serverless infrastructure.
Online Learning Platform: Build an online education platform utilizing React and Next.js for course videos, quizzes, and user progress tracking with data managed by Prisma and PostgreSQL.
Automated Deployment Checker: A Node.js app to check and verify deployment statuses across different environments, utilizing GitHub Actions for continuous integration and deployment feedback.
Personal Finance Tracker: Develop a mobile-first personal finance tracker with a Next.js frontend and a Node.js backend, allowing users to manage budgets, track spending, and generate reports.
Real-time Chat Application: Create a real-time chat application using Next.js with WebSockets support, featuring user authentication, message storage, and notifications, styled with Shadcn UI and Tailwind.
Benefits
- Prioritize concise TypeScript examples with accurate use of functional and declarative patterns, avoiding classes.
- Implement type-safe server actions using Zod for input validation; ensure proper error handling and response.
- Optimize component architecture by favoring named exports, colocating files, and using Shadcn UI with Tailwind.
Synopsis
Developers working with TypeScript, Node.js, and React ecosystems can build scalable, responsive web applications using Next.js, Prisma, PostgreSQL, and modern UI components with the provided guidelines.
Overview of .cursorrules prompt
The .cursorrules file provides guidelines and best practices for developers using technologies like TypeScript, Node.js, Next.js, React, Prisma, and PostgreSQL. It emphasizes writing concise and technical TypeScript code by using functional and declarative programming patterns, descriptive variable names, and consistent file structures. It suggests using Turborepo, handling API requests with swr, and implementing UI components with Shadcn UI and Tailwind CSS. The file also recommends using React Hook Form and Zod for validation and advises using named exports for components. Additionally, it provides examples for server actions and error handling, focusing on type safety and proper validation with schemas.