-
Notifications
You must be signed in to change notification settings - Fork 0
2차 스프린트 prod 업데이트 #122
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2차 스프린트 prod 업데이트 #122
Conversation
FEAT: 구글 소셜 로그인 구현
FEAT: 구글 소셜 로그인 api path 변경
FEAT: 온보딩 api 구현
FEAT: 북마크 리마인드 아티클 읽음 상태 분리
FEAT: 내 프로필 조회 기능 구현
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces Google OAuth authentication, user profile management with image storage, and enhanced article reminder endpoints. Changes span CI/CD workflows, Docker configuration, domain entities (User, Article), multiple service layers (Google OAuth client, S3 storage), and new API controllers with corresponding DTOs. Changes
Sequence Diagram(s)sequenceDiagram
participant Client as Client
participant Controller as GoogleLonginController
participant GoogleUsecase as GoogleUsecase
participant OAuthClient as GoogleOAuthClient
participant GoogleAPI as Google OAuth API
participant AuthUsecase as AuthUsecase
participant UserService as UserService<br/>(Save & Update)
participant S3 as S3 Storage
participant DB as Database
rect rgb(220, 240, 255)
Note over Client,DB: Google Login Flow
Client->>Controller: POST /api/v2/auth/google<br/>{code}
Controller->>GoogleUsecase: getUserInfo(command)
GoogleUsecase->>OAuthClient: fetchUserInfo(code)
OAuthClient->>GoogleAPI: requestAccessToken(code)
GoogleAPI-->>OAuthClient: {access_token, expires_in}
OAuthClient->>GoogleAPI: GET /userinfo<br/>(Bearer token)
GoogleAPI-->>OAuthClient: {email, picture, name, ...}
OAuthClient->>OAuthClient: validateEmail,<br/>validateName,<br/>validatePicture
OAuthClient-->>GoogleUsecase: Mono<GoogleUserInfoResponse>
GoogleUsecase-->>Controller: Mono<GoogleUserInfoResponse>
Controller->>AuthUsecase: getInfoAndToken(email,<br/>pictureUrl, name)
rect rgb(240, 255, 240)
Note over AuthUsecase,DB: User Lookup & Creation
AuthUsecase->>UserService: findUserByEmail(email)
alt User Found
UserService->>DB: SELECT user WHERE email
DB-->>UserService: Existing User
UserService-->>AuthUsecase: Mono<User>
AuthUsecase->>AuthUsecase: applyMissingUserInfo
else User Not Found
UserService-->>AuthUsecase: empty Mono
AuthUsecase->>UserService: saveUser(tempUser)
UserService->>DB: INSERT new User
DB-->>UserService: User saved
UserService-->>AuthUsecase: Mono<User>
end
end
AuthUsecase->>UserService: saveProfileImage(userId,<br/>pictureUrl)
UserService->>S3: downloadImage(pictureUrl)
S3-->>UserService: InputStream
UserService->>S3: uploadProfileImage(stream,<br/>userId)
S3-->>UserService: Mono<S3 URL>
AuthUsecase->>AuthUsecase: matchingProfileImage<br/>(time-based)
AuthUsecase->>UserService: updateProfileImage(userId,<br/>imageKey)
UserService->>DB: UPDATE profile_image
AuthUsecase->>AuthUsecase: createAccessToken
AuthUsecase-->>Controller: Mono<GoogleLoginResponse><br/>{isUser, userId, token}
Controller-->>Client: ResponseDto<br/><GoogleLoginResponse>
end
sequenceDiagram
participant Client as Client
participant Controller as ArticleControllerV2
participant GetArticlePort as GetArticlePort
participant GetArticleUsecase as GetArticleUsecase
participant ArticleGetService as ArticleGetService
participant Repository as ArticleRepository
participant DB as Database
rect rgb(220, 240, 255)
Note over Client,DB: Get Remind Articles V2 Flow
Client->>Controller: GET /api/v2/articles/remind<br/>?now=..., readStatus=..., page=0, size=8
Controller->>GetArticlePort: getRemindArticlesV2(user,<br/>now, readStatus, pageQuery)
GetArticlePort->>GetArticleUsecase: getRemindArticlesV2(...)
rect rgb(240, 255, 240)
Note over GetArticleUsecase,DB: Compute 24-hour Window
GetArticleUsecase->>GetArticleUsecase: startTime = now - 24h<br/>endTime = now
end
GetArticleUsecase->>ArticleGetService: findTodayRemindWithCountV2<br/>(user, start, end, pageable,<br/>readStatus)
ArticleGetService->>Repository: findTodayRemindWithCountV2<br/>(userId, start, end,<br/>pageable, readStatus)
Repository->>DB: SELECT articles WHERE<br/>userId AND remindAt BETWEEN<br/>start AND end
DB-->>Repository: Page<Article>
Repository->>DB: SELECT COUNT(*) WHERE<br/>userId AND isRead=true
DB-->>Repository: readCount
Repository->>DB: SELECT COUNT(*) WHERE<br/>userId AND isRead=false
DB-->>Repository: unreadCount
Repository-->>ArticleGetService: RemindArticlesWithCountV2<br/>{readCount, unreadCount,<br/>totalCount, articles}
ArticleGetService->>ArticleGetService: Map to<br/>RemindArticlesWithCountDtoV2
ArticleGetService-->>GetArticleUsecase: RemindArticlesWithCountDtoV2
GetArticleUsecase->>GetArticleUsecase: Map Articles to<br/>RemindArticleResponseV2[]<br/>(includes category)
GetArticleUsecase-->>GetArticlePort: TodayRemindResponseV2<br/>{hasNext, totalCount,<br/>readCount, unreadCount,<br/>articles[]}
GetArticlePort-->>Controller: TodayRemindResponseV2
Controller-->>Client: ResponseDto<br/><TodayRemindResponseV2>
end
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
📜 Recent review detailsConfiguration used: defaults Review profile: CHILL Plan: Pro 📒 Files selected for processing (63)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🚀 PR 요약
목적이 무엇인가요? - 지우고 작성
✨ PR 상세 내용
어떤 부분이 어떻게 변경이 되었나요? - 지우고 작성
🚨 주의 사항
주의할 부분이 무엇인가요? - 지우고 작성
✅ 체크 리스트
Summary by CodeRabbit
New Features
Infrastructure
✏️ Tip: You can customize this high-level summary in your review settings.