mirror of
https://github.com/hwanny1128/HGZero.git
synced 2025-12-06 12:36:23 +00:00
- 외부 시퀀스 설계 가이드 다운로드 (claude/sequence-outer-design.md) - 외부 시퀀스 설계 디렉토리 생성 (design/backend/sequence/) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
165 lines
5.2 KiB
Plaintext
165 lines
5.2 KiB
Plaintext
@startuml 01-사용자인증및대시보드조회
|
|
!theme mono
|
|
|
|
title 사용자 인증 및 대시보드 조회 (User Authentication and Dashboard)
|
|
|
|
actor "사용자" as User
|
|
participant "Web App" as WebApp
|
|
participant "API Gateway" as Gateway
|
|
participant "User Service" as UserService
|
|
participant "Meeting Service" as MeetingService
|
|
participant "Todo Service" as TodoService
|
|
participant "Redis\n(Cache)" as Redis
|
|
database "User DB\n(PostgreSQL)" as UserDB
|
|
database "Meeting DB\n(PostgreSQL)" as MeetingDB
|
|
database "Todo DB\n(PostgreSQL)" as TodoDB
|
|
|
|
== 1. 사용자 인증 (User Authentication) ==
|
|
|
|
User -> WebApp: 1.1. 로그인 시도\n(사번, 비밀번호 입력)
|
|
activate WebApp
|
|
|
|
WebApp -> Gateway: 1.2. POST /api/auth/login\n{employeeId, password}
|
|
activate Gateway
|
|
|
|
Gateway -> UserService: 1.3. 인증 요청\nPOST /auth/login
|
|
activate UserService
|
|
|
|
UserService -> UserService: 1.4. LDAP 연동 인증\n(사번, 비밀번호 검증)
|
|
note right
|
|
LDAP 서버와 통신하여
|
|
사용자 인증 처리
|
|
end note
|
|
|
|
alt 인증 성공
|
|
UserService -> UserDB: 1.5. 사용자 정보 조회\nSELECT * FROM users WHERE employee_id = ?
|
|
activate UserDB
|
|
UserDB --> UserService: 사용자 정보 반환
|
|
deactivate UserDB
|
|
|
|
UserService -> UserService: 1.6. JWT 토큰 생성\n(userId, 권한 정보 포함)
|
|
|
|
UserService -> Redis: 1.7. 사용자 프로필 캐싱\nSET user:profile:{userId}\n(TTL: 30분)
|
|
activate Redis
|
|
Redis --> UserService: 캐싱 완료
|
|
deactivate Redis
|
|
|
|
UserService --> Gateway: 1.8. 인증 성공 응답\n{token, userId, userName}
|
|
deactivate UserService
|
|
|
|
Gateway --> WebApp: 1.9. 로그인 성공\n{token, userId, userName}
|
|
deactivate Gateway
|
|
|
|
WebApp -> WebApp: 1.10. JWT 토큰 저장\n(LocalStorage)
|
|
|
|
WebApp --> User: 1.11. 로그인 성공 메시지
|
|
|
|
else 인증 실패
|
|
UserService --> Gateway: 인증 실패 (401 Unauthorized)
|
|
Gateway --> WebApp: 인증 실패
|
|
WebApp --> User: 로그인 실패 메시지
|
|
end
|
|
|
|
== 2. 대시보드 데이터 조회 (Dashboard Data Loading) ==
|
|
|
|
WebApp -> Gateway: 2.1. GET /api/dashboard\n(Authorization: Bearer {token})
|
|
activate Gateway
|
|
|
|
Gateway -> Gateway: 2.2. JWT 토큰 검증
|
|
note right
|
|
토큰 유효성 검증
|
|
사용자 권한 확인
|
|
end note
|
|
|
|
Gateway -> MeetingService: 2.3. 예정된 회의 조회\nGET /meetings/upcoming?userId={userId}
|
|
activate MeetingService
|
|
|
|
MeetingService -> Redis: 2.4. 캐시 확인\nGET meeting:upcoming:{userId}
|
|
activate Redis
|
|
Redis --> MeetingService: Cache Miss (캐시 없음)
|
|
deactivate Redis
|
|
|
|
MeetingService -> MeetingDB: 2.5. 예정된 회의 조회\nSELECT * FROM meetings\nWHERE user_id = ? AND status = 'SCHEDULED'\nORDER BY meeting_date LIMIT 5
|
|
activate MeetingDB
|
|
MeetingDB --> MeetingService: 예정된 회의 목록 (최대 5개)
|
|
deactivate MeetingDB
|
|
|
|
MeetingService -> Redis: 2.6. 조회 결과 캐싱\nSET meeting:upcoming:{userId}\n(TTL: 10분)
|
|
activate Redis
|
|
Redis --> MeetingService: 캐싱 완료
|
|
deactivate Redis
|
|
|
|
MeetingService --> Gateway: 2.7. 예정된 회의 목록 반환
|
|
deactivate MeetingService
|
|
|
|
|||
|
|
|
|
Gateway -> TodoService: 2.8. 진행 중 Todo 조회\nGET /todos/in-progress?userId={userId}
|
|
activate TodoService
|
|
|
|
TodoService -> Redis: 2.9. 캐시 확인\nGET todo:user:{userId}
|
|
activate Redis
|
|
Redis --> TodoService: Cache Hit (캐시 존재)
|
|
note right
|
|
Cache-Aside 패턴:
|
|
캐시에서 직접 반환하여
|
|
DB 부하 감소
|
|
end note
|
|
deactivate Redis
|
|
|
|
TodoService --> Gateway: 2.10. 진행 중 Todo 목록 반환\n(캐시에서 조회)
|
|
deactivate TodoService
|
|
|
|
|||
|
|
|
|
Gateway -> MeetingService: 2.11. 최근 회의록 조회\nGET /transcripts/recent?userId={userId}
|
|
activate MeetingService
|
|
|
|
MeetingService -> Redis: 2.12. 캐시 확인\nGET transcript:recent:{userId}
|
|
activate Redis
|
|
Redis --> MeetingService: Cache Miss
|
|
deactivate Redis
|
|
|
|
MeetingService -> MeetingDB: 2.13. 최근 회의록 조회\nSELECT * FROM transcripts\nWHERE user_id = ? OR shared_with LIKE '%{userId}%'\nORDER BY created_at DESC LIMIT 6
|
|
activate MeetingDB
|
|
MeetingDB --> MeetingService: 최근 회의록 목록\n(내 회의록 3개 + 공유받은 회의록 3개)
|
|
deactivate MeetingDB
|
|
|
|
MeetingService -> Redis: 2.14. 조회 결과 캐싱\nSET transcript:recent:{userId}\n(TTL: 10분)
|
|
activate Redis
|
|
Redis --> MeetingService: 캐싱 완료
|
|
deactivate Redis
|
|
|
|
MeetingService --> Gateway: 2.15. 최근 회의록 목록 반환
|
|
deactivate MeetingService
|
|
|
|
|||
|
|
|
|
Gateway -> TodoService: 2.16. Todo 통계 조회\nGET /todos/stats?userId={userId}
|
|
activate TodoService
|
|
|
|
TodoService -> Redis: 2.17. 캐시 확인\nGET todo:stats:{userId}
|
|
activate Redis
|
|
Redis --> TodoService: Cache Hit
|
|
deactivate Redis
|
|
|
|
TodoService --> Gateway: 2.18. Todo 통계 반환\n{total, inProgress, completionRate}
|
|
deactivate TodoService
|
|
|
|
|||
|
|
|
|
Gateway --> WebApp: 2.19. 대시보드 데이터 통합 응답\n{\n upcomingMeetings: [...],\n inProgressTodos: [...],\n recentTranscripts: [...],\n todoStats: {...}\n}
|
|
deactivate Gateway
|
|
|
|
WebApp -> WebApp: 2.20. 대시보드 UI 렌더링\n- 통계 카드 표시\n- 예정된 회의 목록\n- 진행 중 Todo 목록\n- 최근 회의록 목록
|
|
note right
|
|
반응형 레이아웃:
|
|
- 데스크톱: 좌측 사이드바
|
|
- 모바일: 하단 탭 바
|
|
end note
|
|
|
|
WebApp --> User: 2.21. 대시보드 화면 표시\n(맞춤형 정보 제공)
|
|
deactivate WebApp
|
|
|
|
@enduml
|