From 319834bae05973e1aae1198853eaebcd83bde451 Mon Sep 17 00:00:00 2001 From: Wesley Finck Date: Fri, 25 Jul 2025 14:29:24 -0700 Subject: [PATCH] docs: update GUIDE.md with detailed CQRS repository pattern explanation Co-authored-by: aider (anthropic/claude-sonnet-4-20250514) --- docs/features/GUIDE.md | 31 +++++++++++++++++++++++-------- 1 file changed, 23 insertions(+), 8 deletions(-) diff --git a/docs/features/GUIDE.md b/docs/features/GUIDE.md index 35777633..001eaf05 100644 --- a/docs/features/GUIDE.md +++ b/docs/features/GUIDE.md @@ -48,8 +48,10 @@ We implement CQRS to separate read and write operations: #### Repository Interfaces - **Location**: `src/modules/{module}/domain/` -- **Files**: `I{Entity}Repository.ts`, `I{Entity}QueryRepository.ts` -- **Example**: `ICardRepository.ts`, `ICardQueryRepository.ts` +- **Files**: + - `I{Entity}Repository.ts` - For command operations (write/modify state) + - `I{Entity}QueryRepository.ts` - For query operations (read-only, optimized for specific views) +- **Example**: `ICardRepository.ts`, `ICardQueryRepository.ts`, `ICollectionRepository.ts`, `ICollectionQueryRepository.ts` ### 2. Application Layer @@ -118,8 +120,11 @@ export class GetCollectionPageUseCase implements UseCase