Nextjs 14 React .cursorrules prompt file
About .cursorrules prompt file
What you can build
SchemaSync - A tool that automatically synchronizes and validates database schemas defined in the schema folder with the actual database using Drizzle ORM, ensuring all changes are accurately reflected in the database without manual intervention.
tRPC Procedure Generator - A service that generates boilerplate code for public, protected, and admin tRPC procedures based on the given database entities, streamlining the process of setting up API endpoints.
Visual Entity Designer - An app that provides a drag-and-drop interface for creating and managing entities, automatically generating TypeScript code for database operations under the entities folder.
Use-Case Composer - An online platform where developers can visually design and test complex logical operations by composing various use-cases, making it easier to manage and understand the application's business logic.
Next.js Routing Wizard - A tool that assists developers in creating optimized routing solutions for Next.js 14 applications using the App Router, ensuring efficient and scalable route management.
Tailwind Configurator - A web-based application that provides an intuitive interface for customizing TailwindCSS configurations, helping developers quickly set up and adjust styles according to project needs.
ShadCN & Radix UI Component Library - A library that offers pre-built React components styled with ShadCN UI and Radix UI, allowing developers to quickly integrate responsive and accessible components into their projects.
Dirizzle ORM Migration Helper - A service that simplifies the process of writing and managing database migrations with Dirizzle ORM, providing tools for version control and rollback capabilities.
tRPC Tester - A web-based tool that allows developers to easily test their tRPC endpoints in a mock environment, validating the input and output of APIs without affecting the production database.
Full-Stack Project Starter - A template project setup with integrated Drizzle ORM, tRPC, Next.js, TailwindCSS, ShadCN UI, Radix UI, and all layers (entity, use-case, router) pre-configured for rapid application development.
Benefits
- Modular Architecture: Organized into entities, use-cases, and routers ensuring clean separation of concerns and maintainable code structure.
- Typed Procedures: Utilize TypeScript with tRPC for strongly typed interfaces in public, protected, and admin procedures.
- Tailored UI: Implement ShadCN and Radix UI with Tailwind for responsive and highly customizable UI components.
Synopsis
This prompt would benefit a full-stack developer building scalable web applications with a structured backend using TypeScript, Next.js, and tRPC, leveraging efficient database operations with Drizzle ORM and MySQL.
Overview of .cursorrules prompt
The .cursorrules file outlines a structured full-stack workflow using various modern web development technologies and frameworks such as TypeScript, Next.js, React, and Tailwind CSS. It leverages Drizzle ORM for MySQL database operations, organized as separate entities. The file describes a three-layer architectural approach to backend operations in tRPC, distinguishing between public, protected, and admin procedures. Database operations are isolated in entities, while logical operations are handled in use-cases which manipulate these entities. Endpoints are then defined in the router where use-cases facilitate the intended logic and return the expected results. This modular approach ensures clarity, separation of concerns, and reusability of code components.