repositories
CommunityClean data access with the Repository Pattern.
Software Engineering#clean architecture#data access#swift#dependency injection#repository pattern#domain model#dto
Authormoasq
Version1.0.0
Installs0
System Documentation
What problem does it solve?
This Skill addresses the challenge of tightly coupled data access logic within applications, making code harder to test, maintain, and scale. It enforces a clean separation between data sources and business logic.
Core Features & Use Cases
- Protocol-Based Data Access: Define data access contracts using Swift protocols, ensuring ViewModels depend on abstractions, not concrete implementations.
- DTO-to-Domain Mapping: Clearly separates database schema representations (DTOs) from your application's domain models, facilitating type safety and cleaner code.
- Layer Separation: Enforces a strict data flow (
Supabase API → DTO → Repository → Domain Model → ViewModel → View), promoting modularity and testability. - Use Case: When building a new feature that requires fetching user data, use this Skill to define a
UserRepositoryprotocol, implement it against a Supabase backend, and inject it into your ViewModel, ensuring your UI layer remains independent of the data source.
Quick Start
Implement the repository pattern for a new 'Product' entity by defining a ProductRepository protocol and a SupabaseProductRepository concrete implementation.
Dependency Matrix
Required Modules
None requiredComponents
references
💻 Claude Code Installation
Recommended: Let Claude install automatically. Simply copy and paste the text below to Claude Code.
Please help me install this Skill: Name: repositories Download link: https://github.com/moasq/nanowave/archive/main.zip#repositories Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
Agent Skills Search Helper
Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.