Skip to content

PR: [OFFNAL-83]: 공휴일 Open API 엔드포인트 추가 및 공휴일 데이터 캐싱 로직 추가 #128

Merged
KanuKim97 merged 4 commits intodevelopfrom
feat/OFFNAL-83
Mar 24, 2026
Merged

PR: [OFFNAL-83]: 공휴일 Open API 엔드포인트 추가 및 공휴일 데이터 캐싱 로직 추가 #128
KanuKim97 merged 4 commits intodevelopfrom
feat/OFFNAL-83

Conversation

@KanuKim97
Copy link
Copy Markdown
Contributor

@KanuKim97 KanuKim97 commented Mar 23, 2026

Description

이번 변경에서는 공휴일 데이터를 앱 실행 시 SQLite에 캐싱하고, 이후에는 로컬 캐시를 우선 사용하는 흐름을 추가했습니다. 동시에 Axios 인스턴스 구조를 정리해서 인증 요청과 비인증 요청을 분리했고, 환경 변수 로딩 방식도 현재 프로젝트 구조에 맞게 정리했습니다.

Changes

  • 공휴일 API 응답을 OpenApiService에서 받아 현재 연도 기준으로 캐시하도록 추가
  • SQLite에 공휴일 캐시용 테이블을 추가하고, DAO/Repository/UseCase 구조를 연결
  • 앱 시작 시 현재 연도 공휴일 데이터를 미리 적재하도록 bootstrap 로직 추가
  • HolidayRepository에서 cache hit 여부를 판단하고, 캐시가 없을 때만 Open API를 호출하도록 구현
  • 불필요한 공휴일 컬럼(dateKind, isHoliday, seq)은 로컬 저장소에서 제거하고 저장 구조를 단순화
  • Axios 인스턴스를 auth/public 용도로 분리해 인터셉터 구조를 정리

Verification

  • eslint 통과 확인
  • 캐시된 현재 연도 데이터가 있는 경우 API를 재호출하지 않는 흐름 확인
  • 캐시가 없는 연도는 API 호출 후 SQLite 저장되도록 구성

@KanuKim97 KanuKim97 self-assigned this Mar 23, 2026
@KanuKim97 KanuKim97 added 🔨 enhancement 새 기능의 추가 혹은 새 기능의 요청에 해당 라벨을 적용합니다. 🍎 iOS iOS 기기의 버그 및 iOS 기기의 작업이 필요한 경우, 해당 라벨을 적용합니다. 🤖Android 안드로이드 기기의 버그 및 안드로이드 기기의 작업이 필요한 경우, 해당 라벨을 적용합니다. labels Mar 23, 2026
@gemini-code-assist
Copy link
Copy Markdown
Contributor

Summary of Changes

Hello, 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은 공공 데이터 포털에서 공휴일 정보를 가져와 로컬에 캐싱하는 기능을 도입합니다. 이를 위해 새로운 API 서비스, 데이터 접근 객체, 리포지토리 및 유스케이스가 추가되었으며, 애플리케이션의 의존성 주입 컨테이너와 데이터베이스 스키마가 업데이트되었습니다. 또한, 기존 Axios 클라이언트 설정이 리팩토링되어 API 통신의 일관성과 유지보수성이 향상되었습니다.

Highlights

  • 공휴일 Open API 연동: 공공 데이터 포털의 공휴일 정보를 가져오는 새로운 Open API 엔드포인트와 서비스가 추가되었습니다.
  • 공휴일 데이터 캐싱 로직 구현: 가져온 공휴일 데이터를 로컬 SQLite 데이터베이스에 캐싱하는 로직이 구현되어, 네트워크 요청을 줄이고 오프라인 접근성을 향상시켰습니다.
  • Axios 클라이언트 및 인터셉터 리팩토링: 기존 Axios 인스턴스들을 createAxiosClient.ts 파일로 통합하고, createAxiosInterceptor.ts에서 요청 로깅 및 토큰 재발급 로직을 관리하도록 리팩토링하여 API 통신 구조를 개선했습니다.
  • 데이터베이스 스키마 업데이트: 공휴일 캐싱을 위한 holiday_cache_metaholiday_items 테이블이 SQLite 데이터베이스에 추가되었습니다.

🧠 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.

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.

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.

@KanuKim97 KanuKim97 marked this pull request as ready for review March 23, 2026 16:44
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

This pull request introduces a new holiday management feature, including local caching of holiday data from an external API. It involves adding new data access objects (DAO), repositories, and use cases for holidays, along with new database tables and schema. Additionally, the PR refactors the Axios client setup across various API services for better organization and introduces request logging and token handling interceptors. The review comments highlight a critical issue with the replaceHolidayItems method in HolidayDao lacking atomicity, which should be addressed using database transactions. There are also suggestions to improve readability in HolidayRepositoryImpl by using dedicated DTOs for API response mapping and to address a potential data inconsistency in OpenApiService where hardcoded numOfRows without pagination could lead to incomplete holiday data caching and repeated API calls.

@KanuKim97 KanuKim97 merged commit 39c3e34 into develop Mar 24, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

🤖Android 안드로이드 기기의 버그 및 안드로이드 기기의 작업이 필요한 경우, 해당 라벨을 적용합니다. 🔨 enhancement 새 기능의 추가 혹은 새 기능의 요청에 해당 라벨을 적용합니다. 🍎 iOS iOS 기기의 버그 및 iOS 기기의 작업이 필요한 경우, 해당 라벨을 적용합니다.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant