Skip to content

[Feat/#73] 프로필 API 연동#77

Merged
jyvnee merged 7 commits intodevelopfrom
feat/#73-profile-api
Jan 21, 2026
Merged

[Feat/#73] 프로필 API 연동#77
jyvnee merged 7 commits intodevelopfrom
feat/#73-profile-api

Conversation

@sonyerim
Copy link
Copy Markdown
Contributor

@sonyerim sonyerim commented Jan 20, 2026

Related issue 🛠️

Work Description ✏️

  • 프로필 API 연동

Screenshot 📸

Uncompleted Tasks 😅

To Reviewers 📢

Summary by CodeRabbit

릴리스 노트

  • 새로운 기능

    • 사용자 프로필을 원격에서 동적으로 조회하여 화면에 표시하도록 변경
    • 프로필에 사용자 ID, 이메일, 닉네임, 프로필 이미지, 평점, 활동 메시지, 가입일, 즐겨찾기 여부 및 모집 요약 포함
  • 기타 변경사항

    • 프로필 로딩 흐름이 모의 데이터에서 실제 API 기반 호출로 전환되어 초기화 시 자동으로 조회됨

✏️ Tip: You can customize this high-level summary in your review settings.

@sonyerim sonyerim self-assigned this Jan 20, 2026
@sonyerim sonyerim added 🌟 Feat 새로운 기능 구현 💻 API 서버 통신 작업 💕 예림 labels Jan 20, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

Walkthrough

프로필 조회 API 연동이 추가되었습니다. 서버 응답 DTO(ProfileResponseDto)와 요약 DTO(RecruitSummaryDto 등)를 정의하고, UserService → UserRemoteDataSource → UserRepositoryImpl 흐름으로 가져와 ProfileMapper로 도메인 모델로 변환 후 ProfileViewModel이 SavedStateHandle의 userId로 호출해 상태를 갱신합니다.

Changes

코호트 / 파일(s) 변경 사항
DTOs
app/src/main/java/com/poti/android/data/remote/dto/response/user/ProfileResponseDto.kt, app/src/main/java/com/poti/android/data/remote/dto/response/user/ProfileSummaryDto.kt
ProfileResponseDto 추가; ParticipationSummaryDto·RecruitSummaryDtoProfileSummaryDto.kt로 분리해 추가(각 필드: total, inProgress, completed, @Serializable/@SerialName).
이전 중복 제거
app/src/main/java/com/poti/android/data/remote/dto/response/user/MyPageResponseDto.kt
파일 내에 있던 ParticipationSummaryDto·RecruitSummaryDto 정의 제거(중복 해소).
매퍼
app/src/main/java/com/poti/android/data/mapper/ProfileMapper.kt
ProfileResponseDto.toDomain(): UserProfile, RecruitSummaryDto.toDomain(): HistorySummary 확장 함수 추가.
원격 서비스
app/src/main/java/com/poti/android/data/remote/service/UserService.kt
@GET("/api/v1/users/{userId}/profile") suspend fun getUserProfile(userId: Long): BaseResponse<ProfileResponseDto> 추가.
원격 데이터소스
app/src/main/java/com/poti/android/data/remote/datasource/UserRemoteDataSource.kt
suspend fun getUserProfile(userId: Long): BaseResponse<ProfileResponseDto> 래퍼 메서드 추가.
리포지토리
app/src/main/java/com/poti/android/domain/repository/UserRepository.kt, app/src/main/java/com/poti/android/data/repository/UserRepositoryImpl.kt
suspend fun getUserProfile(userId: Long): Result<UserProfile> 시그니처 추가 및 구현: 안전한 API 호출 → DTO 언래핑 → toDomain() 매핑 반환.
프레젠테이션
app/src/main/java/com/poti/android/presentation/user/profile/ProfileViewModel.kt
생성자에 UserRepository, SavedStateHandle 주입; userId 추출; init { loadUserProfile() }로 리포지토리 호출하여 ApiState를 성공/실패로 갱신하도록 변경.

Sequence Diagram

sequenceDiagram
    participant VM as ProfileViewModel
    participant Repo as UserRepository
    participant Remote as UserRemoteDataSource
    participant Service as UserService
    participant Mapper as ProfileMapper

    VM->>VM: init { loadUserProfile() }
    VM->>Repo: getUserProfile(userId)
    Repo->>Remote: getUserProfile(userId)
    Remote->>Service: getUserProfile(userId)
    Service-->>Remote: BaseResponse<ProfileResponseDto>
    Remote-->>Repo: BaseResponse<ProfileResponseDto>
    Repo->>Mapper: profileResponseDto.toDomain()
    Mapper-->>Repo: UserProfile
    Repo-->>VM: Result<UserProfile>
    VM->>VM: updateState(ApiState.Success / ApiState.Failure)
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

  • [Feat/#23] 프로필 화면 UI 구현 #24: ProfileViewModel 및 UserProfile/HistorySummary 관련 변경과 연관 — UI 데이터 흐름을 DTO/매퍼/리포지토리로 연결하는 작업과 코드 수준으로 관련.

Suggested reviewers

  • doyeon0307
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 프로필 API 연동이라는 주요 변경사항을 명확하게 요약하고 있습니다.
Description check ✅ Passed PR 설명이 필수 템플릿 항목들을 대부분 포함하고 있으나 작업 내용이 최소한으로만 기술되어 있습니다.
Linked Issues check ✅ Passed PR의 모든 코드 변경사항이 #73 이슈의 프로필 API 연동 요구사항을 충족하고 있습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 프로필 API 연동이라는 범위 내에 있으며, 관련 없는 변경사항이 없습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown
Contributor

@doyeon0307 doyeon0307 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
Copy Markdown
Contributor

@cmj7271 cmj7271 left a comment

Choose a reason for hiding this comment

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

수고했으어요요

# Conflicts:
#	app/src/main/java/com/poti/android/data/remote/datasource/UserRemoteDataSource.kt
#	app/src/main/java/com/poti/android/data/remote/service/UserService.kt
#	app/src/main/java/com/poti/android/data/repository/UserRepositoryImpl.kt
#	app/src/main/java/com/poti/android/domain/repository/UserRepository.kt
@jyvnee jyvnee merged commit 663b80e into develop Jan 21, 2026
2 checks passed
@jyvnee jyvnee deleted the feat/#73-profile-api branch January 21, 2026 15:06
@github-project-automation github-project-automation bot moved this from To-do to Done in POTI-ANDROID Jan 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🌟 Feat 새로운 기능 구현 💕 예림 💻 API 서버 통신 작업

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Feat] 프로필 API 연동

4 participants