Skip to content

Feature/developer repository#96

Open
Biokes wants to merge 2 commits intoCalloraOrg:mainfrom
Biokes:feature/developer-repository
Open

Feature/developer repository#96
Biokes wants to merge 2 commits intoCalloraOrg:mainfrom
Biokes:feature/developer-repository

Conversation

@Biokes
Copy link

@Biokes Biokes commented Feb 26, 2026

Closes #12


feat: Implement Developer Repository with CRUD Operations

Summary

Implements a complete developer repository with CRUD operations using TypeORM, supporting developer-to-user linking and API listing functionality.

Changes

Core Implementation

  • DeveloperRepository with full CRUD operations:
  • create(developer) - Create new developer
  • findByUserId(userId) - Find developer by user ID
  • findById(id) - Find developer by ID
  • update(id, data) - Update developer information
  • listApis(developerId) - List all APIs for a developer

Database Layer

  • TypeORM Entities:
  • Developer entity with OneToMany relationship to APIs
  • Api entity with ManyToOne relationship to Developer
  • Auto-generated UUIDs, timestamps (created_at, updated_at)

Error Handling

  • Custom Error Classes:
  • NotFoundError - Thrown when developer doesn't exist
  • DatabaseError - Thrown on database operation failures
  • Consistent error handling across all repository methods

Configuration

  • Database configuration with TypeORM DataSource
  • Environment variable support for database connection

Testing

  • 17 comprehensive unit tests covering:
  • All CRUD operations (success and failure cases)
  • Edge cases (not found, empty results, no changes)
  • Error handling scenarios
  • 100% test coverage:
  • 100% statements
  • 100% branches
  • 100% functions
  • 100% lines
Screenshot 2026-02-26 032601

@greatest0fallt1me
Copy link
Contributor

@Biokes Can you resolve the conflicts?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Implement Developer Repository (CRUD)

2 participants