18 Commits

Author SHA1 Message Date
merrycoral
336d811f55 content-service 통합 테스트 완료 및 보고서 작성
- content-service HTTP 통신 테스트 완료 (9개 시나리오 성공)
- Job 관리 메커니즘 검증 (Redis 기반)
- EventId 기반 콘텐츠 조회 및 필터링 테스트
- 이미지 재생성 기능 검증
- Kafka 연동 현황 분석 (Consumer 미구현 확인)
- 통합 테스트 결과 보고서 작성
- 테스트 자동화 스크립트 추가

테스트 성공률: 100% (9/9)
응답 성능: < 150ms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-30 01:24:29 +09:00
wonho
3da9303091 백엔드 서비스 설정 및 배포 구성 개선
- CORS 설정 업데이트 (모든 서비스)
- Swagger UI 경로 및 설정 수정
- Kubernetes 배포 설정 개선 (Ingress, Deployment)
- distribution-service SecurityConfig 및 Controller 개선
- IntelliJ 실행 프로파일 업데이트
- 컨테이너 이미지 빌드 문서화 (deployment/container/build-image.md)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-29 15:55:30 +09:00
cherry2250
019ac96daa HuggingFace 제거 및 Replicate API 통합 완료
주요 변경사항:
- HuggingFace 관련 코드 및 의존성 완전 제거
  - HuggingFaceImageGenerator.java 삭제
  - HuggingFaceApiClient.java 삭제
  - HuggingFaceRequest.java 삭제
  - Resilience4j의 HuggingFace CircuitBreaker 제거

- Kubernetes 배포 설정
  - Deployment: content-service-deployment.yaml 업데이트
  - Service: content-service-service.yaml 추가
  - Health check 경로 수정 (/api/v1/content/actuator/health)
  - Dockerfile 추가 (멀티스테이지 빌드)

- Spring Boot 설정 최적화
  - application.yml: context-path 설정 (/api/v1/content)
  - HuggingFace 설정 제거, Replicate API 설정 유지
  - CORS 설정: kt-event-marketing* 도메인 허용

- Controller 경로 수정
  - ContentController: @RequestMapping 중복 제거
  - context-path와의 충돌 해결

