Skip to content

#64 [Feat] Home/MyPage/Search 탭 개선#65

Merged
Dante0922 merged 5 commits intodevfrom
feat/#64-home-mypage-search
Mar 28, 2026
Merged

#64 [Feat] Home/MyPage/Search 탭 개선#65
Dante0922 merged 5 commits intodevfrom
feat/#64-home-mypage-search

Conversation

@Dante0922
Copy link
Copy Markdown
Contributor

Summary

  • S3 Presigned URL 인프라 구축 및 홈 API 응답 구조를 섹션별 전용 DTO로 리팩토링
  • 철학자·캐릭터 enum에 이미지 매핑(imageKey, label) 추가 및 정규화
  • 마이페이지 철학자 유형 산출 로직 구현 (최초 5회 투표 → PHILOSOPHER 태그 기반 자동 산출·저장)
  • PhilosopherType 확장: typeName, description, bestMatch/worstMatch, 6축 고정 성향 점수
  • 탐색 탭 배틀 검색 API 신설 (GET /api/v1/search/battles) — 카테고리 필터, 인기순/최신순 정렬, offset 페이지네이션

Changes

  • 홈 API: HomeResponse를 6개 섹션별 DTO로 분리 (EditorPick, Trending, BestBattle, TodayQuiz, TodayVote, NewBattle)
  • S3: S3PresignedUrlService, S3Config 신설, FileUploadController presigned URL 응답 추가
  • Enum: PhilosopherType 10종 (label, typeName, description, bestMatch, worstMatch, 6축 점수, imageKey), CharacterType 8종 정규화
  • 마이페이지: UserProfile.philosopherType 필드 추가, MypageService.resolvePhilosopherType() 산출 로직
  • 서치: search 도메인 신설 (Controller, Service, DTO, Enum), BattleRepository 검색 쿼리 추가

Test plan

  • ./gradlew build 컴파일 확인 (contextLoads 제외 전 테스트 통과)
  • Swagger에서 홈 API 호출 → 섹션별 응답 확인
  • Swagger에서 마이페이지 API → 철학자 유형 산출 확인 (5회 투표 후)
  • Swagger에서 탐색 API → 카테고리 필터/정렬 확인

Closes #64

🤖 Generated with Claude Code

Dante0922 and others added 5 commits March 28, 2026 18:16
S3 버킷 프라이빗 전환에 따라 Presigned URL 기반 파일 접근 방식 도입
- S3Presigner Bean 등록 (S3Config)
- S3PresignedUrlService: presigned GET URL 생성 (기존 풀 URL 하위 호환)
- S3UploadServiceImpl: 업로드 후 S3 키만 반환하도록 변경
- FileUploadController: 응답에 s3Key + presignedUrl 포함
- application.yml: presigned URL 만료 시간 설정 추가 (6시간)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- 통합 HomeBattleResponse를 섹션별 전용 DTO로 분리
  (EditorPick, Trending, BestBattle, TodayQuiz, TodayVote, NewBattle)
- 퀴즈(O/X)와 투표(4지선다)를 별도 응답 타입으로 분리
- Best배틀/새로운배틀 철학자 이름을 태그(PHILOSOPHER)에서 추출
- 새로운배틀에 철학자 이미지 URL 추가
- TodayBattleResponse에 퀴즈·투표 전용 필드 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- PhilosopherType, CharacterType enum에 label(한글)과 imageKey(S3 경로) 추가
- JSON 직렬화를 enum name(대문자) 통일, 한글은 별도 label 필드로 전달
- CharacterTypeConverter를 enum name 기반으로 변경
- MypageResponse, RecapResponse에 이미지 presigned URL 및 label 필드 추가
- MypageService에 S3PresignedUrlService 연동
- FileCategory에 CHARACTER 카테고리 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- PhilosopherType에 typeName, description, bestMatch, worstMatch, 6축 고정 점수 추가
- UserProfile에 philosopherType 필드 추가 (nullable, @Enumerated STRING)
- 최초 5회 투표 기반 PHILOSOPHER 태그 최다 빈도로 철학자 유형 자동 산출 후 저장
- Recap 성향 점수를 UserTendencyScore 대신 PhilosopherType 고정값으로 변경
- bestMatch/worstMatch도 PhilosopherType에서 자동 결정

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- search 도메인 신설 (controller, service, dto, enum)
- GET /api/v1/search/battles 엔드포인트 추가
- 카테고리 태그 필터, 인기순/최신순 정렬, offset 페이지네이션 지원
- BattleRepository에 searchAll, searchByCategory 쿼리 추가

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Copy link
Copy Markdown
Member

@jucheonsu jucheonsu left a comment

Choose a reason for hiding this comment

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

고생하셨고 감사합니다! Merge 진행해주시면 감사드리겠습니다!

@Dante0922 Dante0922 merged commit b7f9fe7 into dev Mar 28, 2026
@Dante0922 Dante0922 deleted the feat/#64-home-mypage-search branch March 28, 2026 14:13
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.

✨ Feat: Home/MyPage/Search 탭 개선

2 participants