Skip to content

Conversation

@Dansot4891
Copy link
Collaborator

@Dansot4891 Dansot4891 commented May 19, 2025

🔍 변경사항 요약

  • 프로젝트를 깃허브를 활용하여 웹 배포 완료되었습니다.
  • favicon을 임의로 설정했습니다.
  • assets folder를 pubspec.yaml에 등록하고 불러오는 경로를 약간 수정했습니다.
  • github action 으로 배포전, 테스트 코드를 실행하도록 설정하였습니다.
  • main branch에 push가 들어오면 자동으로 재배포가 이루어지도록 설정했습니다.
  • 실제 웹 배포 branch는 'gh-pages'입니다.
    => 해당 branch는 건들면 안됩니다.
  • firebase_option 파일을 ignore에서 해제하였습니다.
    => Firebase Authentication에서 허용된 도메인에서만 OAuth 콜백을 받도록 추가 설정을 해야한다고합니다.
  • Web 폴더도 ignore 해제하였습니다.

📌 리뷰사항

  • 웹사이트에 이상 없는지 확인해주세요.

✅ 체크리스트

  • 코드가 빌드 및 실행에 문제 없는가
  • 파일, 변수, 주석 등이 컨벤션 규칙에 맞게 준수되었는가
  • 변경된 코드가 기존 기능에 영향을 주지 않도록 설계되었는가
  • 변경된 파일에 대한 문서나 주석이 업데이트 되었는가
  • 리뷰어가 이해하기 쉽도록 변경사항 설명 작성

📝 추가 참고사항 (선택)

⚠️ 현재 구글로그인이 되지 않습니다.
https://gitflow-exercise.github.io/MongoAI-web/
웹사이트 주소입니다.

Summary by CodeRabbit

  • 신규 기능

    • Firebase 웹 환경 구성을 위한 설정 파일이 추가되었습니다.
    • Flutter 웹 앱의 진입점인 index.html과 PWA 지원을 위한 manifest.json 파일이 추가되었습니다.
    • Flutter 웹 빌드 및 GitHub Pages 자동 배포를 위한 워크플로우가 도입되었습니다.
  • 버그 수정

    • 이미지 및 로고 경로가 올바르게 수정되어 앱 내 이미지가 정상적으로 표시됩니다.
  • 문서화

    • pubspec.yaml에 assets/images/ 디렉토리가 포함되어 이미지 에셋이 앱에 정상적으로 반영됩니다.
  • 스타일

    • 일부 위젯 코드가 가독성을 높이기 위해 포맷팅 및 정렬되었습니다.
  • 기타

    • .gitignore에서 일부 파일이 버전 관리에 포함되도록 조정되었습니다.

@Dansot4891 Dansot4891 requested review from helljh, irmu98 and okstring May 19, 2025 14:49
@Dansot4891 Dansot4891 added the feat 기능 추가 label May 19, 2025
@coderabbitai
Copy link

coderabbitai bot commented May 19, 2025

Walkthrough

이 변경 사항은 Flutter 웹 애플리케이션의 GitHub Pages 자동 배포 워크플로우와 관련된 파일 추가 및 설정, 그리고 웹 애셋 관리와 경로 정정, Firebase 옵션 파일 추가, 그리고 관련된 .gitignore 및 pubspec.yaml 파일 업데이트를 포함합니다. 코드 및 기능적 로직에는 변화가 없습니다.

Changes

파일/경로 변경 요약
.github/workflows/web-deploy.yml Flutter 웹 앱을 GitHub Pages에 자동 배포하는 GitHub Actions 워크플로우 신규 추가
.gitignore Flutter 웹 관련 파일 및 firebase_options.dart의 ignore 규칙을 주석 처리하여 버전 관리에 포함되도록 변경
lib/auth/presentation/components/auth_header_widget.dart 로고 이미지 경로를 'images/'에서 'assets/images/'로 수정
lib/auth/presentation/sign_in/screen/sign_in_screen.dart 구글 로고 경로를 'images/'에서 'assets/images/'로 수정, 코드 스타일 및 포맷팅 개선
lib/dashboard/presentation/dashboard_screen.dart Mongo AI 로고 경로를 'images/'에서 'assets/images/'로 수정, 코드 포맷팅 및 공백 조정
lib/firebase_options.dart FlutterFire CLI가 생성한 Firebase 옵션 클래스 및 플랫폼별 옵션 반환 로직 신규 추가
pubspec.yaml Flutter assets에 'assets/images/' 디렉토리 추가
web/index.html, web/manifest.json Flutter 웹 앱의 진입점 index.html 및 PWA 지원 manifest.json 신규 추가

