Skip to content

Conversation

@IISweetHeartII
Copy link
Contributor

Summary

SMS 인증/리프레시 토큰 저장을 위한 Redis 인프라 기본 모듈을 추가하고 환경 변수 기반 설정 및 운영 문서를 정리했습니다.

Changes

  • ioredis 의존성 추가
  • RedisConfigService 추가 (REDIS_HOST/PORT/PASSWORD/DB 기반 옵션 생성)
  • 전역 RedisModuleRedisService 추가 (DI 토큰 포함)
  • AppModule에 Redis 모듈 등록
  • .env.example에 Redis 설정 변수 추가
  • docs/infrastructure/REDIS.md 문서 추가 (설정/배포/사용 가이드)

Type of Change

  • Bug fix (기존 기능을 수정하는 변경)
  • New feature (새로운 기능 추가)
  • Breaking change (기존 기능에 영향을 주는 변경)
  • Refactoring (기능 변경 없이 코드 개선)
  • Documentation (문서 변경)
  • Chore (빌드, 설정 등)

Target Environment

  • Dev (dev)
  • Prod (main)

Related Issues

Testing

  • Postman/Swagger로 API 호출 확인
  • 단위 테스트 통과
  • E2E 테스트 통과

실행 결과:

  • pnpm run lint: 통과
  • pnpm run build: 통과 (TSC 0 issues)
  • pnpm exec jest --passWithNoTests: No tests found, code 0

Checklist

  • 코드 컨벤션을 준수했습니다 (docs/development/CODE_STYLE.md)
  • Git 컨벤션을 준수했습니다 (docs/development/GIT_CONVENTIONS.md)
  • 네이밍 컨벤션을 준수했습니다 (docs/development/NAMING_CONVENTIONS.md)
  • 로컬에서 빌드가 성공합니다 (pnpm run build)
  • 로컬에서 린트가 통과합니다 (pnpm run lint)
  • (API 변경 시) Swagger 문서가 업데이트되었습니다
  • (필요 시) 테스트 코드를 작성했습니다

Screenshots (Optional)

N/A

Additional Notes

  • 본 PR은 Redis "기본 세팅"만 포함하며, SMS/토큰 비즈니스 로직 연동은 후속 이슈에서 진행합니다.
  • 도커 컴포즈 변경은 포함하지 않고, 인프라/환경변수/문서 기준으로 최소 범위 적용했습니다.

@gemini-code-assist
Copy link

Summary of Changes

Hello @IISweetHeartII, 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은 SMS 인증 및 리프레시 토큰 저장을 위한 Redis 인프라의 기본 모듈을 설정합니다. 환경 변수를 통해 Redis 연결을 구성하고, 애플리케이션 전반에서 Redis 서비스를 쉽게 사용할 수 있도록 NestJS 모듈을 통합합니다. 또한, Redis 설정 및 운영에 대한 상세한 문서를 제공하여 향후 개발 및 배포를 용이하게 합니다.

Highlights

  • Redis 의존성 추가: ioredis 패키지가 프로젝트 의존성에 추가되었습니다.
  • Redis 설정 서비스 구현: 환경 변수(REDIS_HOST, REDIS_PORT, REDIS_PASSWORD, REDIS_DB)를 기반으로 Redis 연결 옵션을 생성하는 RedisConfigService가 추가되었습니다.
  • 전역 Redis 모듈 및 서비스: 애플리케이션 전반에서 Redis 클라이언트를 주입하고 사용할 수 있도록 전역 RedisModuleRedisService, 그리고 DI 토큰 REDIS_CLIENT가 정의되었습니다.
  • AppModule 통합: 메인 AppModule에 새로 생성된 RedisModule이 등록되어 애플리케이션에서 Redis 기능을 사용할 수 있게 되었습니다.
  • 환경 변수 업데이트: Redis 관련 설정 변수들이 .env.example 파일에 추가되어 환경 설정 가이드가 업데이트되었습니다.
  • Redis 문서화: Redis 설정, 배포, 사용 가이드를 포함하는 docs/infrastructure/REDIS.md 문서가 추가되었습니다.

🧠 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
  • package.json
    • ioredis 패키지 의존성을 추가했습니다.
  • src/app.module.ts
    • 애플리케이션의 루트 모듈에 RedisModule을 임포트하고 등록했습니다.
  • src/common/redis/index.ts
    • RedisModule, RedisService, REDIS_CLIENT를 외부로 내보내도록 설정했습니다.
  • src/common/redis/redis.constants.ts
    • Redis 클라이언트 주입을 위한 REDIS_CLIENT 심볼을 정의했습니다.
  • src/common/redis/redis.module.ts
    • 전역 Redis 모듈을 구현하여 RedisConfigService를 통해 Redis 클라이언트를 프로비저닝하고, 연결 및 에러 로깅을 처리하도록 했습니다.
  • src/common/redis/redis.service.ts
    • Redis 클라이언트에 접근하고 모듈 소멸 시 연결을 종료하는 RedisService를 구현했습니다.
  • src/config/redis-config.ts
    • 환경 변수로부터 Redis 연결 옵션을 생성하는 RedisConfigService를 추가했습니다.
Ignored Files
  • Ignored by pattern: *.md (1)
    • docs/infrastructure/REDIS.md
  • Ignored by pattern: .env* (1)
    • .env.example
  • Ignored by pattern: pnpm-lock.yaml (1)
    • pnpm-lock.yaml
Activity
  • Redis 인프라 기본 모듈 설정 및 문서화 작업을 시작했습니다.
  • ioredis 의존성을 추가하고, Redis 설정 및 서비스 모듈을 구현했습니다.
  • AppModule에 Redis 모듈을 통합했습니다.
  • .env.example에 Redis 환경 변수를 추가하고, Redis 사용 가이드 문서를 작성했습니다.
  • PR 작성자가 pnpm run lintpnpm run build 테스트를 통과했음을 확인했습니다.
  • 이 PR은 이슈 #64를 해결합니다.
  • 이 PR은 Redis의 "기본 설정"에 중점을 두며, SMS/토큰 비즈니스 로직 연동은 후속 작업으로 예정되어 있습니다.
  • 도커 컴포즈 변경은 포함되지 않았으며, 인프라/환경 변수/문서 기준으로 최소 범위가 적용되었습니다.
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.

Copy link

@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

Redis 모듈 추가 및 설정에 대한 리뷰입니다. 전반적으로 잘 구성되었으나, 두 가지 개선점을 제안합니다. 첫째, Redis 설정 파일의 재시도 로직에 있는 매직 넘버를 상수로 추출하여 가독성과 유지보수성을 높이는 것을 권장합니다. 둘째, RedisServiceioredis 클라이언트를 직접 노출하는 대신, 필요한 명령어들을 메서드로 추상화하여 결합도를 낮추는 장기적인 개선 방향을 제안합니다.

@IISweetHeartII IISweetHeartII changed the title Task: Redis 모듈 기본 세팅 및 문서화 (#64) Chore: Redis 모듈 기본 세팅 및 문서화 (#64) Feb 12, 2026
@IISweetHeartII IISweetHeartII self-assigned this Feb 12, 2026
@IISweetHeartII IISweetHeartII added 📚 docs Improvements or additions to documentation ✨ feature New feature or request 🧹 chore setting 덕환 labels Feb 12, 2026
@IISweetHeartII IISweetHeartII merged commit 4b8efdc into dev Feb 12, 2026
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

📚 docs Improvements or additions to documentation 🧹 chore setting ✨ feature New feature or request 덕환

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Task] Redis Module 세팅

1 participant