Skip to content

✨[FEAT] #135: Firebase Remote Config 연동#138

Merged
HwangJaemin49 merged 8 commits intodevelopfrom
feature/#135-firebase
Feb 24, 2026
Merged

✨[FEAT] #135: Firebase Remote Config 연동#138
HwangJaemin49 merged 8 commits intodevelopfrom
feature/#135-firebase

Conversation

@HwangJaemin49
Copy link
Copy Markdown
Contributor

#⃣ 연관된 이슈

close #135

📝 작업 내용

Remote Config에 default(prod), release, qa 분기로 나누어 서버 호스트 등록

@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello @HwangJaemin49, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed!

이 PR은 Firebase Remote Config, Analytics, Crashlytics를 애플리케이션에 통합하여 전반적인 안정성과 유연성을 향상시키는 데 중점을 둡니다. 주요 변경 사항으로는 동적 API 기본 URL 구성을 위한 Remote Config 설정, 새로운 'qa' 빌드 타입 도입, 그리고 Crashlytics와 연동되는 커스텀 로깅 및 사용자 컨텍스트 관리 시스템이 포함됩니다. 또한, 토큰 갱신 메커니즘을 강화하여 다양한 인증 실패 시나리오를 보다 견고하게 처리할 수 있도록 개선되었습니다.

Highlights

  • Firebase 통합: Firebase Remote Config, Analytics, Crashlytics를 애플리케이션에 통합하여 동적 구성, 향상된 로깅 및 충돌 보고 기능을 제공합니다.
  • 빌드 타입 및 환경 설정: 'qa' 빌드 타입을 새로 추가하고, 디버그 및 QA 빌드 타입에 대해 applicationIdSuffix, versionNameSuffix, BASE_URL을 구성했습니다.
  • 원격 구성 초기화: 애플리케이션 시작 시 Firebase Remote Config를 초기화하고 활성화하는 로직을 구현하여 기본값을 설정하고 DomainProvider를 통해 API 기본 URL을 업데이트합니다.
  • 커스텀 로깅 및 사용자 컨텍스트: Firebase Crashlytics와 통합되는 AppLogger 유틸리티 클래스와 설치 ID 및 빌드 정보를 관리하여 Crashlytics에 사용자 컨텍스트를 제공하는 UserContext 클래스를 추가했습니다.
  • 토큰 갱신 로직 개선: DefaultTokenRetryHandler를 개선하여 ApiException 외에 HttpException (401 Unauthorized)도 처리하도록 하고, NoRefreshTokenExceptionRefreshFailedException과 같은 커스텀 예외를 도입했습니다.
  • 동적 기본 URL: API 기본 URL을 동적으로 선택할 수 있도록 DomainProviderHostSelectionInterceptor를 구현했습니다.
  • 사용자 ID Crashlytics 연동: Google 로그인 성공 시 사용자 ID를 Crashlytics에 설정하도록 로그인 흐름을 수정했습니다.

🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console.

