Skip to content

진짜 발표 1시간 남아서 개급하게 하는 PR #203

Merged
yyuneu merged 5 commits into
mainfrom
develop
Jun 4, 2026
Merged

진짜 발표 1시간 남아서 개급하게 하는 PR #203
yyuneu merged 5 commits into
mainfrom
develop

Conversation

@yyuneu

@yyuneu yyuneu commented Jun 4, 2026

Copy link
Copy Markdown
Member

제발 돌아가라 제발

Summary by CodeRabbit

릴리즈 노트

  • New Features
    • 마스콧 모델의 수동 업로드 기능이 추가되었습니다. 관리자는 이제 GLB 파일을 직접 업로드하여 기존 마스콧 모델을 교체할 수 있습니다. 업로드 프로세스 중 관련 애니메이션 데이터가 자동으로 병합되며, GLB 파일 형식에 대한 검증이 진행됩니다. 업로드 완료 후 업로드된 모델의 URL과 병합된 애니메이션 모델 URL이 응답으로 반환되어 마스콧 관리 워크플로우의 효율성이 크게 개선되었습니다.

@yyuneu yyuneu merged commit 74c1245 into main Jun 4, 2026
1 check passed
@coderabbitai

coderabbitai Bot commented Jun 4, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 5b500556-00d6-4265-9a7d-b857c14cddd8

📥 Commits

Reviewing files that changed from the base of the PR and between fc91775 and 0039f4a.

📒 Files selected for processing (9)
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/controller/MascotController.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/ModelUploadResponse.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimationMergeService.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationPersistService.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MeshProcessorClient.java
  • guideon-admin-bff/src/main/java/com/guideon/guideonbackend/global/storage/FileValidator.java
  • mesh-processor/src/convert.js
  • mesh-processor/src/index.js

Walkthrough

PR adds manual mascot GLB file upload endpoint with automatic animation merge support. Implements file validation, service layer logic, database persistence, and enhances the model/rig pipeline with GLB/FBX format detection. Adds mesh format conversion infrastructure to support post-processing of rigging results.

Changes

Manual Mascot Upload and Animation Merge Flow

Layer / File(s) Summary
Response Contract and API Endpoint
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/dto/ModelUploadResponse.java, guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/controller/MascotController.java
New ModelUploadResponse DTO carries uploaded modelUrl and optional merged animModelUrl. Controller exposes POST /api/v1/admin/sites/{siteId}/mascot/model endpoint that calls service and returns response with TraceId.
GLB File Validation
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/global/storage/FileValidator.java
FileValidator.isGlb(byte[]) validates GLB file format by checking magic bytes without throwing exceptions, enabling safe file type detection.
Manual Upload Service Implementation
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java
uploadMascotModel() validates GLB format, loads file bytes, saves to storage, persists to database, and triggers animation merge. Adds meshProcessorClient dependency to support FBX-to-GLB conversion in the pipeline.
Database Persistence for Manual Upload
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationPersistService.java
applyManualModelUpload() resets animation metadata and updates model_url in tb_mascot. saveCleanMeshUrl() persists clean mesh FBX URL. Both handle missing records gracefully.
Animation Merge for Manual Upload
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotAnimationMergeService.java
mergeForManualUpload() queries animation config, maps animation GLBs by clip name, merges with rigged model via meshProcessorClient.combine(), persists merged result, and returns URL or null on failure.
GLB/FBX Format Detection in Pipeline
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MascotGenerationService.java
Model stage detects pre-rig format: if GLB, save and call stripRigAsync; if FBX, save as clean mesh. Rigging stage: if GLB, save directly; if FBX, save original and convert via meshProcessorClient.convert() with error handling.
Mesh Conversion Service and Endpoint
guideon-admin-bff/src/main/java/com/guideon/guideonbackend/domain/mascot/service/MeshProcessorClient.java, mesh-processor/src/convert.js, mesh-processor/src/index.js
MeshProcessorClient.convert() sends request to /convert endpoint with error handling. convert.js exports function that executes assimp export with 60-second timeout. mesh-processor exposes POST /convert endpoint that validates paths and returns success/error response.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

  • Project-Guideon/guideon-backend#196: MascotAnimationMergeService 병합 결과를 통해 animModelUrl을 동일하게 갱신하며, 애니메이션 업로드 후 병합 트리거 로직에서 코드 레벨 겹침이 있습니다.
  • Project-Guideon/guideon-backend#189: 마스코트 애니메이션 파이프라인 변경에 함께 참여하며, MascotController 엔드포인트와 MascotGenerationPersistService 메서드 추가/제거가 겹칩니다.
  • Project-Guideon/guideon-backend#183: 동일한 animModelUrl/animClips 출력과 MascotGenerationPersistService 진입점을 업데이트하는 관계로 리타겟팅 완료 로직과 겹칩니다.

Poem

🐰 마스코트 모델을 업로드하니,
GLB 바이트 검사하고, 애니 병합까지!
Mesh 변환기도 새로 깔아,
파이프라인은 더 똑똑해졌네 ✨
수동 제어도, 자동 흐름도, 다 담았다!

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch develop

Warning

Tools execution failed with the following error:

Failed to run tools: 13 INTERNAL: Received RST_STREAM with code 2 (Internal server error)


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 Jun 10, 2026
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.

1 participant