@startuml !theme mono title 대시보드 조회 내부 시퀀스 (AFR-USER-020) participant "API Gateway<>" as Gateway participant "UserController" as Controller participant "DashboardService" as Service participant "MeetingClient" as MeetingClient participant "TodoClient" as TodoClient participant "UserRepository" as Repository database "PostgreSQL<>" as DB database "Redis Cache<>" 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