Cline rules
.clinerules/.project-consistency-keeper2.mdCline rules
Quality
100/100
Scores the file, not the repository.Length
986 words
37 headings · 1 code blocksRepository
5
— · pushed 220 days agoLast changed
3 days ago
First indexed 3 days ago.1# Project Consistency Keeper - Auto-generated23**Last Updated**: 2025-01-174**Project Root**: `./`5**Project Name**: WiseMapping Frontend6**Version**: 6.0.178## Technology Stack910### Languages & Runtimes11- **Node.js**: >=18.0.0 (required)12- **TypeScript**: ^5.9.3 (strict mode enforced)13- **JavaScript**: ES2022 target, ES2020 modules14- **JSX**: React JSX automatic runtime1516### Frameworks & Core Libraries17- **React**: ^19.0.0 (peer dependency)18- **Material-UI (MUI)**: ^7.3.419 - `@mui/material`: ^7.3.420 - `@mui/icons-material`: ^7.3.421- **Emotion**: ^11.14.0+ (styled-components alternative)22- **Styled Components**: ^6.1.192324### Core Architecture Packages25- **@wisemapping/web2d**: SVG abstraction layer for chart rendering26- **@wisemapping/mindplot**: Vanilla ES6 mind map engine27- **@wisemapping/editor**: React component wrapper for mindplot28- **webapp**: Complete React application (not in current scope)2930### Key Dependencies31- **html2canvas**: ^1.4.1 (for export functionality)32- **jspdf**: ^3.0.3 (PDF generation)33- **lodash**: ^4.17.21 (utility functions)34- **xml-formatter**: ^3.6.7 (XML formatting)35- **fflate**: Custom vendor version (compression)3637## Toolchain Standards3839### Package Management40- **Primary**: Yarn with workspaces41- **Monorepo Tool**: Lerna (independent versioning mode)42- **Workspace Structure**: `packages/*`43- **Dependency Linking**: `workspace:*` protocol4445### Build System46- **Bundler**: Webpack ^5.102.147- **Configuration**: `webpack.common.js` (shared), `webpack.prod.js`, `webpack.dev.js`48- **TypeScript Loader**: ts-loader ^9.5.4 with transpile-only mode49- **Babel**: @babel/preset-typescript ^7.28.550- **Optimization Features**:51 - Persistent filesystem caching (`.webpack-cache`)52 - Thread-loader for parallel builds53 - Deterministic module IDs54 - Dead code elimination (`usedExports: true`)5556### Development Server57- **Webpack Dev Server**: ^5.2.258- **Port**: Configurable via `$PORT` environment variable59- **Default Ports**:60 - Editor Storybook: 600861 - Mindplot/Storybook: 600662 - Playground: 80816364### Code Quality & Formatting6566#### ESLint Configuration67- **Version**: ^9.38.0 with flat config (`eslint.config.mjs`)68- **Presets**:69 - `@eslint/js/recommended`70 - `eslint-plugin-react`71 - `eslint-plugin-react-hooks`72 - `eslint-plugin-cypress`73 - `eslint-plugin-storybook`74 - `eslint-config-prettier`75- **Globals**: browser, node, commonjs, jest76- **Target**: ECMAScript 20227778#### Prettier Configuration79- **Print Width**: 10080- **Tab Width**: 281- **Single Quotes**: true82- **Trailing Commas**: `all`83- **Semicolons**: true8485#### TypeScript Configuration86- **Strict Mode**: Enabled (`strict: true`)87- **Strict Null Checks**: Enabled88- **Target**: ES202289- **Module**: ES202090- **JSX**: React automatic runtime91- **Allow JS**: true (for mixed codebase)92- **Source Maps**: Enabled93- **Declaration**: true9495### Testing Framework9697#### Jest Configuration98- **Version**: ^30.2.099- **Environment**: jsdom100- **Preset**: ts-jest101- **Transform**:102 - JS/TS: babel-jest103 - Assets: jest-transform-stub104- **Module Extensions**: js, ts, tsx105- **Verbose**: true106107#### Cypress Configuration108- **Version**: ^15.5.0109- **Base URLs**:110 - Playground: `http://localhost:8081`111 - Storybook: `http://localhost:6006`, `http://localhost:6008`112- **Features**:113 - Visual regression testing with `cypress-image-snapshot`114 - Screenshot/video capture115116### Git Workflow117- **Hooks**: Husky ^9.1.7118- **Pre-commit**: lint-staged119- **Pre-push**: `yarn lint && yarn test`120- **Branch**: Main development flow121122## Project Architecture123124### Directory Structure125```126.127├── packages/128│ ├── editor/ # React-based mind map editor129│ ├── mindplot/ # Core mind map engine (vanilla ES6)130│ ├── web2d/ # SVG abstraction layer131│ └── fastmind/ # Additional utilities (if present)132├── api/ # API-related code133├── scripts/ # Build and utility scripts134├── memory-bank/ # Project documentation135└── .clinerules/ # Development guidelines136```137138### Module Organization139- **Independent Versioning**: Each package uses independent versions140- **Workspace Dependencies**: Internal packages use `workspace:*`141- **Main Entry**: `src/index.ts` for all packages142- **Files**: `src` directories published (not `dist`)143144### File Naming Conventions145- **TypeScript**: `.ts` for logic, `.tsx` for React components146- **Tests**: `*.test.ts`, `*.test.tsx`, or `*.cy.ts`147- **Configuration**: `*.config.js` or `*.config.ts`148- **Webpack**: `webpack.*.js`149150## Development Constraints151152### Package Management Commands153- **Install**: `yarn install` (not npm)154- **Clean**: `yarn clean` (removes all build artifacts)155- **Build**: `yarn build` (runs lerna build across packages)156- **Test**: `yarn test` (unit + integration tests)157- **Lint**: `yarn lint` (ESLint checks)158- **Lint Fix**: `yarn lint:fix` (ESLint with auto-fix)159160### Prohibited Patterns161- **DO NOT** use npm commands (use yarn)162- **DO NOT** commit build artifacts (dist/, build/, coverage/)163- **DO NOT** use MUI without tree-shaking awareness (500KB+ impact)164- **DO NOT** disable TypeScript strict mode165- **DO NOT** skip pre-push hooks166167### Required Patterns168- **ALWAYS** run `yarn lint && yarn test` before pushing169- **ALWAYS** use `workspace:*` for internal dependencies170- **ALWAYS** enable source maps in development171- **ALWAYS** write tests for new features (unit + integration)172- **ALWAYS** use Prettier for code formatting173- **ALWAYS** maintain TypeScript strict mode compliance174175### Version Constraints176- **React**: ^19.0.0 (peer dependency)177- **MUI**: ^7.3.4 (critical for consistency)178- **Node**: >=18.0.0 (required)179- **TypeScript**: ^5.9.3 (latest stable)180181### Bundle Optimization Requirements182- **Critical**: Pay special attention to MUI imports (tree-shaking)183- **Webpack**: Use persistent caching for rebuilds184- **Threading**: Enable parallel builds with thread-loader185- **Analyze**: Use `webpack-bundle-analyzer` for optimization186187### Testing Requirements188- **Unit Tests**: Jest for logic/components189- **Integration Tests**: Cypress E2E tests190- **Visual Tests**: Cypress image snapshot regression191- **Coverage**: Maintain comprehensive test coverage192- **CI**: All tests must pass before merge193194## Reference Files195196### Core Configuration197- `package.json` - Root monorepo configuration198- `lerna.json` - Lerna monorepo settings199- `webpack.common.js` - Shared Webpack configuration200- `eslint.config.mjs` - ESLint flat config201- `.prettierrc.json` - Prettier formatting rules202203### Package Configuration204- `packages/editor/package.json` - React editor component205- `packages/mindplot/package.json` - Core mind map engine206- `packages/web2d/package.json` - SVG abstraction layer207- `packages/*/tsconfig.json` - Package-specific TypeScript config208- `packages/*/jest.config.js` - Package-specific Jest config209- `packages/*/cypress.config.*` - Package-specific Cypress config210211### Documentation212- `README.md` - Project overview213- `CONTRIBUTING.md` - Contribution guidelines214- `memory-bank/` - Comprehensive project documentation215 - `projectbrief.md` - Project overview and requirements216 - `activeContext.md` - Current development focus217 - `progress.md` - Implementation status218 - `systemPatterns.md` - Architectural patterns219 - `techContext.md` - Technology decisions220221### Development Scripts222- `.husky/pre-push` - Git pre-push hook223- `scripts/check-mui-imports.sh` - MUI import validation224225## Maintenance Notes226227### Performance Monitoring228- Webpack build times optimization with persistent caching229- Bundle size monitoring (especially MUI impact)230- Cypress test execution speed231- TypeScript compilation performance232233### Regular Updates234- Keep TypeScript at latest stable version235- Update MUI dependencies together (core + icons)236- Maintain React peer dependency compatibility237- Regular security updates for all dependencies238
Also in bashdeban/fastmind
Diff this repo’s formatsOne repository carrying more than one format is the comparison this product exists for: does anyone actually write different content in each file, or is one a copy of the other?
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| bashdeban/fastmind.cursorrules · 5 | .cursorrules | buildtestlint-formattypes+5 | 81/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| JCodesMore/ai-website-cloner-template.clinerules · 31k | Cline rules | buildlint-formatstylearch+3 | 97/100 | 2 days ago | |
| BryaanF/LiantPortfolio.clinerules/project-guidelines.md · 0 | Cline rules | buildstylearchgit+2 | 96/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/50-pubmed-project.md · 7 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| u9401066/zotero-keeper.clinerules/50-pubmed-project.md · 7 | Cline rules | testlint-formatstylearch+1 | 94/100 | 3 days ago | |
| VaillerTeeter/HoshimiNest.clinerules/project-identity.md · 1 | Cline rules | setuparchtypesdo-not | 93/100 | yesterday | |
| HerringtonDarkholme/megarepo.clinerules/02-development.md · 17 | Cline rules | setupbuildteststyle+3 | 92/100 | 3 days ago | |
| blendsdk/codeops-mcp.clinerules/project.md · 0 | Cline rules | buildteststylearch+7 | 91/100 | 3 days ago | |
| u9401066/zotero-keepervscode-extension/resources/repo-assets/pubmed-search-mcp/.clinerules/60-pubmed-python.md · 7 | Cline rules | setuptestlint-formatstyle+2 | 86/100 | 3 days ago |
