-
Notifications
You must be signed in to change notification settings - Fork 0
feat: 서재 UI/UX 개편 (0) - 레이어 모듈 분리 #695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Walkthrough서재(라이브러리) 기능의 레이어 분리를 위해 새로운 data 및 feature 모듈( Changes
Sequence Diagram(s)sequenceDiagram
participant FeatureLibrary
participant LibraryRepository
participant LibraryRemoteDataSource
participant LibraryApi
FeatureLibrary->>LibraryRepository: fetchLibrary()
LibraryRepository->>LibraryRemoteDataSource: getUserLibrary(userId)
LibraryRemoteDataSource->>LibraryApi: getUserLibrary(userId)
LibraryApi-->>LibraryRemoteDataSource: UserLibraryResponseDto
LibraryRemoteDataSource-->>LibraryRepository: UserLibraryResponseDto
LibraryRepository-->>FeatureLibrary: (결과 반환)
Assessment against linked issues
Suggested labels
Suggested reviewers
Poem
Note ⚡️ AI Code Reviews for VS Code, Cursor, WindsurfCodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback. Note ⚡️ Faster reviews with cachingCodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure ✨ Finishing Touches
🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
yeonjeen
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
서재작업레츠고!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 4
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (17)
core/network/build.gradle.kts(1 hunks)core/network/src/main/java/com/into/websoso/core/network/datasource/library/DefaultLibraryDataSource.kt(1 hunks)core/network/src/main/java/com/into/websoso/core/network/datasource/library/LibraryApi.kt(1 hunks)core/network/src/main/java/com/into/websoso/core/network/datasource/library/model/response/NovelResponseDto.kt(1 hunks)core/network/src/main/java/com/into/websoso/core/network/datasource/library/model/response/UserLibraryResponseDto.kt(1 hunks)data/library/.gitignore(1 hunks)data/library/build.gradle.kts(1 hunks)data/library/proguard-rules.pro(1 hunks)data/library/src/main/AndroidManifest.xml(1 hunks)data/library/src/main/java/com/into/websoso/data/library/LibraryRepository.kt(1 hunks)data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryLocalDataSource.kt(1 hunks)data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryRemoteDataSource.kt(1 hunks)feature/library/.gitignore(1 hunks)feature/library/build.gradle.kts(1 hunks)feature/library/proguard-rules.pro(1 hunks)feature/library/src/main/AndroidManifest.xml(1 hunks)settings.gradle.kts(1 hunks)
🧰 Additional context used
🧬 Code Graph Analysis (3)
core/network/build.gradle.kts (1)
build-logic/src/main/kotlin/com/into/websoso/WebsosoDependenciesExtensions.kt (1)
implementation(70-76)
feature/library/build.gradle.kts (2)
build-logic/src/main/kotlin/com/into/websoso/ProjectExtensions.kt (1)
setNamespace(9-13)build-logic/src/main/kotlin/com/into/websoso/WebsosoDependenciesExtensions.kt (1)
implementation(70-76)
data/library/build.gradle.kts (1)
build-logic/src/main/kotlin/com/into/websoso/ProjectExtensions.kt (1)
setNamespace(9-13)
🪛 detekt (1.23.8)
data/library/src/main/java/com/into/websoso/data/library/LibraryRepository.kt
[warning] 13-14: This empty block of code can be removed.
(detekt.empty-blocks.EmptyFunctionBlock)
⏰ Context from checks skipped due to timeout of 90000ms (1)
- GitHub Check: build
🔇 Additional comments (15)
feature/library/.gitignore (1)
1-1:.gitignore파일 무시 패턴 적절
/build디렉토리를 무시하도록 설정한 것은 새 모듈의 빌드 아티팩트 관리에 부합합니다.data/library/.gitignore (1)
1-1:.gitignore파일 무시 패턴 적절
/build디렉토리를 무시하도록 설정한 것은 새 데이터 모듈의 빌드 아티팩트 관리에 부합합니다.data/library/src/main/AndroidManifest.xml (1)
1-4: AndroidManifest 내 네임스페이스 설정 확인 필요
현재 빈<manifest>로 추가되었습니다. 이 모듈의namespace(package)가build.gradle.kts의namespaceDSL 또는setNamespace로 제대로 지정되어 있는지 확인해주세요.feature/library/src/main/AndroidManifest.xml (1)
1-4: AndroidManifest 내 네임스페이스 설정 확인 필요
현재 빈<manifest>로 추가되었습니다. 이 모듈의namespace가build.gradle.kts의 설정(namespaceDSL 또는setNamespace)과 일치하는지 검증해주세요.core/network/build.gradle.kts (1)
32-32:data.library모듈 의존성 추가 승인
core/network모듈의 데이터 레이어 의존성 블록에projects.data.library가 적절히 추가되었습니다.feature/library/build.gradle.kts (1)
1-13: 모듈 설정이 잘 되어 있습니다!새로운
feature.library모듈이 프로젝트 컨벤션에 맞게 잘 설정되었습니다.websoso.android.feature플러그인 적용과 적절한 네임스페이스 설정, 그리고data.library모듈 의존성 추가까지 정확히 구현되었습니다.data/library/build.gradle.kts (1)
1-12: 데이터 모듈 설정이 적절합니다!
data.library모듈이 프로젝트 컨벤션에 맞게 잘 설정되었습니다.websoso.android.library플러그인 적용과 네임스페이스가 정확히 설정되었습니다. 현재는 의존성이 없지만, 필요에 따라 추후 추가할 수 있을 것입니다.settings.gradle.kts (1)
33-41: 새 모듈이 settings.gradle.kts에 정확히 추가되었습니다!
:feature:library와:data:library모듈이 각각 적절한 그룹에 추가되었습니다. 모듈 구조가 잘 정리되어 있습니다.data/library/proguard-rules.pro (1)
1-21: 기본 ProGuard 규칙 파일이 올바르게 추가되었습니다.새로운
data.library모듈에 대한 ProGuard 규칙 파일이 적절하게 포함되었습니다. 현재는 모든 규칙이 주석 처리되어 있으며, 필요에 따라 나중에 활성화할 수 있습니다.feature/library/proguard-rules.pro (1)
1-21: 기본 ProGuard 규칙 파일이 올바르게 추가되었습니다.새로운
feature.library모듈에 대한 ProGuard 규칙 파일이 적절하게 포함되었습니다. 현재는 모든 규칙이 주석 처리되어 있으며, 필요에 따라 나중에 활성화할 수 있습니다.core/network/src/main/java/com/into/websoso/core/network/datasource/library/model/response/NovelResponseDto.kt (1)
1-20: 깔끔한 DTO 구현입니다.Serializable 어노테이션과 SerialName을 적절하게 사용하여 JSON 응답을 매핑하는 DTO를 잘 구현하셨습니다. internal 가시성 제한자를 사용하여 모듈 내부에서만 접근 가능하도록 한 점도 좋습니다.
core/network/src/main/java/com/into/websoso/core/network/datasource/library/model/response/UserLibraryResponseDto.kt (1)
1-16: 적절한 응답 DTO 구조입니다.사용자 라이브러리 응답을 위한 DTO가 잘 설계되었습니다. NovelResponseDto의 리스트를 포함하고 있어 계층적 구조를 효과적으로 표현하고 있습니다. Serializable과 SerialName 어노테이션 사용이 적절합니다.
core/network/src/main/java/com/into/websoso/core/network/datasource/library/LibraryApi.kt (2)
13-18: Retrofit API 인터페이스가 잘 정의되었습니다.GET 요청과 Path 파라미터를 적절히 사용하여 사용자의 소설 라이브러리를 가져오는 API를 잘 정의하셨습니다. suspend 함수를 사용하여 코루틴과의 통합도 고려하셨네요.
20-26: Hilt DI 설정이 적절합니다.SingletonComponent를 사용하여 애플리케이션 전체에서 동일한 LibraryApi 인스턴스를 제공하도록 모듈을 잘 구성하셨습니다.
core/network/src/main/java/com/into/websoso/core/network/datasource/library/DefaultLibraryDataSource.kt (1)
21-27: 적절한 Hilt 바인딩 설정입니다.DefaultLibraryDataSource를 LibraryRemoteDataSource의 구현체로 바인딩하는 모듈이 잘 구성되었습니다. Singleton으로 제공되어 리소스를 효율적으로 관리할 수 있습니다.
| interface LibraryLocalDataSource { | ||
| suspend fun getFullLibrary() | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반환 타입을 명시해주세요!
getFullLibrary() 함수의 반환 타입이 명시되어 있지 않습니다. 현재 함수는 암시적으로 Unit 타입을 반환하게 됩니다. 로컬 데이터소스에서 가져오는 라이브러리 데이터를 적절히 표현하는 타입(예: 도메인 모델 리스트, 객체 등)을 반환 타입으로 명시해주세요.
예시:
interface LibraryLocalDataSource {
- suspend fun getFullLibrary()
+ suspend fun getFullLibrary(): List<LibraryBook> // 또는 다른 적절한 타입
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| interface LibraryLocalDataSource { | |
| suspend fun getFullLibrary() | |
| } | |
| interface LibraryLocalDataSource { | |
| suspend fun getFullLibrary(): List<LibraryBook> // 또는 다른 적절한 타입 | |
| } |
🤖 Prompt for AI Agents
In
data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryLocalDataSource.kt
at lines 3 to 5, the getFullLibrary() function lacks an explicit return type and
currently returns Unit implicitly. Update the function signature to specify the
appropriate return type that represents the library data fetched from the local
data source, such as a list of domain model objects or another relevant type, to
clearly define what the function returns.
| interface LibraryRemoteDataSource { | ||
| suspend fun getUserLibrary(userId: Long) | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
반환 타입을 명시해주세요.
getUserLibrary 메서드에 반환 타입이 명시되어 있지 않습니다. 인터페이스 구현체가 어떤 데이터를 반환해야 하는지 명확하게 알 수 있도록 적절한 반환 타입을 추가해주세요.
예시:
interface LibraryRemoteDataSource {
- suspend fun getUserLibrary(userId: Long)
+ suspend fun getUserLibrary(userId: Long): UserLibraryResponseDto // 또는 적절한 도메인 모델
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| interface LibraryRemoteDataSource { | |
| suspend fun getUserLibrary(userId: Long) | |
| } | |
| interface LibraryRemoteDataSource { | |
| suspend fun getUserLibrary(userId: Long): UserLibraryResponseDto // 또는 적절한 도메인 모델 | |
| } |
🤖 Prompt for AI Agents
In
data/library/src/main/java/com/into/websoso/data/library/datasource/LibraryRemoteDataSource.kt
at lines 3 to 5, the getUserLibrary function lacks a specified return type. To
clarify what data the interface implementation should return, add an appropriate
return type to the getUserLibrary method signature, such as a data model or a
collection representing the user's library.
| fun fetchLibrary() { | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
빈 함수에 구현이 필요합니다.
fetchLibrary() 함수가 비어 있습니다. 아직 구현 중인 경우 TODO 주석을 추가하고, 이 메서드가 어떤 매개변수와 반환 타입을 가져야 하는지 명시해주세요.
다음과 같이 수정해보세요:
- fun fetchLibrary() {
+ // TODO: 사용자 라이브러리 데이터 가져오기 구현
+ suspend fun fetchLibrary(userId: Long): UserLibraryModel {
+ // 원격 및 로컬 데이터 소스에서 데이터 가져오는 로직 구현
}📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fun fetchLibrary() { | |
| } | |
| // TODO: 사용자 라이브러리 데이터 가져오기 구현 | |
| suspend fun fetchLibrary(userId: Long): UserLibraryModel { | |
| // 원격 및 로컬 데이터 소스에서 데이터 가져오는 로직 구현 | |
| } |
🧰 Tools
🪛 detekt (1.23.8)
[warning] 13-14: This empty block of code can be removed.
(detekt.empty-blocks.EmptyFunctionBlock)
🤖 Prompt for AI Agents
In data/library/src/main/java/com/into/websoso/data/library/LibraryRepository.kt
at lines 13-14, the fetchLibrary() function is empty and lacks implementation.
Add a TODO comment inside the function to indicate it is under development, and
specify the expected parameters and return type in the function signature or as
comments to clarify its intended use.
| internal class DefaultLibraryDataSource | ||
| @Inject | ||
| constructor( | ||
| private val libraryApi: LibraryApi, | ||
| ) : LibraryRemoteDataSource { | ||
| override suspend fun getUserLibrary(userId: Long) { | ||
| TODO("Not yet implemented") | ||
| } | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
getUserLibrary 메서드 구현이 필요합니다.
LibraryRemoteDataSource 인터페이스를 구현하고 LibraryApi를 주입받는 구조는 좋습니다. 그러나 현재 getUserLibrary 메서드가 구현되지 않았습니다. 이 메서드에서는 API 호출 결과를 데이터 레이어에 맞게 변환하는 로직이 필요할 것입니다.
override suspend fun getUserLibrary(userId: Long) {
- TODO("Not yet implemented")
+ return libraryApi.getUserLibrary(userId)
}🤖 Prompt for AI Agents
In
core/network/src/main/java/com/into/websoso/core/network/datasource/library/DefaultLibraryDataSource.kt
around lines 11 to 19, the getUserLibrary method is currently unimplemented.
Implement this method by calling the appropriate function on the injected
libraryApi to fetch the user's library data, then transform the API response
into the format expected by the data layer before returning it. Ensure the
method handles any necessary suspending operations and exceptions properly.
📌𝘐𝘴𝘴𝘶𝘦𝘴
📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯
:feature:library모듈이 추가되었습니다.:data:library모듈이 추가되었습니다.:network:library패키지가 추가되었습니다.💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴
기존 코드는 아직 사용중이므로 제거하지 않았습니다.