대시보드 조회 시퀀스 구조 개선

- inner/user-대시보드조회.puml 삭제 (outer와 중복)
- outer/대시보드조회.puml 수정
  - Meeting Service 호출 흐름 추가
  - MSA 아키텍처 제대로 반영
  - 서비스 간 통신 명확화
- inner/meeting-대시보드조회.puml 유지 (Meeting Service 비즈니스 로직)

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

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
Minseo-Jo 2025-10-23 10:25:47 +09:00
parent 535c1f1c04
commit 9794926651
2 changed files with 49 additions and 137 deletions

View File

@ -1,132 +0,0 @@
@startuml
!theme mono
title 대시보드 조회 내부 시퀀스 (AFR-USER-020)
participant "API Gateway<<E>>" as Gateway
participant "UserController" as Controller
participant "DashboardService" as Service
participant "MeetingClient" as MeetingClient
participant "TodoClient" as TodoClient
participant "UserRepository" as Repository
database "PostgreSQL<<E>>" as DB
database "Redis Cache<<E>>" as Cache
Gateway -> Controller: GET /api/dashboard?\npage=1&size=10&sort=createdAt,desc\nAuthorization: Bearer {token}
note right
페이지네이션 파라미터:
- page: 페이지 번호 (기본값: 1)
- size: 페이지 크기 (기본값: 10)
- sort: 정렬 기준 (기본값: createdAt,desc)
end note
activate Controller
Controller -> Service: getDashboard(userId, page, size, sort)
activate Service
Service -> Cache: get("dashboard:" + userId)
note right
캐시 조회:
- Key: dashboard:{userId}
- TTL: 5분
end note
alt 캐시 존재
Cache --> Service: cached dashboard data
Service --> Controller: DashboardResponse\n{meetings, todos, activities, stats, pagination}
deactivate Service
Controller --> Gateway: 200 OK\n{dashboard data + pagination}
deactivate Controller
else 캐시 미존재
Cache --> Service: null
par 병렬 데이터 조회
Service -> MeetingClient: getUpcomingMeetings(userId)
activate MeetingClient
note right
Meeting Service API:
GET /api/v1/meetings/upcoming
- userId
- limit: 5
end note
MeetingClient --> Service: upcoming meetings
deactivate MeetingClient
else
Service -> TodoClient: getPendingTodos(userId)
activate TodoClient
note right
Todo Service API:
GET /api/v1/todos/pending
- userId
- limit: 10
end note
TodoClient --> Service: pending todos
deactivate TodoClient
else
Service -> Repository: getRecentActivities(userId)
activate Repository
Repository -> DB: 최근 활동 내역 조회\n(사용자ID, 최신순 정렬, 10건)
DB --> Repository: activities
Repository --> Service: recent activities
deactivate Repository
else
Service -> Repository: getUserStatistics(userId)
activate Repository
Repository -> DB: 사용자 통계 조회\n(총 회의수, 총 할일수, 평균 회의시간)
DB --> Repository: statistics
Repository --> Service: user statistics
deactivate Repository
end
Service -> Service: aggregateDashboardData()
note right
대시보드 데이터 구성:
- 예정된 회의 목록
- 미완료 할일 목록
- 최근 활동 내역
- 통계 정보
end note
Service -> Service: enrichWithMetadata()
note right
메타데이터 추가:
- 회의 참석자 수
- 할일 우선순위
- 활동 타입별 아이콘
end note
Service -> Cache: set("dashboard:" + userId, dashboardData, 300)
note right
캐시 저장:
- TTL: 5분 (300초)
- 자동 만료
end note
Cache --> Service: cached
Service --> Controller: DashboardResponse\n{meetings, todos, activities, stats, pagination}
deactivate Service
Controller --> Gateway: 200 OK\n{dashboard data + pagination}
note right
응답 형식:
{
"upcomingMeetings": [...],
"activeTodos": [...],
"recentActivities": [...],
"statistics": {...},
"pagination": {
"page": 1,
"size": 10,
"totalElements": 45,
"totalPages": 5,
"hasNext": true
}
}
end note
deactivate Controller
end
@enduml

