Skip to content

Conversation

@s9hn
Copy link
Member

@s9hn s9hn commented May 19, 2025

📌𝘐𝘴𝘴𝘶𝘦𝘴

📎𝘞𝘰𝘳𝘬 𝘋𝘦𝘴𝘤𝘳𝘪𝘱𝘵𝘪𝘰𝘯

  • :feature:library 모듈이 추가되었습니다.
  • :data:library 모듈이 추가되었습니다.
  • :network:library 패키지가 추가되었습니다.

💬𝘛𝘰 𝘙𝘦𝘷𝘪𝘦𝘸𝘦𝘳𝘴

기존 코드는 아직 사용중이므로 제거하지 않았습니다.

@s9hn s9hn self-assigned this May 19, 2025
@s9hn s9hn added ⚖️ 재상 세훈 전지적 세훈 시점 🚧 [BUILD] 빌드 업무 수정, 패키지 매니저 수정합니다. labels May 19, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 19, 2025

Walkthrough

서재(라이브러리) 기능의 레이어 분리를 위해 새로운 data 및 feature 모듈(data.library, feature.library)이 생성되었습니다. 관련 의존성, 데이터소스 인터페이스, DTO, 레포지토리, Dagger Hilt 모듈 및 Gradle 설정이 추가되었으며, 기존 네트워크 모듈에 라이브러리 관련 API와 DI 구성이 도입되었습니다.

Changes

파일/경로 그룹 변경 요약
core/network/build.gradle.kts, settings.gradle.kts data.library, feature.library 모듈 추가 및 의존성 연결, Gradle 설정 확장
core/network/src/main/java/com/into/websoso/core/network/datasource/library/* LibraryApi, DefaultLibraryDataSource, Dagger Hilt 모듈 등 라이브러리 네트워크 데이터소스 및 API 정의
core/network/src/main/java/com/into/websoso/core/network/datasource/library/model/response/* NovelResponseDto, UserLibraryResponseDto DTO 클래스 추가
data/library/* (build.gradle.kts, proguard-rules.pro, AndroidManifest.xml, .gitignore) data.library 모듈 신규 생성, 빌드/ProGuard/매니페스트/ignore 파일 추가
data/library/src/main/java/com/into/websoso/data/library/* LibraryRepository 클래스 및 LibraryRemoteDataSource, LibraryLocalDataSource 인터페이스 추가
feature/library/* (build.gradle.kts, proguard-rules.pro, AndroidManifest.xml, .gitignore) feature.library 모듈 신규 생성, 빌드/ProGuard/매니페스트/ignore 파일 추가

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: (결과 반환)
Loading

Assessment against linked issues

Objective Addressed Explanation
서재 UI/UX 개편을 위한 레이어(모듈) 분리 (#693)

Suggested labels

♻️ [REFACTOR]

Suggested reviewers

  • junseo511
  • m6z1
  • yeonjeen

Poem

🐇
새로 만든 레이어, 깔끔한 분리
서재의 데이터, 이제는 걱정 없지!
모듈도 늘어나고, 코드도 반짝
토끼는 기뻐서 깡총깡총 뛰네
라이브러리의 미래, 더욱 기대해!
🐾

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit 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.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit 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 Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.

✨ Finishing Touches
  • 📝 Generate Docstrings

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need 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)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@github-actions github-actions bot requested review from junseo511, m6z1 and yeonjeen May 19, 2025 06:23
@s9hn s9hn changed the title Feat/693 feat: 서재 UI/UX 개편 (1) - 레이어 모듈 분리 May 19, 2025
Copy link
Member

@yeonjeen yeonjeen left a comment

Choose a reason for hiding this comment

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

서재작업레츠고!

Copy link

@coderabbitai coderabbitai bot left a 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

📥 Commits

Reviewing files that changed from the base of the PR and between b32c60a and ccb8a5e.

📒 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.ktsnamespace DSL 또는 setNamespace로 제대로 지정되어 있는지 확인해주세요.

feature/library/src/main/AndroidManifest.xml (1)

1-4: AndroidManifest 내 네임스페이스 설정 확인 필요
현재 빈 <manifest>로 추가되었습니다. 이 모듈의 namespacebuild.gradle.kts의 설정(namespace DSL 또는 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으로 제공되어 리소스를 효율적으로 관리할 수 있습니다.

Comment on lines +3 to +5
interface LibraryLocalDataSource {
suspend fun getFullLibrary()
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

반환 타입을 명시해주세요!

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.

Suggested change
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.

Comment on lines +3 to +5
interface LibraryRemoteDataSource {
suspend fun getUserLibrary(userId: Long)
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

반환 타입을 명시해주세요.

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.

Suggested change
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.

Comment on lines +13 to +14
fun fetchLibrary() {
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

빈 함수에 구현이 필요합니다.

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.

Suggested change
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.

Comment on lines +11 to +19
internal class DefaultLibraryDataSource
@Inject
constructor(
private val libraryApi: LibraryApi,
) : LibraryRemoteDataSource {
override suspend fun getUserLibrary(userId: Long) {
TODO("Not yet implemented")
}
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

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.

@s9hn s9hn merged commit fabb54f into develop May 19, 2025
2 of 3 checks passed
@s9hn s9hn changed the title feat: 서재 UI/UX 개편 (1) - 레이어 모듈 분리 feat: 서재 UI/UX 개편 (0) - 레이어 모듈 분리 May 22, 2025
@m6z1 m6z1 deleted the feat/693 branch August 11, 2025 15:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

⚖️ 재상 세훈 전지적 세훈 시점 🚧 [BUILD] 빌드 업무 수정, 패키지 매니저 수정합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat: 서재 UI/UX 개편 (0) - 레이어 모듈 분리

4 participants