graph TB %% KT AI 기반 소상공인 이벤트 자동 생성 서비스 - 논리 아키텍처 (Context Map) %% Client Layer subgraph "Client Layer" Mobile["Web/Mobile Client
• React PWA
• Mobile First
• 반응형 디자인"] end %% Gateway Layer subgraph "Gateway Layer" Gateway["API Gateway
• JWT 인증/인가
• 라우팅
• Rate Limiting
• 중앙 로깅"] end %% Service Layer subgraph "Service Layer" UserSvc["User Service
• 회원가입/로그인
• 프로필 관리
• 사업자번호 검증"] EventSvc["Event Service
• 이벤트 CRUD
• 플로우 오케스트레이션
• 상태 관리"] AISvc["AI Service
• 트렌드 분석
• 3가지 이벤트 추천
• 비동기 Job 처리"] ContentSvc["Content Service
• SNS 이미지 생성
• 3가지 스타일
• 비동기 Job 처리"] DistSvc["Distribution Service
• 다중 채널 배포
• Circuit Breaker
• 배포 모니터링"] PartSvc["Participation Service
• 이벤트 참여
• 참여자 관리
• 당첨자 추첨"] AnalSvc["Analytics Service
• 실시간 대시보드
• 채널별 성과
• ROI 분석"] end %% Data Layer subgraph "Data Layer" Cache["Redis Cache
• 세션 정보
• AI 추천 결과 (24h)
• 이미지 URL (7d)
• 대시보드 데이터 (5m)"] Queue["Message Queue
• AI 작업 큐
• 이미지 생성 큐
• 배포 작업 큐"] UserDB["User DB
• users
• stores"] EventDB["Event DB
• events
• distribution_logs"] PartDB["Participation DB
• participants
• winners"] AnalDB["Analytics DB
• event_stats
• channel_stats"] end %% External APIs subgraph "External APIs" TaxAPI["국세청 API
사업자번호 검증"] ClaudeAPI["Claude/GPT-4 API
AI 트렌드 분석
이벤트 추천"] SDAPI["Stable Diffusion
DALL-E API
이미지 생성"] UriAPI["우리동네TV API
영상 배포"] RingoAPI["링고비즈 API
연결음 업데이트"] GenieAPI["지니TV API
TV 광고"] SNSAPI["SNS APIs
Instagram
Naver
Kakao"] end %% Client to Gateway (단일 연결) Mobile -->|HTTPS| Gateway %% Gateway to Services (동기) Gateway -->|인증/프로필| UserSvc Gateway -->|이벤트 관리| EventSvc Gateway -->|참여자 관리| PartSvc Gateway -->|성과 분석| AnalSvc %% Event Service Dependencies EventSvc -.->|"[Event]AI 추천 요청
(Job 생성)"| Queue Queue -.->|비동기 작업 처리| AISvc EventSvc -.->|"[Event]이미지 생성 요청
(Job 생성)"| Queue Queue -.->|비동기 작업 처리| ContentSvc EventSvc -->|배포 시작| DistSvc %% AI Service Dependencies AISvc -.->|"AI 추천 캐싱
(Cache-Aside, 24h)"| Cache AISvc -->|"트렌드 분석
이벤트 추천
(Circuit Breaker)"| ClaudeAPI %% Content Service Dependencies ContentSvc -.->|"이미지 URL 캐싱
(Cache-Aside, 7d)"| Cache ContentSvc -->|"이미지 생성
(Circuit Breaker)"| SDAPI %% Distribution Service Dependencies DistSvc -->|"영상 배포
(Circuit Breaker)"| UriAPI DistSvc -->|"연결음 업데이트
(Circuit Breaker)"| RingoAPI DistSvc -->|"TV 광고
(Circuit Breaker)"| GenieAPI DistSvc -->|"SNS 자동 포스팅
(Circuit Breaker)"| SNSAPI %% User Service Dependencies UserSvc -.->|세션 관리| Cache UserSvc -.->|"사업자번호 캐싱
(Cache-Aside, 7d)"| Cache UserSvc -->|"사업자번호 검증
(Circuit Breaker)"| TaxAPI UserSvc -.->|사용자 정보| UserDB %% Event Service Database EventSvc -.->|이벤트 정보| EventDB %% Participation Service Dependencies PartSvc -.->|참여자 데이터| PartDB PartSvc -->|이벤트 정보 조회| EventSvc %% Analytics Service Dependencies AnalSvc -.->|"대시보드 캐싱
(Cache-Aside, 5m)"| Cache AnalSvc -.->|통계 데이터| AnalDB AnalSvc -->|이벤트 정보| EventSvc AnalSvc -->|참여자 데이터| PartSvc AnalSvc -->|배포 통계| DistSvc AnalSvc -->|"채널별 노출 수
(Circuit Breaker)"| UriAPI AnalSvc -->|"채널별 노출 수
(Circuit Breaker)"| GenieAPI AnalSvc -->|"SNS 통계
(Circuit Breaker)"| SNSAPI %% Styling classDef client fill:#BFDBFE,stroke:#3B82F6,stroke-width:2px classDef gateway fill:#2E86AB,stroke:#1E3A8A,stroke-width:2px,color:#fff classDef user fill:#4ECDC4,stroke:#14B8A6,stroke-width:2px classDef event fill:#F18F01,stroke:#F97316,stroke-width:2px classDef ai fill:#10B981,stroke:#059669,stroke-width:2px classDef content fill:#8B5CF6,stroke:#7C3AED,stroke-width:2px,color:#fff classDef dist fill:#EC4899,stroke:#DB2777,stroke-width:2px,color:#fff classDef part fill:#F59E0B,stroke:#F97316,stroke-width:2px classDef anal fill:#06B6D4,stroke:#0891B2,stroke-width:2px classDef cache fill:#FCD34D,stroke:#F59E0B,stroke-width:2px classDef queue fill:#FB923C,stroke:#EA580C,stroke-width:2px classDef db fill:#A78BFA,stroke:#8B5CF6,stroke-width:2px,color:#fff classDef external fill:#E5E7EB,stroke:#9CA3AF,stroke-width:2px class Mobile client class Gateway gateway class UserSvc user class EventSvc event class AISvc ai class ContentSvc content class DistSvc dist class PartSvc part class AnalSvc anal class Cache cache class Queue queue class UserDB,EventDB,PartDB,AnalDB db class TaxAPI,ClaudeAPI,SDAPI,UriAPI,RingoAPI,GenieAPI,SNSAPI external