RuleStack

Configs

Stacks

Compare

Diff

RuleStack

Configs

Stacks

Compare

Diff

Read API

RuleStack

Configs

Stacks

Compare

Diff

Read API

Configs/Cursor rules/miguelslemos/stock_portfolio

Cursor rule

.cursor/rules/architecture.mdc

Clean Architecture patterns and layer separation

Cursor rules

Quality

48/100

Scores the file, not the repository.

Length

181 words

8 headings · 0 code blocks

Repository

40

— · pushed 120 days ago

Last changed

3 days ago

First indexed 3 days ago.
miguelslemos/stock_portfolio/.cursor/rules/architecture.mdcRawGitHub
1---
2description: Clean Architecture patterns and layer separation
3globs: web/src/**/*.ts
4alwaysApply: false
5---
6 
7# Architecture and Separation of Concerns
8 
9## Layers and Dependencies
10 
11Dependencies flow only inward (presentation → application → domain).
12 
13### 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.
18 
19### Application (src/application/)
20- Interfaces (contracts): `IOperationRepository`, `IDataExportService`
21- Use cases: `ProcessPortfolioUseCase`
22- Orchestrates the flow without containing business rules.
23 
24### Infrastructure (src/infrastructure/)
25- Concrete implementations of contracts: `PDFOperationRepository`, `JSONOperationRepository`
26- External services: `BCBExchangeRateService`, `CSVExportService`
27- Utilities: `DateParser`
28 
29### Presentation (src/presentation/)
30- UI controllers: `PortfolioApp`
31- HTML builders: `ModalBuilder`, `YearDetailsBuilder`
32- Formatters: `BRLFormatter`, `USDFormatter`
33 
34## Applied Patterns
35 
36- **Repository Pattern**: abstract data sources behind an interface
37- **Composite Pattern**: `CompositeOperationRepository` combines multiple sources
38- **Dependency Injection**: pass dependencies via constructor
39- **Use Case Pattern**: one class per use case
40- **Builder Pattern**: construct complex HTML elements
41 
42## When Creating New Code
43 
441. 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 

Sections

  • Architecture and Separation of Concerns
  • Layers and Dependencies
  • Domain (src/domain/)
  • Application (src/application/)
  • Infrastructure (src/infrastructure/)
  • Presentation (src/presentation/)
  • Applied Patterns
  • When Creating New Code

What it covers

code-styledependencies

Stack — with the evidence

typescript

(1.00)

vite

(1.00)

vitest

(1.00)

eslint

(1.00)

node

(0.70)

react

(0.70)

tailwind

(0.70)

javascript

(0.60)

github-actions

(0.60)

Glob targeting

  • web/src/**/*.ts

Format

Cursor rules

The most expressive format here. Many small .mdc files, each with frontmatter declaring when it should load, so a rule about migrations only enters context when a migration is open. Costs the most to maintain and only one editor reads it.

What the corpus says about it

Repository

Owner
miguelslemos
Language
—
License
—
Archived
no

All configs in this repo

Also in miguelslemos/stock_portfolio

Diff this repo’s formats

One 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?

The other instruction files in this repository
RepositoryFormatStackCoversScoreChanged
miguelslemos/stock_portfolio.cursor/rules/code-style.mdc · 40Cursor rulestypescriptvite+7lint-formatstyletypesdo-not+165/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/domain-logic.mdc · 40Cursor rulestypescriptvite+7do-not57/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/new-features.mdc · 40Cursor rulestypescriptvite+7styledo-not61/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/project-overview.mdc · 40Cursor rulestypescriptvite+7testlint-formatarchdo-not72/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/testing.mdc · 40Cursor rulestypescriptvite+7setupteststylearch+162/1003 days ago
miguelslemos/stock_portfolio.cursor/rules/ui-presentation.mdc · 40Cursor rulestypescriptvite+7ui50/1003 days ago
Diff against .cursor/rules/code-style.mdc Diff against .cursor/rules/domain-logic.mdc Diff against .cursor/rules/new-features.mdc Diff against .cursor/rules/project-overview.mdc Diff against .cursor/rules/testing.mdc Diff against .cursor/rules/ui-presentation.mdc

Similar configs

Same format, overlapping stack, ranked by quality.

Same format, overlapping stack, ranked by quality
RepositoryFormatStackCoversScoreChanged
hiromaily/go-crypto-wallet.cursor/rules/typescript.mdc · 126Cursor rulesgobun+5setupbuildtestlint-format+6100/1003 days ago
TechSquidTV/Hermes.cursor/rules/10-hermes-api.mdc · 45Cursor rulestypescriptpytest+15testlint-formatstylearch+5100/1003 days ago
markstev/mark-starter.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+14setuptestlint-formatstyle+699/1003 days ago
Allymahmoud/case-intake-platform.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+13setuptestlint-formatstyle+799/1003 days ago
dodgecfr/combatfilms-webapp.cursor/rules/frontend.mdc · 0Cursor rulestypescriptturborepo+15setuptestlint-formatstyle+799/1003 days ago
deifos/clipmira-subtitles.cursor/rules/frontend.mdc · 1Cursor rulestypescriptnextjs+5setuptestlint-formatstyle+799/1003 days ago
langflow-ai/langflow.cursor/rules/docs_development.mdc · 153kCursor rulespythonnode+16setupbuildtestlint-format+797/1003 days ago
TechSquidTV/Hermes.cursor/rules/20-hermes-api-tests.mdc · 45Cursor rulestypescriptpytest+15teststyletesting-strategysecurity+397/1003 days ago
RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack

RuleStack

Built by

Kynth Studio

Directory

Configs
Stacks
Compare formats
Diff two configs
Best AGENTS.md examples

Formats

AGENTS.md
CLAUDE.md
Cursor rules
Copilot instructions

Reference

Read API
Corpus health
Privacy Policy
Terms

RuleStack