242 Commits

Author SHA1 Message Date
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
16a91c85bf gradlew 실행 권한 추가 2025-10-28 10:46:47 +09:00
Cherry Kim
d56ff7684b
Merge pull request #13 from ktds-dg0501/feature/content
Feature/content
2025-10-28 09:41:26 +09:00
cherry2250
c152faff54 Claude 폴더 원복 2025-10-28 09:40:53 +09:00
cherry2250
ee664a6134 develop 브랜치 병합 (271 파일 업데이트) 2025-10-28 09:29:26 +09:00
Hyowon Yang
50043add5d analytics 서비스 동시성 충돌 해결
[문제]
- ParticipantRegistered 이벤트 처리 시 StaleObjectStateException 발생
- 100개의 이벤트가 동시에 발행되어 EventStats 동시 업데이트 충돌
- TransactionRequiredException 발생 (트랜잭션 컨텍스트 부재)

[해결]
1. 비관적 락(Pessimistic Lock) 적용
   - EventStatsRepository에 findByEventIdWithLock 메서드 추가
   - PESSIMISTIC_WRITE 락으로 읽는 순간부터 다른 트랜잭션 차단

2. 트랜잭션 추가
   - 모든 Consumer 메서드에 @Transactional 어노테이션 추가
   - EventCreatedConsumer, ParticipantRegisteredConsumer, DistributionCompletedConsumer

3. 이벤트 발행 속도 조절
   - SampleDataLoader에서 10개마다 100ms 대기
   - 동시성 충돌 빈도 감소

