Skip to content

v1.4.0 — Repository Pattern Refactoring

Choose a tag to compare

@Exzentttt Exzentttt released this 07 Mar 21:32
· 617 commits to main since this release

Repository Pattern Refactoring

What changed

  • 11 repository modules — all raw SQL extracted from route handlers into dedicated repositories/ package
  • 14 schema modules — Pydantic models extracted from monolithic schemas.py into domain-specific files
  • 14 thin route files — no more sqlalchemy.text imports in API layer
  • 38 unit tests updated — all passing with new architecture

Architecture

app/
├── api/v1/          # Thin route handlers (HTTP ↔ business logic)
├── repositories/    # SQL queries (11 repo modules)
├── schemas/         # Pydantic models (14 schema modules)
└── services/        # External integrations (GitHub, GitLab, OAuth)

Stats

  • -3,008 lines removed from route files
  • +1,500 lines in repositories/schemas
  • Net: ~1,500 lines less code in API layer