.cursorrules Flutter App Expert Guidelines copy // Flutter App Expert .cursorrules // Flexibility Notice // Note: This is a recommended project structure, but be flexible and adapt to existing project structures. // Do not enforce these structural patterns if the project follows a different organization. // Focus on maintaining consistency with the existing project architecture while applying Flutter best practices. // Flutter Best Practices const flutterBestPractices = [ "Adapt to existing project architecture while maintaining clean code principles", "Use Flutter 3.x features and Material 3 design", "Implement clean architecture with BLoC pattern", "Follow proper state management principles", "Use proper dependency injection", "Implement proper error handling", "Follow platform-specific design guidelines", "Use proper localization techniques", ]; // Project Structure // Note: This is a reference structure. Adapt to the project's existing organization const projectStructure = ` lib/ core/ constants/ theme/ utils/ widgets/ features/ feature_name/ data/ datasources/ models/ repositories/ domain/ entities/ repositories/ usecases/ presentation/ bloc/ pages/ widgets/ l10n/ main.dart test/ unit/ widget/ integration/ `; // Coding Guidelines const codingGuidelines = ` 1. Use proper null safety practices 2. Implement proper error handling with Either type 3. Follow proper naming conventions 4. Use proper widget composition 5. Implement proper routing using GoRouter 6. Use proper form validation 7. Follow proper state management with BLoC 8. Implement proper dependency injection using GetIt 9. Use proper asset management 10. Follow proper testing practices `; // Widget Guidelines const widgetGuidelines = ` 1. Keep widgets small and focused 2. Use const constructors when possible 3. Implement proper widget keys 4. Follow proper layout principles 5. Use proper widget lifecycle methods 6. Implement proper error boundaries 7. Use proper performance optimization techniques 8. Follow proper accessibility guidelines `; // Performance Guidelines const performanceGuidelines = ` 1. Use proper image caching 2. Implement proper list view optimization 3. Use proper build methods optimization 4. Follow proper state management patterns 5. Implement proper memory management 6. Use proper platform channels when needed 7. Follow proper compilation optimization techniques `; // Testing Guidelines const testingTestingGuidelines = ` 1. Write unit tests for business logic 2. Implement widget tests for UI components 3. Use integration tests for feature testing 4. Implement proper mocking strategies 5. Use proper test coverage tools 6. Follow proper test naming conventions 7. Implement proper CI/CD testing `; Cursor AI by @PatrickJS
.cursorrules Cursor AI React TypeScript Shadcn UI copy You are an expert AI programming assistant that primarily focuses on producing clear, readable React and TypeScript code. You always use the latest stable version of TypeScript, JavaScript, React, Node.js, Next.js App Router, Shaden UI, Tailwind CSS and you are familiar with the latest features and best practices. You carefully provide accurate, factual, thoughtful answers, and are a genius at reasoning AI to chat, to generate code. Style and Structure Naming Conventions TypeScript Usage UI and Styling Performance Optimization Other Rules need to follow: Don't be lazy, write all the code to implement features I ask for. Cursor AI by @Mia
.cursorrules Convex copy This document serves as some special instructions when working with Convex. # Schemas When designing the schema please see this page on built in System fields and data types available: https://docs.convex.dev/database/types Here are some specifics that are often mishandled: ## v (https://docs.convex.dev/api/modules/values#v) The validator builder. This builder allows you to build validators for Convex values. Validators can be used in schema definitions and as input validators for Convex functions. Type declaration Name Type id (tableName: TableName) => VId<GenericId, "required"> null () => VNull number () => VFloat64 float64 () => VFloat64 bigint () => VInt64 int64 () => VInt64 boolean () => VBoolean string () => VString bytes () => VBytes literal (literal: T) => VLiteral array (element: T) => VArray object (fields: T) => VObject<Expand<{ [Property in string | number | symbol]?: Exclude<Infer, undefined> } & { [Property in string | number | symbol]: Infer }>, T, "required", { [Property in string | number | symbol]: Property | `${Property & string}.${T[Property]["fieldPaths"]}` }[keyof T] & string> record (keys: Key, values: Value) => VRecord<Record<Infer, Value["type"]>, Key, Value, "required", string> union (...members: T) => VUnion any () => VAny optional (value: T) => VOptional ## System fields (https://docs.convex.dev/database/types#system-fields) Every document in Convex has two automatically-generated system fields: _id: The document ID of the document. _creationTime: The time this document was created, in milliseconds since the Unix epoch. You do not need to add indices as these are added automatically. ## Example Schema This is an example of a well crafted schema. ```ts import { defineSchema, defineTable } from "convex/server"; import { v } from "convex/values"; export default defineSchema( { users: defineTable({ name: v.string(), }), sessions: defineTable({ userId: v.id("users"), sessionId: v.string(), }).index("sessionId", ["sessionId"]), threads: defineTable({ uuid: v.string(), summary: v.optional(v.string()), summarizer: v.optional(v.id("_scheduled_functions")), }).index("uuid", ["uuid"]), messages: defineTable({ message: v.string(), threadId: v.id("threads"), author: v.union( v.object({ role: v.literal("system"), }), v.object({ role: v.literal("assistant"), context: v.array(v.id("messages")), model: v.optional(v.string()), }), v.object({ role: v.literal("user"), userId: v.id("users"), }), ), }) .index("threadId", ["threadId"]), }, ); Cursor AI by @PatrickJS
.cursorrules Angular TypeScript copy you are an expert Angular programmer using TypeScript, Angular 18 and Jest that focuses on producing clear, readable code. you are thoughtful, give nuanced answers, and are brilliant at reasoning. you carefully provide accurate, factual, thoughtful answers and are a genius at reasoning. before providing an answer, think step by step, and provide a detailed, thoughtful answer. if you need more information, ask for it. always write correct, up to date, bug free, fully functional and working code. focus on performance, readability, and maintainability. before providing an answer, double check your work include all required imports, and ensure proper naming of key components do not nest code more than 2 levels deep prefer using the forNext function, located in libs/smart-ngrx/src/common/for-next.function.ts instead of for(let i;i < length;i++), forEach or for(x of y) code should obey the rules defined in the .eslintrc.json, .prettierrc, .htmlhintrc, and .editorconfig files functions and methods should not have more than 4 parameters functions should not have more than 50 executable lines lines should not be more than 80 characters when refactoring existing code, keep jsdoc comments intact be concise and minimize extraneous prose. if you don't know the answer to a request, say so instead of making something up. Cursor AI by @Dave Bush