[수정 파일]
- EventStatsRepository.java: 비관적 락 메서드 추가
- ParticipantRegisteredConsumer.java: @Transactional 추가, 락 메서드 사용
- DistributionCompletedConsumer.java: @Transactional 추가, 락 메서드 사용
- EventCreatedConsumer.java: @Transactional 추가
- SampleDataLoader.java: 이벤트 발행 속도 조절

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-28 09:16:55 +09:00
Cherry Kim
397a23063d
Merge pull request #12 from ktds-dg0501/feature/content
Feature/content
2025-10-27 17:10:48 +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
SWPARK
bea547a463
Merge pull request #11 from ktds-dg0501/feature/ai
Feature/ai
2025-10-27 16:36:11 +09:00
SWPARK
c126c71e00
Merge branch 'develop' into feature/ai 2025-10-27 16:36:03 +09:00
박세원
29dddd89b7 AI 서비스 Kafka/Redis 통합 테스트 및 설정 개선
- Gradle 빌드 캐시 파일 제외 (.gitignore 업데이트)
- Kafka 통합 테스트 구현 (AIJobConsumerIntegrationTest)
- 단위 테스트 추가 (Controller, Service 레이어)
- IntelliJ 실행 프로파일 자동 생성 도구 추가
- Kafka 테스트 배치 스크립트 추가
- Redis 캐시 설정 개선

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 16:27:14 +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
hyeda2020
453f77ef01
Merge pull request #9 from ktds-dg0501/feature/user
UserPricipal 중복 필드 제거
2025-10-27 15:49:54 +09:00
wonho
375fcb390b UserPricipal 중복 필드 제거 2025-10-27 15:49:01 +09:00
hyeda2020
8323b795df
Merge pull request #8 from ktds-dg0501/feature/user
UserPricipal 충돌 부분 조치
2025-10-27 15:28:05 +09:00
hyeda2020
ce3e01008a
Merge branch 'develop' into feature/user 2025-10-27 15:27:57 +09:00
wonho
ea807cf33e UserPricipal 충돌 부분 조치 2025-10-27 15:19:35 +09:00
Hyowon Yang
394c7a0029
Merge pull request #7 from ktds-dg0501/feature/analytics
Feature/analytics
2025-10-27 15:10:51 +09:00
Hyowon Yang
9b247ca058
Merge branch 'develop' into feature/analytics 2025-10-27 15:10:31 +09:00
Hyowon Yang
25ff21f684 analytics-백엔드테스트완료 2025-10-27 15:04:03 +09:00
Hyowon Yang
180e5978a0 kafka 설정변경 2025-10-27 14:42:03 +09:00
Hayoung Song
42f0665f5e
Merge pull request #6 from ktds-dg0501/feature/event
feature/event
2025-10-27 13:43:44 +09:00
Hayoung Song
6728b98878
Merge branch 'develop' into feature/event 2025-10-27 13:43:15 +09:00
kkkd-max
6a31e5204b
Merge pull request #3 from ktds-dg0501/feature/participation
Participation Service 백엔드 개발 완료
2025-10-27 13:41:22 +09:00
kkkd-max
c249d94dd1
Merge branch 'develop' into feature/participation 2025-10-27 13:41:13 +09:00
doyeon
fdeba361b4 커ë°gitignore적용 2025-10-27 13:40:18 +09:00
merrycoral
918e71cc35 API 경로를 /api/v1 접두사로 변경
- EventController: /api/events -> /api/v1/events
- JobController: /api/jobs -> /api/v1/jobs
- 모든 API 엔드포인트 테스트 완료

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:38:08 +09:00
kkkd-max
1ad7655bb6
Update .gitignore
.gradle/ 추가
2025-10-27 13:34:25 +09:00
doyeon
12584a96c4 API 경로에 /api/v1 prefix 추가
- ParticipationController: @RequestMapping("/api/v1") 추가
- WinnerController: @RequestMapping("/api/v1") 추가
- 모든 API 경로가 /api/v1/* 형태로 변경됨

변경된 API 경로:
- POST /api/v1/events/{eventId}/participate
- GET /api/v1/events/{eventId}/participants
- GET /api/v1/events/{eventId}/participants/{participantId}
- POST /api/v1/events/{eventId}/draw-winners
- GET /api/v1/events/{eventId}/winners

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:26:05 +09:00
doyeon
ec0b892757 channel 필드 스키마 오류 수정
- DDL_AUTO를 none으로 변경하여 Hibernate 자동 스키마 변경 중지
- channel 필드를 nullable = true로 임시 변경
- 기존 데이터 마이그레이션 후 nullable = false로 변경 예정

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:22:25 +09:00
hyeda2020
446e4c613d
Merge pull request #4 from ktds-dg0501/feature/user
Feature/user
2025-10-27 13:15:57 +09:00
Cherry Kim
16b5a68ff7
Merge pull request #2 from ktds-dg0501/feature/content
Feature/content develop merge
2025-10-27 13:14:05 +09:00
doyeon
03bbe8b021 참여 채널(channel) 필드 추가
- Participant 엔티티에 channel 필드 추가 (기본값: SNS)
- ParticipationRequest/Response DTO에 channel 필드 추가
- ParticipantRegisteredEvent에 channel 필드 추가
- ParticipationService에서 channel 정보 전달
- 참여 경로 분석 및 마케팅 효과 측정 가능

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 13:05:42 +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
doyeon
f82e69ea0d Participation Service 테스트 수정 완료
- ParticipantId 생성 로직 수정 (prt_yyyyMMdd_xxx 형식)
- 보너스 응모권 계산 로직 수정 (매장 방문 시 5개)
- Mock 설정 추가 (ParticipationServiceUnitTest)
- Kafka 통합 테스트 Embedded Kafka로 전환 (일시적으로 비활성화)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:42:43 +09:00
Hyowon Yang
4197c72af5 Merge branch 'main' of https://github.com/ktds-dg0501/kt-event-marketing into feature/analytics 2025-10-27 11:25:08 +09:00
Hyowon Yang
97a3c41fff analytics 서비스 api개발 2025-10-27 11:23:56 +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
merrycoral
45f370a944 프로젝트 구성 개선 및 Kafka 인프라 추가
## 변경사항

### 보안 강화
- gradle.properties를 .gitignore에 추가 (로컬 환경 설정 제외)

### 공통 모듈
- ErrorCode에 Legacy 호환용 에러 코드 추가 (NOT_FOUND, INVALID_INPUT_VALUE)

### Event Service
- hibernate-types 라이브러리 제거 (Hibernate 6 네이티브 지원으로 대체)

### Kafka 인프라 추가
- Kafka 메시지 DTO 3개 추가
  * AIEventGenerationJobMessage: AI 이벤트 생성 작업 메시지
  * EventCreatedMessage: 이벤트 생성 완료 메시지
  * ImageGenerationJobMessage: 이미지 생성 작업 메시지
- Kafka Producer/Consumer 3개 추가
  * EventKafkaProducer: 이벤트 메시지 발행
  * AIJobKafkaConsumer: AI 작업 메시지 소비
  * ImageJobKafkaConsumer: 이미지 작업 메시지 소비

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:16:50 +09:00
doyeon
9039424c40 WinnerController Swagger 문서화 추가 및 이벤트/참여자 예외 처리 개선
- WinnerController에 Swagger 어노테이션 추가 (Operation, Parameter, ParameterObject)
- 당첨자 목록 조회 API 기본 정렬 설정 (winnerRank ASC, size=20)
- ParticipationService에서 이벤트/참여자 구분 로직 개선
  - 이벤트 없음: EventNotFoundException 발생
  - 참여자 없음: ParticipantNotFoundException 발생
- EventCacheService 제거 (Redis 기반 검증에서 DB 기반 검증으로 변경)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:15:04 +09:00
Hyowon Yang
a34037cdd1 TimelineData 샘플 데이터 생성 기능 추가
- 각 이벤트당 30일 치 daily 데이터 생성
- 참여자, 조회수, 참여행동, 전환수, 누적 참여자 수 포함
- 총 90건의 시간대별 데이터 생성 (3 이벤트 × 30일)
2025-10-27 11:14:54 +09:00
박세원
f0699b2e2b add ai-service 2025-10-27 11:09:12 +09:00
merrycoral
4d180c2a9f Event Service 개발 환경 구축 및 타입 시스템 개선
주요 변경사항:
- UserPrincipal 및 JWT 인증 시스템을 Long에서 UUID로 변경
- Event 엔티티 JPA 설정 최적화 (Lazy loading 및 fetch 전략 개선)
- 개발 환경용 DevAuthenticationFilter 추가 (User Service 구현 전까지 임시 사용)
- EventServiceApplication 문법 오류 수정
- Hibernate multiple bags 문제 해결 (List를 Set으로 변경)

기술 세부사항:
- common/UserPrincipal: Long → UUID 타입 변경, @Builder 어노테이션 추가
- common/JwtTokenProvider: UUID 지원 추가
- event-service/Event: Set 컬렉션 사용, Lazy loading 최적화
- event-service/EventService: Hibernate.initialize()로 컬렉션 초기화
- event-service/EventRepository: fetch join 쿼리 최적화
- event-service/SecurityConfig: DevAuthenticationFilter 통합

테스트 결과:
- 모든 Event CRUD API 정상 작동 확인
- PostgreSQL 연결 정상
- 비즈니스 로직 검증 정상 작동

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-27 11:04:03 +09:00
Hyowon Yang
884c964af6 Kafka Consumer 자동 시작 활성화 (autoStartup=true) 2025-10-27 10:59:31 +09:00
wonho
1168ba2d1d User Service api prefix 수정(api/v1/users/*) 2025-10-27 10:46:57 +09:00
Hyowon Yang
704a4ae4d1 Kafka 활성화 설정 추가 (KAFKA_ENABLED=true) 2025-10-27 10:43:51 +09:00