hgzero/design/backend/logical/logical-architecture.mmd
2025-10-21 13:33:34 +09:00

120 lines
4.7 KiB
Plaintext

graph TB
%% 클라이언트 레이어
Client[Web/Mobile Application]
%% API Gateway
APIGateway[API Gateway Kong/Spring Cloud Gateway 라우팅, 인증, Rate Limiting]
%% 백엔드 서비스
UserService[User Service 사용자 인증 및 권한 관리]
MeetingService[Meeting Service 회의 관리, 회의록 관리]
STTService[STT Service 음성 녹음, STT 처리]
AIService[AI Service 회의록 자동 작성, Todo 추출]
RAGService[RAG Service 맥락 기반 용어 설명]
CollabService[Collaboration Service 실시간 동기화, 버전 관리]
TodoService[Todo Service Todo 관리, 진행 추적]
NotifyService[Notification Service 알림 발송, 리마인더]
%% 인프라 컴포넌트
Redis[(Redis 분산 캐시, 세션, 작업 상태)]
RabbitMQ[RabbitMQ 메시지 큐, 이벤트 버스]
%% 데이터베이스
UserDB[(PostgreSQL user_db)]
MeetingDB[(PostgreSQL meeting_db)]
STTDB[(PostgreSQL transcript_db)]
AIDB[(PostgreSQL ai_db)]
RAGDB[(PostgreSQL rag_db + Vector DB)]
CollabDB[(PostgreSQL collaboration_db)]
TodoDB[(PostgreSQL todo_db)]
NotifyDB[(PostgreSQL notification_db)]
%% 외부 시스템
LDAP[LDAP Server]
AzureStorage[Azure Storage 음성 파일]
AzureSpeech[Azure Speech API STT 엔진]
LLMAPI[LLM API OpenAI/Azure OpenAI]
SMTP[SMTP Server 이메일]
%% 클라이언트 → API Gateway
Client -->|HTTPS| APIGateway
%% API Gateway → 서비스 (라우팅)
APIGateway -->|/api/users/**| UserService
APIGateway -->|/api/meetings/**| MeetingService
APIGateway -->|/api/transcripts/**| STTService
APIGateway -->|/api/ai/**| AIService
APIGateway -->|/api/rag/**| RAGService
APIGateway -->|/api/collaboration/**| CollabService
APIGateway -->|/api/todos/**| TodoService
APIGateway -->|/api/notifications/**| NotifyService
%% 서비스 → Redis (캐시)
UserService -.->|Cache: 사용자 프로필| Redis
MeetingService -.->|Cache: 회의 정보| Redis
TodoService -.->|Cache: Todo 목록| Redis
AIService -.->|작업 상태 저장| Redis
%% 서비스 → 데이터베이스
UserService --> UserDB
MeetingService --> MeetingDB
STTService --> STTDB
AIService --> AIDB
RAGService --> RAGDB
CollabService --> CollabDB
TodoService --> TodoDB
NotifyService --> NotifyDB
%% 동기 통신 (REST API)
MeetingService -.->|Meeting 사용자 정보 조회 Cache 우선| UserService
TodoService -->|Todo 회의록 Todo 섹션 업데이트| MeetingService
AIService -->|AI 관련 문서 검색| RAGService
%% 비동기 통신 (Queue)
MeetingService -->|Meeting 회의록 생성 요청| RabbitMQ
RabbitMQ -->|transcript.creation.queue| STTService
STTService -->|STT 회의록 자동 작성 요청| RabbitMQ
RabbitMQ -->|ai.processing.queue| AIService
AIService -->|AI Todo 추출 요청| RabbitMQ
RabbitMQ -->|todo.extraction.queue| TodoService
MeetingService -->|Meeting 알림 발송| RabbitMQ
STTService -->|STT 알림 발송| RabbitMQ
TodoService -->|Todo 알림 발송| RabbitMQ
CollabService -->|Collab 알림 발송| RabbitMQ
RabbitMQ -->|notification.queue| NotifyService
%% 이벤트 기반 통신 (Pub-Sub)
MeetingService -->|MeetingCreated MeetingEnded| RabbitMQ
STTService -->|TranscriptCreated| RabbitMQ
TodoService -->|TodoCreated TodoCompleted| RabbitMQ
CollabService -->|SectionVerified| RabbitMQ
%% WebSocket (실시간 통신)
Client <-.->|WebSocket 실시간 회의록 동기화| CollabService
%% 외부 시스템 연동
UserService -->|인증| LDAP
STTService -->|음성 파일 저장| AzureStorage
STTService -->|STT 처리| AzureSpeech
AIService -->|회의록 자동 작성 Todo 추출| LLMAPI
RAGService -->|용어 설명 생성| LLMAPI
NotifyService -->|이메일 발송| SMTP
%% 스타일링
classDef clientStyle fill:#e1f5ff,stroke:#01579b,stroke-width:2px
classDef gatewayStyle fill:#fff3e0,stroke:#e65100,stroke-width:3px
classDef serviceStyle fill:#f3e5f5,stroke:#4a148c,stroke-width:2px
classDef infraStyle fill:#e8f5e9,stroke:#1b5e20,stroke-width:2px
classDef dbStyle fill:#fff9c4,stroke:#f57f17,stroke-width:2px
classDef externalStyle fill:#fce4ec,stroke:#880e4f,stroke-width:2px
class Client clientStyle
class APIGateway gatewayStyle
class UserService,MeetingService,STTService,AIService,RAGService,CollabService,TodoService,NotifyService serviceStyle
class Redis,RabbitMQ infraStyle
class UserDB,MeetingDB,STTDB,AIDB,RAGDB,CollabDB,TodoDB,NotifyDB dbStyle
class LDAP,AzureStorage,AzureSpeech,LLMAPI,SMTP externalStyle