- Security 설정
  - Chrome DevTools 경로 예외 처리 추가 (/.well-known/**)
  - CORS 설정 강화

- Swagger/OpenAPI 설정
  - VM Development Server URL 추가
  - 서버 URL 우선순위 조정

- 환경 변수 통일
  - REPLICATE_API_KEY → REPLICATE_API_TOKEN으로 변경

테스트 결과:
 Replicate API 정상 작동 (이미지 생성 성공)
 Azure Blob Storage 업로드 성공
 Redis 연결 정상 (마스터 노드 연결)
 Swagger UI 정상 작동
 모든 API 엔드포인트 정상 응답

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 23:08:54 +09:00
cherry2250
bc57b27852 라우팅 충돌 해결: imageId 경로 변수에 숫자 정규식 추가
- /images/{imageId}를 /images/{imageId:[0-9]+}로 변경
- /images/generate와의 라우팅 충돈 해결
- NumberFormatException 오류 수정
- content-service Kubernetes Deployment 파일 추가
2025-10-28 20:15:35 +09:00
cherry2250
b9514257b0 HuggingFaceImageGenerator를 프로파일 기반으로 변경하여 빈 충돌 해결
- @Profile("huggingface") 추가로 기본 프로파일에서는 비활성화
- StableDiffusionImageGenerator를 기본 구현체로 사용
- content-service 배포 오류 해결
2025-10-28 19:47:39 +09:00
cherry2250
9305dfdb7f application.yml 통합 및 Azure Blob Storage 설정 추가
- application-dev.yml, application-local.yml 삭제
- 단일 application.yml로 통합 (user-service 형식 참고)
- Azure Blob Storage connection string 기본값 추가
- Redis, Actuator, Logging 상세 설정 추가
- OpenAPI/Swagger 설정 추가
- CORS 설정 추가
- 모든 설정을 환경 변수로 관리 가능하도록 구성

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 16:19:51 +09:00
cherry2250
5a82fe3610 Mock 구현 제거 및 원격 서비스 연결 설정
- Mock 디렉토리 완전 제거 (biz/service/mock, infra/gateway/mock)
- @Profile 조건부 어노테이션 모두 제거
- Redis 원격 서버 연결 (20.214.210.71:6379)
- RegenerateImageService 실제 구현 추가
- ContentWriter.getImageById() 메서드 추가
- JWT Secret 보안 강화 (32자 이상)
- API 토큰 기본값 설정 추가
- AKS 배포 준비 완료

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 15:52:57 +09:00
cherry2250
5f8bd7cf68 VM 배포를 위한 Docker 컨테이너 설정 추가
- content-service/build.gradle: bootJar 파일명 설정 추가
- deployment/container/Dockerfile-backend: 백엔드 서비스 Docker 이미지 파일
- deployment/container/docker-compose.yml: Docker Compose 설정 (환경변수 포함)
- deployment/container/build-and-run.sh: 자동화 빌드 및 배포 스크립트
- deployment/container/build-image.md: 상세 배포 가이드 문서

주요 환경변수:
- JWT_SECRET: 32자 이상 JWT 서명 키 (JWT 오류 해결)
- REDIS/KAFKA: 외부 서버 연결 정보
- REPLICATE_API_TOKEN: Stable Diffusion API 토큰
- AZURE_STORAGE_CONNECTION_STRING: Azure Blob Storage 연결

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 17:00:20 +09:00
cherry2250
2da2f124a2 이미지 생성 프롬프트 개선: 음식 전문 사진 생성 및 텍스트 제외
- 음식 사진 전문성 강조 (professional food photography, appetizing food shot)
- 업종을 cuisine으로 변환하여 음식 이미지에 집중
- 스타일별 플레이팅 강조 (elegant plating, minimalist plating, trendy plating)
- negative prompt에 텍스트 관련 키워드 추가 (text, letters, words, typography, writing, numbers, characters, labels, watermark, logo, signage)
- 최종 프롬프트에 'no text overlay, text-free, clean image' 명시

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 16:11:31 +09:00
cherry2250
c82dbc6572 Content Service Kafka 의존성 제거
- build.gradle에서 spring-kafka 의존성 삭제
- application*.yml에서 Kafka 설정 제거
- content-service는 Redis에 데이터를 저장하는 역할만 수행
- 서비스 간 비동기 통신이 필요 없어 Kafka 불필요

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:50:19 +09:00
cherry2250
f7159465ac Content Service API 경로 표준화
- API 경로를 /content에서 /api/v1/content로 변경
- REST API 버저닝 패턴 적용 (/api/v1/서비스명)
- ContentController.java의 @RequestMapping 수정
- OpenAPI 명세서 경로 업데이트 (7개 엔드포인트)
- Javadoc 주석의 API 경로 정보 업데이트

영향 범위: content-service만 수정, common 모듈 변경 없음

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:16:54 +09:00
cherry2250
f838c689ed Content Service 기능 개발 완료
- Redis 연동 구현 (패스워드 인증 지원)
  - RedisConfig에 password 설정 추가
  - RedisGateway에 ContentReader/Writer 인터페이스 구현
  - application-dev.yml 프로파일 추가

- 이미지 삭제 기능 구현
  - DeleteImageUseCase 인터페이스 추가
  - DeleteImageService 구현
  - ContentWriter.deleteImageById() 메서드 추가
  - RedisGateway 및 MockRedisGateway 삭제 로직 구현

- 이미지 필터링 기능 추가
  - GetImageListUseCase에 style, platform 파라미터 추가
  - GetImageListService에 Stream filter 로직 구현
  - ContentController에서 String → Enum 변환 처리

- Mock 서비스 dev 프로파일 지원
  - MockGenerateImagesService dev 프로파일 추가
  - MockRegenerateImageService dev 프로파일 추가

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 09:45:21 +09:00
cherry2250
ff83dca1a1 Phase 3: content-service JPA 완전 제거 및 Redis 전용 전환
주요 변경사항:
- JPA Entity 3개 삭제 (JobEntity, GeneratedImageEntity, ContentEntity)
- JPA Repository 3개 삭제 (JobJpaRepository, GeneratedImageJpaRepository, ContentJpaRepository)
- JPA Gateway 2개 삭제 (JobGateway, ContentGateway)
- Port 인터페이스 정리: backward compatibility 메서드 제거
- Service 레이어 Redis DTO 전환 (JobManagementService, MockGenerateImagesService, MockRegenerateImageService)
- MockRedisGateway에 ContentReader/ContentWriter 구현 추가 및 Immutable 패턴 처리
- application.yml에서 JPA/H2 설정 제거
- build.gradle에서 JPA 의존성 exclude 처리
- ContentApplication에서 JPA 어노테이션 제거

서비스는 이제 순수 Redis 기반 스토리지로 동작합니다.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 10:46:33 +09:00
cherry2250
5e9e1759ce Content Service Phase 2: Port 인터페이스 구현 및 Gateway 통합
Phase 2 작업으로 Clean Architecture의 의존성 역전 원칙을 적용하여
Service 계층이 Port 인터페이스에만 의존하도록 구조를 개선했습니다.

주요 변경사항:
1. Redis DTO 생성 (Phase 1)
   - RedisAIEventData: AI 이벤트 데이터 DTO
   - RedisImageData: 이미지 데이터 DTO
   - RedisJobData: Job 데이터 DTO

2. Port 인터페이스 생성
   - ImageWriter: 이미지 저장 Port
   - ImageReader: 이미지 조회 Port
   - JobWriter: Job 저장 Port
   - JobReader: Job 조회 Port

3. Gateway 구현
   - RedisGateway: 4개 Port 인터페이스 구현 (Production용)
   - MockRedisGateway: 4개 Port 인터페이스 구현 (Local/Test용)
   - JobGateway: 2개 Port 인터페이스 구현 + @Primary 추가 (Phase 3 삭제 예정)

4. 하위 호환성 유지
   - Port 인터페이스에 레거시 메서드 추가 (save, findById)
   - Service 계층 코드 변경 없이 점진적 마이그레이션
   - "Phase 3에서 삭제 예정" 주석 표시

검증 완료:
- 컴파일 성공
- 서비스 정상 시작 (포트 8084)
- API 정상 작동 확인

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-24 10:14:54 +09:00
cherry2250
6dc6334c75 Content Service Redis 연동 및 테스트 완료
- RedisConfig.java: Production용 Redis 설정 추가
- RedisGateway.java: Redis 읽기/쓰기 Gateway 구현
- application-local.yml: Redis/Kafka auto-configuration 제외 설정
- test-backend.md: 7개 API 테스트 결과서 작성 (100% 성공)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 22:08:17 +09:00
cherry2250
06995864b9 Content Service API 테스트 구현 추가
- REST API Controller 구현 (이미지 생성, Job 조회, 콘텐츠 조회 등)
- Gateway 어댑터 구현 (ContentGateway, JobGateway)
- Mock Gateway 구현 (Redis, CDN, AI 이미지 생성기)
- Mock UseCase 구현 (실제 이미지 생성 시뮬레이션)
- Security 및 Swagger 설정 추가
- 로컬 테스트를 위한 H2 데이터베이스 설정 (application-local.yml)
- 비동기 처리를 위한 @EnableAsync 설정

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 21:30:21 +09:00
cherry2250
3d1dbda74b content-service 핵심 비즈니스 로직 및 영속성 계층 구현 완료
- Domain 모델 구현 (ImageStyle, Platform, GeneratedImage, Content, Job)
- JPA Entity 및 Repository 구현 (3개 엔티티, 3개 리포지토리)
- UseCase 인터페이스 정의 (Inbound 6개, Outbound 8개)
- Service 구현 (JobManagement, GetEventContent, GetImageList, GetImageDetail)
- DTO 구현 (ContentCommand, ContentInfo, ImageInfo, JobInfo)
- Application 설정 (ContentApplication, application.yml)
- 컴파일 오류 수정 및 검증 완료

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-23 20:48:56 +09:00
cherry2250
ea82ff4748 add common module 2025-10-23 17:54:36 +09:00