View File

@ -7,8 +7,10 @@ actor "사용자" as User
participant "Web App" as Frontend participant "Web App" as Frontend
participant "API Gateway" as Gateway participant "API Gateway" as Gateway
participant "User Service" as UserService participant "User Service" as UserService
participant "Meeting Service" as MeetingService
database "Redis Cache" as Cache database "Redis Cache" as Cache
database "User DB" as UserDB database "User DB" as UserDB
database "Meeting DB" as MeetingDB
note over Gateway note over Gateway
라우팅 규칙: 라우팅 규칙:
@ -44,10 +46,52 @@ deactivate Cache
alt Cache Hit alt Cache Hit
UserService -> UserService: 캐시 데이터 반환 UserService -> UserService: 캐시 데이터 반환
else Cache Miss else Cache Miss
UserService -> UserDB: 대시보드 데이터 조회\n- 예정된 회의 목록\n- 진행 중 Todo 목록\n- 최근 회의록 목록\n- 통계 정보 par 병렬 데이터 조회
' Meeting Service 호출
UserService -> MeetingService: GET /api/v1/dashboard
note right
Meeting Service에서 조회:
- 예정된 회의 목록
- 진행 중 Todo 목록
- 최근 회의록 목록
- 공유받은 회의록
- 통계 정보
end note
activate MeetingService
MeetingService -> Cache: GET dashboard:{userId}
activate Cache
Cache --> MeetingService: 캐시 조회 결과
deactivate Cache
alt Meeting Service 캐시 미존재
MeetingService -> MeetingDB: 회의/Todo/회의록 데이터 조회
activate MeetingDB
MeetingDB --> MeetingService: 조회 결과
deactivate MeetingDB
MeetingService -> Cache: SET dashboard:{userId}\n(TTL: 5분)
activate Cache
Cache --> MeetingService: 캐시 저장
deactivate Cache
end
MeetingService --> UserService: 회의 관련 데이터 응답\n{\n "upcomingMeetings": [...],\n "activeTodos": [...],\n "recentMinutes": [...],\n "sharedMinutes": [...],\n "statistics": {...}\n}
deactivate MeetingService
else
' User Service 자체 데이터 조회
UserService -> UserDB: 최근 활동 내역 조회
activate UserDB activate UserDB
UserDB --> UserService: 조회 결과 UserDB --> UserService: 활동 내역
deactivate UserDB deactivate UserDB
end
UserService -> UserService: 데이터 통합 및 조합
note right
대시보드 데이터 구성:
- Meeting Service 데이터
- User Service 활동 내역
- 통합 통계 정보
end note
UserService -> Cache: SET dashboard:{userId}\n(TTL: 5분) UserService -> Cache: SET dashboard:{userId}\n(TTL: 5분)
activate Cache activate Cache
@ -55,7 +99,7 @@ else Cache Miss
deactivate Cache deactivate Cache
end end
UserService --> Gateway: 대시보드 데이터 응답\n{\n "upcomingMeetings": [...],\n "activeTodos": [...],\n "recentMinutes": [...],\n "statistics": {...},\n "pagination": {\n "page": 1,\n "size": 10,\n "totalElements": 45,\n "totalPages": 5,\n "hasNext": true\n }\n} UserService --> Gateway: 대시보드 데이터 응답\n{\n "upcomingMeetings": [...],\n "activeTodos": [...],\n "recentMinutes": [...],\n "recentActivities": [...],\n "statistics": {...},\n "pagination": {\n "page": 1,\n "size": 10,\n "totalElements": 45,\n "totalPages": 5,\n "hasNext": true\n }\n}
deactivate UserService deactivate UserService
Gateway --> Frontend: 200 OK\n대시보드 데이터 + 페이지네이션 정보 Gateway --> Frontend: 200 OK\n대시보드 데이터 + 페이지네이션 정보