Changelog
  • app/build.gradle.kts
    • Firebase 플러그인 및 종속성을 추가했습니다.
    • 'qa' 빌드 타입을 정의하고 디버그 빌드 타입의 속성을 업데이트했습니다.
    • Compose 컴파일러 옵션 설정을 제거했습니다.
  • app/src/main/java/com/umc/edison/EdisonApplication.kt
    • Firebase 관련 임포트를 추가했습니다.
    • Crashlytics 컨텍스트 및 Remote Config 초기화 로직을 추가했습니다.
    • Remote Config에서 기본 URL을 가져와 DomainProvider에 설정하는 기능을 구현했습니다.
  • app/src/main/java/com/umc/edison/common/logging/AppLogger.kt
    • Firebase Crashlytics와 통합된 새로운 로깅 유틸리티 클래스를 추가했습니다.
  • app/src/main/java/com/umc/edison/common/logging/UserContext.kt
    • 설치 ID를 관리하고 Crashlytics에 빌드 및 사용자 정보를 설정하는 새로운 클래스를 추가했습니다.
  • app/src/main/java/com/umc/edison/data/model/user/UserEntity.kt
    • UserEntity 데이터 클래스에 id 필드를 추가했습니다.
  • app/src/main/java/com/umc/edison/data/repository/BubbleRepositoryImpl.kt
    • 기존 android.util.Log 호출을 AppLogger로 대체했습니다.
  • app/src/main/java/com/umc/edison/data/repository/SyncRepositoryImpl.kt
    • 기존 android.util.Log 호출을 AppLogger로 대체했습니다.
  • app/src/main/java/com/umc/edison/data/token/DefaultTokenRetryHandler.kt
    • HttpException 임포트를 추가했습니다.
    • 토큰 갱신 로직에서 ApiException 외에 HttpException (401)도 처리하도록 개선했습니다.
    • 토큰 갱신 실패 시 NoRefreshTokenException을 던지도록 변경했습니다.
  • app/src/main/java/com/umc/edison/data/token/TokenExceptions.kt
    • NoRefreshTokenExceptionRefreshFailedException이라는 새로운 커스텀 예외 클래스를 추가했습니다.
  • app/src/main/java/com/umc/edison/data/token/TokenManager.kt
    • 토큰 로딩 및 캐싱에 Mutex를 사용하여 스레드 안전성을 확보했습니다.
    • 토큰을 미리 로드하는 preloadTokens 함수와 로드 여부를 확인하는 ensureLoaded 함수를 추가했습니다.
    • 로깅을 위해 AppLogger를 사용하도록 변경했습니다.
  • app/src/main/java/com/umc/edison/domain/model/user/User.kt
    • User 도메인 모델에 id 필드를 추가했습니다.
  • app/src/main/java/com/umc/edison/presentation/base/BaseViewModel.kt
    • 기존 android.util.Log 호출을 AppLogger로 대체했습니다.
  • app/src/main/java/com/umc/edison/presentation/login/GoogleLoginHelper.kt
    • 기존 android.util.Log 호출을 AppLogger로 대체했습니다.
    • UserContext를 주입받아 Google 로그인 성공 시 사용자 ID를 Crashlytics에 설정하도록 변경했습니다.
  • app/src/main/java/com/umc/edison/presentation/model/UserModel.kt
    • toDomain 매핑 시 User 모델에 id 필드를 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/api/RefreshTokenApiService.kt
    • refreshToken 메서드를 suspend 함수로 변경했습니다.
  • app/src/main/java/com/umc/edison/remote/config/DomainProvider.kt
    • API 도메인을 동적으로 제공하고 설정하는 새로운 클래스를 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/config/RemoteConfigKeys.kt
    • Firebase Remote Config 키를 정의하는 새로운 객체를 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/datasources/UserRemoteDataSourceImpl.kt
    • 토큰 갱신 실패 시 RefreshFailedException을 던지도록 오류 처리를 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/di/NetworkModule.kt
    • HostSelectionInterceptor 임포트를 추가하고 OkHttpClient에 인터셉터를 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/model/login/LoginResponse.kt
    • toUserEntity 매핑 시 memberIdid 필드에 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/model/login/SignUpResponse.kt
    • toUserEntity 매핑 시 memberIdid 필드에 추가했습니다.
  • app/src/main/java/com/umc/edison/remote/token/AccessTokenInterceptor.kt
    • 액세스 토큰이 없을 때 AppLogger를 사용하여 경고를 로깅하도록 변경했습니다.
  • app/src/main/java/com/umc/edison/ui/artboard/ArtLetterDetailScreen.kt
    • 기존 android.util.Log 호출을 AppLogger로 대체했습니다.
  • app/src/main/java/com/umc/edison/ui/components/ImageGallery.kt
    • 기존 android.util.Log 호출을 AppLogger로 대체했습니다.
  • app/src/main/java/com/umc/edison/ui/navigation/NavRoute.kt
    • BubbleEditcreateRoute 함수에서 bubbleId 파라미터를 nullable로 변경했습니다.
  • build.gradle.kts
    • Firebase google-servicesfirebase-crashlytics 플러그인을 적용했습니다.
  • gradle/libs.versions.toml
    • Firebase BOM, Remote Config, Analytics, Crashlytics 관련 종속성을 추가했습니다.
    • Hilt 버전을 업데이트했습니다.
Using Gemini Code Assist

The full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips.

Invoking Gemini

You can request assistance from Gemini at any point by creating a comment using either /gemini <command> or @gemini-code-assist <command>. Below is a summary of the supported commands on the current page.

Feature Command Description
Code Review /gemini review Performs a code review for the current pull request in its current state.
Pull Request Summary /gemini summary Provides a summary of the current pull request in its current state.
Comment @gemini-code-assist Responds in comments when explicitly tagged, both in pull request comments and review comments.
Help /gemini help Displays a list of available commands.

Customization

To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a .gemini/ folder in the base of the repository. Detailed instructions can be found here.

Limitations & Feedback

Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here.

You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension.

Footnotes

  1. Review the Privacy Notices, Generative AI Prohibited Use Policy, Terms of Service, and learn how to configure Gemini Code Assist in GitHub here. Gemini can make mistakes, so double check it and use code with caution.

@SuHyeon00
Copy link
Copy Markdown
Contributor

/gemini review

Copy link
Copy Markdown
Contributor

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

이번 PR은 Firebase Remote Config를 연동하여 서버의 기본 URL을 동적으로 관리하도록 구현한 점이 인상적입니다. 또한, 중앙화된 로깅 시스템(AppLogger) 도입, UserContext를 통한 크래시 리포팅 개선, TokenManager의 스레드 안전성 강화를 위한 리팩토링 등 많은 개선이 이루어졌습니다. 전반적인 변경 사항은 구조가 잘 잡혀 있으며 애플리케이션의 안정성과 관찰 가능성을 크게 향상시킵니다. 의존성 관리 및 잠재적인 성능 문제와 관련하여 몇 가지 개선 제안 사항이 있습니다.

Comment thread app/build.gradle.kts Outdated
Comment thread app/src/main/java/com/umc/edison/data/token/TokenManager.kt Outdated
Comment thread app/build.gradle.kts Outdated
Comment thread app/src/main/java/com/umc/edison/EdisonApplication.kt Outdated
Comment thread app/src/main/java/com/umc/edison/data/token/TokenManager.kt Outdated
Comment thread app/src/main/java/com/umc/edison/ui/navigation/NavRoute.kt Outdated
Copy link
Copy Markdown
Contributor

@SuHyeon00 SuHyeon00 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

필수 수정사항은 아니라 승인해둘게요! 수고하셨습니당 👍

Comment thread app/src/main/java/com/umc/edison/data/token/TokenManager.kt Outdated
Comment thread app/src/main/java/com/umc/edison/data/token/TokenManager.kt Outdated
@HwangJaemin49 HwangJaemin49 merged commit e0fa2b6 into develop Feb 24, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

✨ [FEAT] Firebase 연동

3 participants