Skip to content

Implement User Repository (CRUD) #11

@greatest0fallt1me

Description

@greatest0fallt1me

Description
Implement a user repository in src/repositories/userRepository.ts: create(user), findByStellarAddress(address), findById(id), update(id, data). Use the existing users table. Return plain objects or typed DTOs.

Requirements and context

  • Must use connection pool from config
  • No raw SQL in routes; all DB access in repository
  • Handle "not found" (return null or throw NotFoundError)

Suggested execution

  • Fork the repo and create a branch
  • git checkout -b feature/user-repository
  • Implement changes
    • Implement create, findByStellarAddress, findById, update
    • Add unit tests with in-memory or test DB
  • Test and commit
    • Run tests; verify against real DB in dev
    • Example commit message: feat: user repository CRUD

Guidelines

  • Minimum 95 percent test coverage
  • Clear documentation
  • Timeframe: 96 hours
  • Project details: #

Metadata

Metadata

Assignees

No one assigned

    Labels

    Stellar WaveIssues in the Stellar wave program

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions