Skip to content

[Refactor] Auth 서비스 — Aggregate별 Vertical Slice 구조 리팩토링 #24

@fray-cloud

Description

@fray-cloud

배경

Auth 서비스의 Domain/Infrastructure는 이미 Aggregate별로 분리되어 있으나, Interface(router.py 479줄)와 Application(command_handlers.py 388줄)이 모노리식입니다.

목표

IPAM과 동일한 Aggregate별 독립 폴더 + 내부 CQRS 레이어 구조로 리팩토링

목표 구조

services/auth/src/auth/
├─ main.py
├─ routers.py
├─ user/
│   ├─ domain/
│   ├─ command/
│   ├─ query/
│   ├─ router/
│   └─ infra/
├─ role/
├─ group/
├─ api_token/
└─ shared/      # security, auth_router, dependencies, config, models

작업 체크리스트

  • 4개 Aggregate 폴더 + shared 폴더 생성
  • Domain 파일 이동
  • Application (Command/Query) 분리 이동
  • Infrastructure 이동
  • router.py (479줄) → 4개 router + shared/auth_router 분리
  • main.py + routers.py 재구성
  • 기존 디렉토리 삭제
  • 테스트 검증

Metadata

Metadata

Assignees

No one assigned

    Labels

    authAuth Service

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions