Skip to content

feat: 작가 세부 정보 조회#163

Merged
millkk04 merged 1 commit into
devfrom
feat/162/author
Feb 11, 2026
Merged

feat: 작가 세부 정보 조회#163
millkk04 merged 1 commit into
devfrom
feat/162/author

Conversation

@millkk04
Copy link
Copy Markdown
Collaborator

@millkk04 millkk04 commented Feb 11, 2026

Summary by CodeRabbit

Release Notes

  • New Features
    • Added author detail API endpoint to retrieve comprehensive author information with enriched profiles.
    • Implemented GPT-powered author enrichment for enhanced biographies, profiles, and awards data.
    • Introduced automatic tag assignment for books using AI recommendations.
    • Integrated Wikidata enrichment for author profile images and biographical data.
    • Added Kakao Book API integration for author book imports.

@millkk04 millkk04 requested a review from icarus0616 February 11, 2026 02:41
@millkk04 millkk04 self-assigned this Feb 11, 2026
@millkk04 millkk04 added the enhancement New feature or request label Feb 11, 2026
@millkk04 millkk04 linked an issue Feb 11, 2026 that may be closed by this pull request
@millkk04 millkk04 merged commit 1b27911 into dev Feb 11, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Feb 11, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

This PR introduces comprehensive author detail enrichment and retrieval, adding Wikidata profile image extraction, GPT-based biography/profile/award generation, Kakao book import integration, book tag auto-assignment via GPT, and a REST endpoint returning enriched author information with book metadata and taste analysis.

Changes

Cohort / File(s) Summary
SQL Verification Scripts
booklog/check_author_data.sql, booklog/check_book_tags.sql
New diagnostic SQL scripts verifying author data state, books by author, author awards, tags, and book-tag relationships.
REST API & DTOs
booklog/src/main/java/com/example/booklog/domain/library/books/controller/AuthorController.java, booklog/src/main/java/com/example/booklog/domain/library/books/dto/AuthorDetailResponse.java
New REST controller (GET /api/v1/authors/{authorId}) and comprehensive response DTO with nested records for book summaries, taste info, profile, and awards.
Entity & Repository Updates
booklog/src/main/java/com/example/booklog/domain/library/books/entity/Authors.java, booklog/src/main/java/com/example/booklog/domain/library/books/repository/BooksRepository.java, booklog/src/main/java/com/example/booklog/domain/tags/repository/TagsRepository.java
Added profileJson field to Authors entity with updateProfileJson method; modified BooksRepository JOIN FETCH strategy and added findBooksWithoutTags method; added findByName method to TagsRepository.
Enrichment Services
booklog/src/main/java/com/example/booklog/domain/library/books/service/AuthorEnrichmentService.java, booklog/src/main/java/com/example/booklog/domain/library/books/service/AuthorGptEnrichmentService.java, booklog/src/main/java/com/example/booklog/domain/library/books/service/AuthorKakaoImportService.java, booklog/src/main/java/com/example/booklog/domain/library/books/service/BookEnrichmentService.java
Enhanced AuthorEnrichmentService with Wikidata/Wikipedia image extraction and REQUIRES_NEW transactional scope; new AuthorGptEnrichmentService for GPT-based author biography/profile/awards generation; new AuthorKakaoImportService for author book search; BookEnrichmentService logging enhancements.
Query Service
booklog/src/main/java/com/example/booklog/domain/library/books/service/AuthorQueryService.java, booklog/src/main/java/com/example/booklog/domain/library/books/service/AuthorQueryServiceImpl.java
New interface and implementation orchestrating multi-step author detail retrieval: fetch author, enrich (Wikidata/GPT/Kakao), load and sort books with taste enrichment, fetch awards, and convert to DTO.
Book Tag Auto-Assignment
booklog/src/main/java/com/example/booklog/domain/library/books/service/BookTagAutoAssignService.java
New service automating tag assignment for books via GPT-based recommendation, supporting per-book and batch assignment with proper error handling and transaction boundaries.

Sequence Diagram

sequenceDiagram
    participant Client
    participant AuthorController
    participant AuthorQueryServiceImpl
    participant AuthorEnrichmentService
    participant AuthorGptEnrichmentService
    participant AuthorKakaoImportService
    participant BookImportService
    participant Repository

    Client->>AuthorController: GET /api/v1/authors/{authorId}
    AuthorController->>AuthorQueryServiceImpl: getAuthorDetail(authorId, sortBy)
    
    AuthorQueryServiceImpl->>Repository: fetch Author by ID
    Repository-->>AuthorQueryServiceImpl: Author
    
    AuthorQueryServiceImpl->>AuthorQueryServiceImpl: check if enrichment needed
    
    alt Enrichment Needed
        AuthorQueryServiceImpl->>AuthorEnrichmentService: enrichAuthorByName(name)
        AuthorEnrichmentService->>AuthorEnrichmentService: search Wikidata QID
        AuthorEnrichmentService->>AuthorEnrichmentService: extract image from Wikidata JSON
        AuthorEnrichmentService->>AuthorEnrichmentService: fallback to Wikipedia image fetch
        AuthorEnrichmentService->>Repository: save enriched Author
        
        AuthorQueryServiceImpl->>AuthorKakaoImportService: searchAuthorBooks(name)
        AuthorKakaoImportService-->>AuthorQueryServiceImpl: KakaoBookSearchResponse
        
        AuthorQueryServiceImpl->>BookImportService: import and upsert books
        BookImportService->>Repository: save/update Books
        
        AuthorQueryServiceImpl->>AuthorGptEnrichmentService: enrichAuthorInfo(name)
        AuthorGptEnrichmentService->>AuthorGptEnrichmentService: build prompt & call GPT API
        AuthorGptEnrichmentService-->>AuthorQueryServiceImpl: AuthorEnrichmentResult
        
        AuthorQueryServiceImpl->>Repository: save enriched Author (biography, profileJson)
    end
    
    AuthorQueryServiceImpl->>Repository: fetch Author books (sorted)
    Repository-->>AuthorQueryServiceImpl: Books
    
    AuthorQueryServiceImpl->>AuthorQueryServiceImpl: enrich books with taste analysis
    
    AuthorQueryServiceImpl->>Repository: fetch Author awards
    Repository-->>AuthorQueryServiceImpl: Awards
    
    AuthorQueryServiceImpl->>AuthorQueryServiceImpl: convert to AuthorDetailResponse
    AuthorQueryServiceImpl-->>AuthorController: AuthorDetailResponse
    
    AuthorController-->>Client: ResponseEntity<AuthorDetailResponse>
Loading

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~60 minutes

Possibly related PRs

Suggested reviewers

  • jaehyeon4406
  • icarus0616

Poem

🐰 A rabbit hops through Wikidata's halls,
Gathering author profiles, images, and calls.
GPT weaves wisdom, Kakao brings books so bright,
While tags dance with taste—enrichment in flight! ✨

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch feat/162/author

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.

@coderabbitai coderabbitai Bot mentioned this pull request Feb 11, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 작가 상세 조회 API

1 participant