Sequence Diagram(s)

sequenceDiagram
    participant Developer
    participant GitHub
    participant GitHub Actions
    participant Flutter Build
    participant GitHub Pages

    Developer->>GitHub: main 브랜치에 push
    GitHub->>GitHub Actions: 워크플로우 트리거
    GitHub Actions->>Flutter Build: Flutter 환경 설정 및 빌드, 테스트 수행
    Flutter Build-->>GitHub Actions: 빌드 산출물(web 디렉토리)
    GitHub Actions->>GitHub Pages: 빌드 결과물 배포
Loading

Suggested reviewers

  • helljh
  • okstring

Poem

🐰
코드가 빛나는 웹의 길,
자동 배포로 걱정은 실!
이미지 경로도 바르게,
Firebase 옵션도 빠르게.
토끼는 오늘도 깡총깡총,
새 기능 반영에 신이 났지롱!
🌱

Note

⚡️ AI Code Reviews for VS Code, Cursor, Windsurf

CodeRabbit now has a plugin for VS Code, Cursor and Windsurf. This brings AI code reviews directly in the code editor. Each commit is reviewed immediately, finding bugs before the PR is raised. Seamless context handoff to your AI code agent ensures that you can easily incorporate review feedback.
Learn more here.


Note

⚡️ Faster reviews with caching

CodeRabbit now supports caching for code and dependencies, helping speed up reviews. This means quicker feedback, reduced wait times, and a smoother review experience overall. Cached data is encrypted and stored securely. This feature will be automatically enabled for all accounts on May 16th. To opt out, configure Review - Disable Cache at either the organization or repository level. If you prefer to disable all data retention across your organization, simply turn off the Data Retention setting under your Organization Settings.
Enjoy the performance boost—your workflow just got faster.


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.

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Explain this complex logic.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai explain this code block.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and explain its main purpose.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Support

Need help? Create a ticket on our support page for assistance with any issues or questions.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai generate sequence diagram to generate a sequence diagram of the changes in this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@Dansot4891 Dansot4891 linked an issue May 19, 2025 that may be closed by this pull request
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (2)
web/index.html (1)

1-38: 웹 배포를 위한 index.html 구조가 적절합니다.

Flutter 웹 애플리케이션 배포를 위한 기본 HTML 구조가 올바르게 설정되어 있습니다. 다음 요소들이 적절히 포함되어 있습니다:

  • 동적 base href 설정 ($FLUTTER_BASE_HREF)
  • 메타 태그 및 모바일 웹 호환성 설정
  • 파비콘 및 매니페스트 참조
  • Flutter 부트스트랩 스크립트

한 가지 고려할 점은 애플리케이션 설명 부분입니다:

-  <meta name="description" content="A new Flutter project.">
+  <meta name="description" content="Mongo AI - 데이터 분석 및 시각화 플랫폼">
.github/workflows/web-deploy.yml (1)

1-59: GitHub Pages 배포 워크플로우가 잘 구성되어 있습니다.

웹 애플리케이션 배포를 위한 GitHub Actions 워크플로우가 체계적으로 구성되어 있습니다:

  • Flutter 환경 설정
  • 환경 변수 구성
  • 의존성 설치 및 코드 생성
  • 테스트 실행으로 품질 검증
  • 웹 빌드 및 클라이언트 라우팅 처리
  • GitHub Pages 배포

다음 몇 가지 사소한 개선 사항이 있습니다:

# 48줄의 후행 공백 제거
-      run: flutter build web --base-href "/${{ github.event.repository.name }}/"
+      run: flutter build web --base-href "/${{ github.event.repository.name }}/"

# 59줄의 파일 끝에 개행 문자 추가
 publish_dir: ./build/web
+

또한 다음 문제를 확인해 주세요:

현재 GitHub Pages 배포에 사용 중인 peaceiris/actions-gh-pages@v3 액션이 최신 버전인지 확인해주세요. 정적 분석 도구에서 이 액션의 러너가 오래되었을 수 있다고 표시했습니다.

🧰 Tools
🪛 actionlint (1.7.7)

56-56: the runner of "peaceiris/actions-gh-pages@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)

[error] 48-48: trailing spaces

(trailing-spaces)


[error] 59-59: no new line character at the end of file

(new-line-at-end-of-file)

📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 50dde86 and 6220ccd.

