backend-repository

Community

Standardize data access with safe repositories.

Authoralexei-lexx
Version1.0.0
Installs0

System Documentation

What problem does it solve?

Abstracts data storage behind a repository interface, decoupling business logic from database specifics and ensuring typed domain entities are returned.

Core Features & Use Cases

  • Interface-first design: define ports in backend/src/services/ports and implement them in backend/src/repositories
  • User-scoping and soft-delete: queries must filter by userId and archived records are excluded by default
  • Hydration and validation: read records through a Zod schema typed to the entity before returning
  • Error handling and portability: centralize errors at the repository boundary and write portable queries usable across SQL/NoSQL
  • Configuration via constructor: inject dependencies instead of reading environment variables inside the class

Quick Start

Create a backend repository for an entity by defining a ports interface, implementing it in a repository class, and wiring repository-level rules (user scoping, soft delete, hydration, and error handling) into the data layer.

Dependency Matrix

Required Modules

None required

Components

Standard package

💻 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: backend-repository
Download link: https://github.com/alexei-lexx/budget/archive/main.zip#backend-repository

Please download this .zip file, extract it, and install it in the .claude/skills/ directory.
View Source Repository

Agent Skills Search Helper

Install a tiny helper to your Agent, search and equip skill from 471,000+ vetted skills library on demand.