Cursor rule
.cursor/rules/architecture.mdcClean Architecture patterns and layer separation
Cursor rules
Quality
48/100
Scores the file, not the repository.Length
181 words
8 headings · 0 code blocksRepository
40
— · pushed 120 days agoLast changed
3 days ago
First indexed 3 days ago.1234567# Architecture and Separation of Concerns89## Layers and Dependencies1011Dependencies flow only inward (presentation → application → domain).1213### Domain (src/domain/)14- Value entities: `Money`, `StockQuantity`, `StockPosition`15- Operations: `VestingOperation`, `TradeOperation`16- Domain services: `PortfolioCalculationService`, `PortfolioAnalyticsService`17- Zero external dependencies. Pure, testable logic.1819### Application (src/application/)20- Interfaces (contracts): `IOperationRepository`, `IDataExportService`21- Use cases: `ProcessPortfolioUseCase`22- Orchestrates the flow without containing business rules.2324### Infrastructure (src/infrastructure/)25- Concrete implementations of contracts: `PDFOperationRepository`, `JSONOperationRepository`26- External services: `BCBExchangeRateService`, `CSVExportService`27- Utilities: `DateParser`2829### Presentation (src/presentation/)30- UI controllers: `PortfolioApp`31- HTML builders: `ModalBuilder`, `YearDetailsBuilder`32- Formatters: `BRLFormatter`, `USDFormatter`3334## Applied Patterns3536- **Repository Pattern**: abstract data sources behind an interface37- **Composite Pattern**: `CompositeOperationRepository` combines multiple sources38- **Dependency Injection**: pass dependencies via constructor39- **Use Case Pattern**: one class per use case40- **Builder Pattern**: construct complex HTML elements4142## When Creating New Code43441. Ask: "Is this business logic?" → `domain/`452. Ask: "Does this orchestrate a flow?" → `application/`463. Ask: "Does this communicate with something external?" → `infrastructure/`474. Ask: "Does this manipulate the UI?" → `presentation/`48
Also in miguelslemos/stock_portfolio
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 |
|---|---|---|---|---|---|
| miguelslemos/stock_portfolio.cursor/rules/code-style.mdc · 40 | Cursor rules | lint-formatstyletypesdo-not+1 | 65/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/domain-logic.mdc · 40 | Cursor rules | do-not | 57/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/new-features.mdc · 40 | Cursor rules | styledo-not | 61/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/project-overview.mdc · 40 | Cursor rules | testlint-formatarchdo-not | 72/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/testing.mdc · 40 | Cursor rules | setupteststylearch+1 | 62/100 | 3 days ago | |
| miguelslemos/stock_portfolio.cursor/rules/ui-presentation.mdc · 40 | Cursor rules | ui | 50/100 | 3 days ago |
Similar configs
Same format, overlapping stack, ranked by quality.
| Repository | Format | Stack | Covers | Score | Changed |
|---|---|---|---|---|---|
| hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126 | Cursor rules | setupbuildtestlint-format+6 | 100/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45 | Cursor rules | testlint-formatstylearch+5 | 100/100 | 3 days ago | |
| markstev/mark-starter.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+6 | 99/100 | 3 days ago | |
| Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1 | Cursor rules | setuptestlint-formatstyle+7 | 99/100 | 3 days ago | |
| langflow-ai/langflow.cursor/rules/docs_development.mdc · 153k | Cursor rules | setupbuildtestlint-format+7 | 97/100 | 3 days ago | |
| TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45 | Cursor rules | teststyletesting-strategysecurity+3 | 97/100 | 3 days ago |
