@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/v1/dashboard\nAuthorization: Bearer {token} activate Controller Controller -> Service: getDashboard(userId) 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 deactivate Service Controller --> Gateway: 200 OK\n{dashboard data} 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: SELECT * FROM user_activities\nWHERE user_id = ?\nORDER BY created_at DESC\nLIMIT 10 DB --> Repository: activities Repository --> Service: recent activities deactivate Repository else Service -> Repository: getUserStatistics(userId) activate Repository Repository -> DB: SELECT\n COUNT(DISTINCT meeting_id) as total_meetings,\n COUNT(DISTINCT todo_id) as total_todos,\n AVG(meeting_duration) as avg_duration\nFROM user_statistics\nWHERE user_id = ? 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} deactivate Service Controller --> Gateway: 200 OK\n{dashboard data} deactivate Controller end @enduml