Problem Description
Data access logic is tightly coupled with business logic in the store.ts file.
Context
Repository pattern separates data access from business logic, making the codebase more maintainable.
Files to Investigate
src/lib/store.ts - Current implementation
src/actions/events.ts - Server actions using store
Expected Behavior
Data access should be abstracted behind a repository interface.
Acceptance Criteria
Suggested Approach
Define repository interface, extract current store logic into InMemoryEventRepository implementation.
Difficulty: Hard
Estimated time: 3-6 hours
Prerequisites: Design patterns, TypeScript interfaces
Learning outcomes: Repository pattern, clean architecture
Problem Description
Data access logic is tightly coupled with business logic in the store.ts file.
Context
Repository pattern separates data access from business logic, making the codebase more maintainable.
Files to Investigate
src/lib/store.ts- Current implementationsrc/actions/events.ts- Server actions using storeExpected Behavior
Data access should be abstracted behind a repository interface.
Acceptance Criteria
Suggested Approach
Define repository interface, extract current store logic into InMemoryEventRepository implementation.
Difficulty: Hard
Estimated time: 3-6 hours
Prerequisites: Design patterns, TypeScript interfaces
Learning outcomes: Repository pattern, clean architecture