Skip to content

[#454] Infra 레이어에서 Domain 레이어 의존성을 제거한다#469

Merged
opficdev merged 10 commits into
developfrom
fix/#454-Domain-Dependency
May 16, 2026
Merged

[#454] Infra 레이어에서 Domain 레이어 의존성을 제거한다#469
opficdev merged 10 commits into
developfrom
fix/#454-Domain-Dependency

Conversation

@opficdev
Copy link
Copy Markdown
Owner

@opficdev opficdev commented May 16, 2026

🔗 연관된 이슈

🎯 의도

Infra, Persistence, WidgetCore에서 Domain 레이어에 직접 의존하던 구조를 정리하고 레이어 간 참조 방향을 명확히 하기 위함

📝 작업 내용

📌 요약

  • 공통 계약 모델을 Core로 이동
  • Infra 레이어의 Domain 직접 의존성 제거
  • Data 레이어에서 DTO와 Domain 모델 간 매핑 책임 정리
  • Data / Domain 경계의 에러 매핑 구조 정리
  • DevLogInfra 프로젝트에서 불필요한 DevLogDomain 링크 제거

🔍 상세

  • TodoQuery, PushNotificationQuery, SystemTheme, TodayDisplayOptions를 Core 모델로 이동
  • Infra 서비스가 Domain 모델 대신 Core / Data 모델을 사용하도록 수정
  • TodoCategoryPreferenceResponse를 추가하여 TodoCategory 저장 응답을 Data 모델로 분리
  • Todo, PushNotification, WebPage, User, TodoCategory Repository에서 DTO와 Domain 변환 흐름 정리
  • Data 레이어 에러를 Domain 에러로 변환하는 toDomain() 매핑 추가
  • Auth 관련 Infra 에러를 Data 레이어 경계에서 처리하도록 정리
  • DevLogInfra.xcodeproj에서 DevLogDomain.framework link, target dependency, project reference 제거
  • Presentation / WidgetCore / Persistence에서 Core 모델 import 반영

📸 영상 / 이미지 (Optional)

@opficdev opficdev self-assigned this May 16, 2026
Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 DevLogDomain의 핵심 모델들을 DevLogCore로 이동하고 TodoQuery에서 도메인 의존성을 제거하는 등 전반적인 아키텍처를 개선하며, 저장소 계층에 일관된 에러 매핑을 적용합니다. 피드백으로는 mergedTodoCategoryPreferences 함수에서 배열의 contains 메서드를 반복 호출하는 대신 Set을 사용하여 성능을 O(N)으로 최적화할 것을 제안했습니다.

Comment thread Application/DevLogData/Sources/Mapper/TodoCategoryMapping.swift
@opficdev opficdev merged commit 0bbb195 into develop May 16, 2026
1 check passed
@opficdev opficdev deleted the fix/#454-Domain-Dependency branch May 16, 2026 16:01
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.

Infra 레이어에서 Domain 레이어 의존성을 제거한다

1 participant