diff --git a/.cursor/.gitignore b/.cursor/.gitignore new file mode 100644 index 0000000..ad4619c --- /dev/null +++ b/.cursor/.gitignore @@ -0,0 +1 @@ +rules/pensive* \ No newline at end of file diff --git a/.cursor/rules/code-standards.mdc b/.cursor/rules/code-standards.mdc deleted file mode 100644 index 91d5d49..0000000 --- a/.cursor/rules/code-standards.mdc +++ /dev/null @@ -1,18 +0,0 @@ ---- -description: General code standards -globs: -alwaysApply: false ---- -# Code standards - -## General -- Avoid trailing whitespace -- Prefer pure functions -- Keep functions small and focused -- Use descriptive names for functions, variables, types -- Add "why" comments for complex logic -- Avoid using global state - -## Typescript specific -- Always use absolute imports (ie, `import { Item } from '@/lib/domain/Item'`) rather than relative imports (ie, `import { Item } from './domain/Item'`) -- \ No newline at end of file diff --git a/.cursor/rules/commit-messages.mdc b/.cursor/rules/commit-messages.mdc deleted file mode 100644 index 037372c..0000000 --- a/.cursor/rules/commit-messages.mdc +++ /dev/null @@ -1,10 +0,0 @@ ---- -description: -globs: -alwaysApply: true ---- - -# Commit messages - -- Use Conventional Commit messages -- Be brief and concise diff --git a/.cursor/rules/development-workflow.mdc b/.cursor/rules/development-workflow.mdc deleted file mode 100644 index dd28768..0000000 --- a/.cursor/rules/development-workflow.mdc +++ /dev/null @@ -1,45 +0,0 @@ ---- -description: Development Workflow -globs: -alwaysApply: false ---- -## Development Workflow - -### 1. Git Setup and Branch Management -Before starting work: -1. Ask me if I want to create a new branch for our work -2. If yes: - - Check main branch status and sync with remote if necessary - - Create a feature branch from main using a descriptive name - - Confirm branch creation and status - - Switch to the feature branch -3. Do NOT commit any code. Prompt me when you think its time to commit; along with a proposed commit message. - -### 2. Understanding the requirements -Before starting work: -1. Explain the problem statement and requirements -2. Explain the tests that we need to write -3. Explain the code that we need to write - -### 3. Test-Driven Development Cycle -For each feature/change: -1. **Test First (Red)** - - Check for any test file changes before starting - - If there are no changes, propose test cases before implementation - - When possible, start with tests that exercise the user facing API/interface - - Then move to lower level tests - - Write specific, focused test cases - - Run pnpm test:unit to ensure the new tests fail appropriately - - If these pass ask me to manually run the integration tests if needed - -2. **Minimal Implementation (Green)** - - Write just enough code to pass tests - - Include type signatures for all functions - - Run pnpm test to verify all tests pass - -3. **Refactor** - - Identify refactoring opportunities - - Extract functions for reusability - - Improve naming and documentation - - Run pnpm test:unit after each refactor to verify that tests pass - - If these pass ask me to manually run the integration tests if needed \ No newline at end of file diff --git a/.cursor/rules/technology-stack.mdc b/.cursor/rules/technology-stack.mdc index 9fbbee1..30e807b 100644 --- a/.cursor/rules/technology-stack.mdc +++ b/.cursor/rules/technology-stack.mdc @@ -1,19 +1,89 @@ --- -description: Technology stack -globs: +description: +globs: *\.(ts|tsx|js|jsx)$ alwaysApply: false --- +# Technology Stack -# Technology stack - -- Framework: Next.js 15.1 with React 19 -- Language: TypeScript -- Styling: Tailwind CSS with shadcn/ui components -- Databas*: Firebase Firestore -- Authentication: Firebase Auth -- State Management: React Hooks + Custom Hooks -- Form Handling: React Hook Form -- Data Visualization: Recharts -- Testing: vitest -- Dependency Management: pnpm - - Always run commands using pnpm rather than npm +Rule for documenting and maintaining consistency in the technology stack used across the project. + + +name: technology-stack +description: Documents the core technology stack and enforces consistent version usage +filters: + - type: file_extension + pattern: "*\.(ts|tsx|js|jsx)$" + - type: content + pattern: "import|require" + - type: event + pattern: "file_change|file_create" + +actions: + - type: suggest + message: | + This project uses the following technology stack: + + Core Framework: + - Next.js 15.x (with Turbopack) + - React 19.x + - TypeScript 5.x + + Backend & Authentication: + - Firebase 11.x + - Authentication + - Firestore + - Cloud Functions + - App Hosting + - Firebase Admin SDK 12.x + - Firebase Functions 6.x + + UI Components & Styling: + - Radix UI (Headless Components) + - Tailwind CSS 3.x + - Class Variance Authority + - Framer Motion 12.x + - Lucide React (Icons) + + Form Handling & Validation: + - React Hook Form 7.x + - Zod 3.x + - Class Validator + - Class Transformer + + Rich Text Editing: + - Tiptap 2.x + - React Markdown 10.x + + Data Visualization: + - Recharts 2.x + + Development Tools: + - ESLint 9.x + - Vitest 3.x + - Husky (Git Hooks) + - Concurrently (Dev Process) + + When adding new dependencies: + 1. Ensure compatibility with existing stack versions + 2. Prefer established libraries from current stack + 3. Document major version changes + 4. Consider bundle size impact + 5. Check Firebase compatibility + +examples: + - input: | + # Adding a new UI component library + import { Button } from '@some-ui/react' + output: "Consider using Radix UI components with our existing styling system" + + - input: | + # Using an older React version + "react": "^18.0.0" + output: "Project uses React 19.x, please update version" + +metadata: + priority: high + version: 1.0 + last_updated: "2024-03-21" + maintainer: "Team" + \ No newline at end of file