-
Notifications
You must be signed in to change notification settings - Fork 3
refactor: extract data layer with repository pattern #24
Copy link
Copy link
Open
Labels
advancedComplex challenge (3-6 hours)Complex challenge (3-6 hours)refactoringCode quality improvementsCode quality improvements
Description
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 store
Expected Behavior
Data access should be abstracted behind a repository interface.
Acceptance Criteria
- Create IEventRepository interface
- Implement InMemoryEventRepository
- Update actions to use repository
- All tests pass
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
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
advancedComplex challenge (3-6 hours)Complex challenge (3-6 hours)refactoringCode quality improvementsCode quality improvements