hgzero/design/backend/sequence/outer/Todo완료및회의록반영.puml
djeon e1d411e989 외부 시퀀스 설계 가이드 및 설계서 추가
- 외부 시퀀스 설계 가이드 다운로드 (claude/sequence-outer-design.md)
- 외부 시퀀스 설계 디렉토리 생성 (design/backend/sequence/)

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

Co-Authored-By: Claude <noreply@anthropic.com>
2025-10-22 13:23:50 +09:00

212 lines
5.1 KiB
Plaintext

@startuml Todo완료및회의록반영
!theme mono
title 외부 시퀀스 다이어그램: Todo 완료 및 회의록 반영\n(Flow 5: Todo Completion and Meeting Minutes Reflection)
' 참여자 정의
actor "사용자\n(Todo 담당자)" as User
participant "Frontend" as FE
participant "API Gateway" as GW
participant "Todo Service" as TodoSvc
participant "Meeting Service" as MeetingSvc
participant "Notification Service" as NotifySvc
database "Todo DB" as TodoDB
database "Meeting DB" as MeetingDB
queue "RabbitMQ" as MQ
database "Redis Cache" as Redis
== Todo 완료 요청 ==
User -> FE: Todo 완료 버튼 클릭
activate FE
FE -> FE: 완료 여부 확인 다이얼로그 표시
FE --> User: 확인 요청 표시
User -> FE: 완료 확인
FE -> GW: PUT /todos/{todoId}/complete
activate GW
note right: JWT 인증 및 권한 검증
GW -> TodoSvc: PUT /todos/{todoId}/complete
activate TodoSvc
== Todo 완료 처리 ==
TodoSvc -> TodoDB: Todo 상태 업데이트\n(상태=완료, 완료시간, 완료자 기록)
activate TodoDB
TodoDB --> TodoSvc: 업데이트 완료
deactivate TodoDB
note right of TodoSvc
완료 처리 정보:
- 완료 시간 자동 기록
- 완료자 정보 저장
- 완료 상태로 변경
end note
== 캐시 무효화 ==
TodoSvc -> Redis: DEL todo:user:{userId}
activate Redis
Redis --> TodoSvc: 캐시 삭제 완료
deactivate Redis
TodoSvc -> Redis: DEL todo:stats:{userId}
activate Redis
Redis --> TodoSvc: 캐시 삭제 완료
deactivate Redis
note right of Redis
캐시 무효화 대상:
- todo:user:{userId}
- todo:stats:{userId}
end note
== TodoCompleted 이벤트 발행 ==
TodoSvc -> MQ: publish TodoCompleted\n(todoId, meetingId, userId, completedAt)
activate MQ
note right of MQ
이벤트 내용:
- todoId: Todo ID
- meetingId: 관련 회의 ID
- userId: 완료자 ID
- completedAt: 완료 시간
- sectionId: 회의록 섹션 ID
end note
TodoSvc --> GW: 200 OK\n(완료 처리 결과 반환)
deactivate TodoSvc
GW --> FE: 200 OK
deactivate GW
FE -> FE: Todo 완료 상태 UI 업데이트
FE --> User: 완료 처리 완료 표시
deactivate FE
== Meeting Service: TodoCompleted 이벤트 구독 ==
MQ ->> MeetingSvc: TodoCompleted 이벤트 수신
activate MeetingSvc
note right of MeetingSvc
비동기 처리:
구독자가 이벤트 수신
end note
MeetingSvc -> Redis: GET meeting:info:{meetingId}
activate Redis
alt 캐시 Hit
Redis --> MeetingSvc: 회의 정보 반환
else 캐시 Miss
Redis --> MeetingSvc: null
MeetingSvc -> MeetingDB: SELECT 회의 정보
activate MeetingDB
MeetingDB --> MeetingSvc: 회의 정보 반환
deactivate MeetingDB
MeetingSvc -> Redis: SETEX meeting:info:{meetingId}\n(TTL: 10분)
Redis --> MeetingSvc: 캐시 저장 완료
end
deactivate Redis
note right of MeetingSvc
Cache-Aside 패턴 적용:
1. 캐시 조회 시도
2. 캐시 미스 시 DB 조회
3. 조회 결과 캐시 저장
end note
== 회의록에 완료 상태 자동 반영 ==
MeetingSvc -> MeetingDB: UPDATE 회의록 Todo 섹션\n(완료 상태, 완료 시간, 완료자)
activate MeetingDB
note right of MeetingDB
회의록 반영 내용:
- Todo 섹션에 완료 표시 (✅)
- 완료 시간 기록
- 완료자 정보 표시
- 양방향 연결 유지
end note
MeetingDB --> MeetingSvc: 업데이트 완료
deactivate MeetingDB
== 캐시 무효화 ==
MeetingSvc -> Redis: DEL meeting:info:{meetingId}
activate Redis
Redis --> MeetingSvc: 캐시 삭제 완료
deactivate Redis
note right of MeetingSvc
회의록 수정 시 캐시 무효화:
다음 조회 시 최신 정보 반영
end note
== TranscriptUpdated 이벤트 발행 (선택) ==
MeetingSvc -> MQ: publish TranscriptUpdated\n(meetingId, updateType=TODO_COMPLETED)
note right of MeetingSvc
선택적 이벤트:
실시간 협업 중인 경우
다른 참석자에게 알림 가능
end note
deactivate MeetingSvc
== Notification Service: TodoCompleted 이벤트 구독 ==
MQ ->> NotifySvc: TodoCompleted 이벤트 수신
activate NotifySvc
NotifySvc -> NotifySvc: 알림 내용 생성
note right of NotifySvc
알림 내용:
- Todo 완료 알림
- 회의록 작성자에게 발송
- 완료자 정보 포함
end note
NotifySvc -> NotifySvc: 회의록 알림 발송\n(이메일)
note right of NotifySvc
알림 발송 대상:
- 회의록 작성자
- 참석자 (선택)
end note
== 모든 Todo 완료 확인 ==
NotifySvc -> TodoDB: SELECT COUNT(*)\nWHERE meetingId={meetingId}\nAND status != COMPLETED
activate TodoDB
TodoDB --> NotifySvc: 미완료 Todo 개수 반환
deactivate TodoDB
alt 모든 Todo 완료
NotifySvc -> NotifySvc: 전체 완료 알림 생성
note right of NotifySvc
전체 완료 알림:
- "모든 Todo가 완료되었습니다"
- 회의록 작성자 및 참석자 전원 발송
end note
NotifySvc -> NotifySvc: 전체 완료 알림 발송\n(이메일)
end
deactivate NotifySvc
deactivate MQ
note over User, Redis
차별화 포인트:
- Todo 완료가 회의록에 실시간 반영되어 양방향 연동
- 회의 결과 추적 용이
- 완료 시간 및 완료자 정보 자동 기록
- 모든 Todo 완료 시 전체 완료 알림 자동 발송
end note
@enduml