Skip to content

user model - #30

Closed
Bartavius wants to merge 2 commits into
mainfrom
auth-jwt-sessions
Closed

Bartavius wants to merge 2 commits into
mainfrom
auth-jwt-sessions

Conversation

@Bartavius

Copy link
Copy Markdown
Member

Issue

Closes #

Screen recording

Overview

How to test

Checklist

  • I have self-reviewed my code for readability, performance, and maintainability
  • I have commented difficult to understand areas
  • I have added thorough tests for my code
  • All New and existing tests pass

Bartavius and others added 2 commits September 14, 2026 01:59
internal/features/<name>/ held a model, repository, service, handler, and
routes per feature. Toggo — the reference this backend follows — instead
splits by layer, with one file per domain inside each. This moves boutline
to match.

  features/user/model.go        -> models/user.go
  features/user/repository.go   -> repository/user.go
  features/user/service.go      -> services/user.go
  features/health/handler.go    -> controllers/healthcheck.go
  features/health/routes.go     -> server/routers/health.go
  features/*/test/              -> tests/, with fakes in tests/mocks/

Adds repository.Repository, the aggregate holding one field per domain
repository. It is built once in server/app.go and carried down through
types.ServiceParams, which now exposes Repository rather than a raw *gorm.DB.

CreateUser takes models.CreateUserRequest instead of four loose strings,
matching how Toggo carries request types on the model.

No schema change: atlas migrate diff against the moved model produces no
drift, so the generated migration is untouched.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@Bartavius Bartavius closed this Sep 21, 2026
@Bartavius
Bartavius deleted the auth-jwt-sessions branch September 21, 2026 04:49
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.

1 participant