repository-pattern
Repository Pattern
Overview
This skill helps implement the repository pattern used in this workout tracker application. The pattern provides a clean abstraction over Dexie (IndexedDB) with type-safe interfaces, consistent error handling, and standardized CRUD operations.
Architecture Overview
Layered Approach:
Interfaces → Implementations → Provider → Public API
↓ ↓ ↓ ↓
db/interfaces db/impl/dexie db/provider db/index
Flow:
- Define repository interface in
db/interfaces.ts - Implement with Dexie in
db/implementations/dexie/[entity].ts - Register in factory provider (
db/implementations/dexie/index.ts)
More from alexanderop/workouttracker
vue-composables
Write high-quality Vue 3 composables following established patterns and best practices. Use when creating new composables, refactoring existing ones, or reviewing composable code. Triggers include requests to "create a composable", "write a use* function", "extract logic into a composable", or any Vue Composition API reusable logic task.
23product-planning
|
19vitest-mocking
|
15add-exercises
Add new exercises to the workout tracker database. Use when asked to add exercises, expand the exercise library, or check what exercises exist. Triggers include "add exercise", "new exercise", "exercise database", "what exercises", "missing exercises", "expand exercises".
12systematic-debugging
|
12improve-skill
Analyze coding agent session transcripts to improve existing skills or create new ones. Use when asked to improve a skill based on a session, or extract a new skill from session history.
11