⛔ Files ignored due to path filters (5)
  • web/favicon.png is excluded by !**/*.png
  • web/icons/Icon-192.png is excluded by !**/*.png
  • web/icons/Icon-512.png is excluded by !**/*.png
  • web/icons/Icon-maskable-192.png is excluded by !**/*.png
  • web/icons/Icon-maskable-512.png is excluded by !**/*.png
📒 Files selected for processing (9)
  • .github/workflows/web-deploy.yml (1 hunks)
  • .gitignore (2 hunks)
  • lib/auth/presentation/components/auth_header_widget.dart (1 hunks)
  • lib/auth/presentation/sign_in/screen/sign_in_screen.dart (5 hunks)
  • lib/dashboard/presentation/dashboard_screen.dart (5 hunks)
  • lib/firebase_options.dart (1 hunks)
  • pubspec.yaml (1 hunks)
  • web/index.html (1 hunks)
  • web/manifest.json (1 hunks)
🧰 Additional context used
🪛 Gitleaks (8.26.0)
lib/firebase_options.dart

56-56: Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches.

(gcp-api-key)

🪛 actionlint (1.7.7)
.github/workflows/web-deploy.yml

56-56: the runner of "peaceiris/actions-gh-pages@v3" action is too old to run on GitHub Actions. update the action's version to fix this issue

(action)

🪛 YAMLlint (1.37.1)
.github/workflows/web-deploy.yml

[error] 48-48: trailing spaces

(trailing-spaces)


[error] 59-59: no new line character at the end of file

(new-line-at-end-of-file)

🔇 Additional comments (13)
pubspec.yaml (1)

108-108: assets/images 디렉토리 등록 확인
pubspec.yaml의 assets 섹션에 assets/images/ 디렉토리가 올바르게 추가되어 Flutter 빌드 시스템이 이미지를 번들링합니다.

.gitignore (2)

17-24: 웹 자산 트래킹 활성화
웹 배포를 위해 /web 폴더 내 주요 파일(favicon, icons, manifest 등)에 대한 ignore 설정을 주석 처리하여 Git에 포함시켰습니다. 적절하며, 배포 파이프라인에서 누락 없이 파일이 반영됩니다.


159-159: Firebase 옵션 파일 포함 확인
lib/firebase_options.dart에 대한 ignore를 해제하여 Firebase 구성 파일을 버전 관리에 추가했습니다. CI/CD 및 로컬 환경에서 올바르게 참조되는지 확인하세요.

lib/auth/presentation/components/auth_header_widget.dart (1)

23-23: 로고 에셋 경로 수정 검토
Image.asset 경로를 'assets/images/mongo_ai_logo.png'로 업데이트하여 pubspec.yaml과 일치시켰습니다. 로고가 올바르게 로드되는지 확인하세요.

lib/auth/presentation/sign_in/screen/sign_in_screen.dart (3)

144-146: InputDecoration multi-line 포맷 적용
focusedBorder 속성을 멀티라인으로 분리하여 가독성을 높였습니다. 변경된 형식이 Flutter 스타일 가이드에 부합하는지 확인해주세요.


294-297: Google 로그인 버튼 UI 및 에셋 경로 업데이트
SignInAction.onTapGoogleSingIn() 호출 및 이미지 경로를 'assets/images/google_logo.png'로 수정하여 에셋 로딩을 표준화했습니다. 버튼 표시와 클릭 이벤트가 의도대로 동작하는지 확인 바랍니다.

Also applies to: 309-319, 323-330


351-353: 회원가입 링크 콜백 일관성 검토
onTap 콜백에서 SignInAction.onTapSignUp()을 호출하도록 표현과 인덴트를 정리했습니다. 기존 동작에 영향이 없는지 확인하세요.

web/manifest.json (1)

1-35: PWA manifest 구성 확인
name, start_url, display, icons 등 PWA 설정이 올바르게 작성되었습니다. web/icons/ 폴더에 아이콘 파일이 모두 존재하는지, 그리고 index.html에서 이 manifest가 정상 참조되는지 확인해 주세요.

lib/dashboard/presentation/dashboard_screen.dart (5)

39-41: 코드 정리가 잘 되어 있습니다.

비동기 함수 호출에 대한 unawaited 사용 패턴이 잘 적용되었습니다.


56-56: 조건문 서식이 개선되었습니다.

조건문에 추가된 공백이 코드 가독성을 향상시켰습니다.


79-107: 버튼 구현이 잘 정렬되어 있습니다.

ElevatedButton 위젯의 서식이 개선되어 코드 구조가 명확해졌습니다.


171-171: 조건문 서식이 개선되었습니다.

if 문에 추가된 공백이 코드 가독성을 향상시켰습니다.


240-240: 자산 경로가 올바르게 수정되었습니다.

이미지 경로가 'images/mongo_ai_logo.png'에서 'assets/images/mongo_ai_logo.png'로 수정되어 pubspec.yaml의 자산 디렉토리 구성과 일치하게 되었습니다. 이는 웹 배포 시 자산이 올바르게 로드되도록 보장합니다.

Comment on lines +1 to +64
// File generated by FlutterFire CLI.
// ignore_for_file: type=lint
import 'package:firebase_core/firebase_core.dart' show FirebaseOptions;
import 'package:flutter/foundation.dart'
show defaultTargetPlatform, kIsWeb, TargetPlatform;

/// Default [FirebaseOptions] for use with your Firebase apps.
///
/// Example:
/// ```dart
/// import 'firebase_options.dart';
/// // ...
/// await Firebase.initializeApp(
/// options: DefaultFirebaseOptions.currentPlatform,
/// );
/// ```
class DefaultFirebaseOptions {
static FirebaseOptions get currentPlatform {
if (kIsWeb) {
return web;
}
switch (defaultTargetPlatform) {
case TargetPlatform.android:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for android - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.iOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for ios - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.macOS:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for macos - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.windows:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for windows - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
case TargetPlatform.linux:
throw UnsupportedError(
'DefaultFirebaseOptions have not been configured for linux - '
'you can reconfigure this by running the FlutterFire CLI again.',
);
default:
throw UnsupportedError(
'DefaultFirebaseOptions are not supported for this platform.',
);
}
}

static const FirebaseOptions web = FirebaseOptions(
apiKey: 'AIzaSyDv6taLhWiRmfLBY7v7h2iZRHABowiB4UU',
appId: '1:108515543625:web:3a816c4fb36a9baaa74d98',
messagingSenderId: '108515543625',
projectId: 'mongo-ai-9d6ac',
authDomain: 'mongo-ai-9d6ac.firebaseapp.com',
storageBucket: 'mongo-ai-9d6ac.firebasestorage.app',
measurementId: 'G-ZB5G231MQH',
);
}
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue

Firebase 웹 구성이 완료되었습니다.

FlutterFire CLI로 생성된 Firebase 구성 파일이 적절하게 추가되었습니다. 이 파일은 웹 플랫폼에 대한 Firebase 설정을 올바르게 제공합니다.

하지만 다음 보안 문제에 대해 주의가 필요합니다:

코드에 Firebase API 키가 노출되어 있습니다. 이는 Flutter 웹 애플리케이션에서는 일반적인 패턴이지만, GitHub의 공개 저장소에 API 키가 그대로 노출되는 것은 보안 위험을 초래할 수 있습니다.

Firebase의 웹 API 키는 기본적으로 제한된 권한을 가지고 있으며, Firebase 콘솔에서 앱 제한사항을 설정하여 추가 보호 조치를 취하는 것이 좋습니다:

  1. Firebase 콘솔에서 API 키 제한 설정 (허용된 도메인, IP 주소 등)
  2. 올바른 Firebase 보안 규칙 구성
  3. OAuth 클라이언트 ID 제한 설정

PR 설명에 언급된 Google 로그인 기능이 작동하지 않는 문제는 이 API 키 설정 및 OAuth 클라이언트 구성과 관련이 있을 수 있습니다.

🧰 Tools
🪛 Gitleaks (8.26.0)

56-56: Uncovered a GCP API key, which could lead to unauthorized access to Google Cloud services and data breaches.

(gcp-api-key)

🤖 Prompt for AI Agents
In lib/firebase_options.dart lines 1 to 64, the Firebase API key is exposed in
the code, which poses a security risk if pushed to a public repository. To fix
this, do not hardcode the API key directly in the source file; instead, move
sensitive configuration like the API key to environment variables or secure
storage. Additionally, configure API key restrictions in the Firebase console by
limiting allowed domains and IPs, and ensure proper Firebase security rules and
OAuth client ID restrictions are set up to protect your app and enable Google
login functionality.

@Dansot4891 Dansot4891 merged commit 7d5ae88 into develop May 20, 2025
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feat 기능 추가

Projects

None yet

Development

Successfully merging this pull request may close these issues.

feat/실제 웹 배포

3 participants