Team/choi youngsu#21
Open
Choiyeongsu13 wants to merge 67 commits into
Open
Conversation
Updated project details, team information, features, and technology stack in README.
Add FastAPI server with detection, nutrition and meals endpoints and in-memory store
Add FastAPI server with health, detection, nutrition and meals endpoints; update README
프론트엔드 디자인
- lib/, android/, ios/, web/, test/ → app/ 하위로 재배치 - 신규 파일 추가: database/, providers/, repositories/, settings_screen.dart - server/, ai/, data/, docs/ 기존 구조 유지
- ai/rag_engine: LangChain + ChromaDB + Qwen2.5:7b RAG 파이프라인 구현 - server/api/routes_chat.py: POST /chat 엔드포인트 추가 - app/lib/services/chat_service.dart: FastAPI /chat 연동 서비스 - app/lib/screens/ai_chat_screen.dart: RAG 챗봇 UI 화면 - home_screen.dart: 챗봇 카드 → AiChatScreen 연결
- RAG 파이프라인을 Ollama에서 sentence-transformers(KR-SBERT)로 교체 (GPU 지원, 한국어 특화) - ChromaDB 빌드 스크립트에 GPU 배치 처리 및 체크포인트 기능 추가 - POST /food/add (단건), POST /food/bulk (일괄) 식품 추가 API 추가 - 시스템 프롬프트에 한국어 강제 지시 추가 (중국어 혼용 방지)
- LLM을 qwen2.5:7b → gemma4:e4b로 변경 - ChromaDB/Ollama 에러 핸들링 추가 - gemma4 '|' 문자 호환 문제 해결 (콤마 치환) - 검색 문서 수 k=5 → k=3 최적화 - SSE 스트리밍 엔드포인트 추가 (/chat/stream) - Flutter 채팅 서비스 SSE 버퍼링 및 에러 처리 강화 - 서버 라우트 로깅 개선
- 가공식품 CSV에서 프랜차이즈/편의점 데이터 추출 스크립트 - 수동 작성 프랜차이즈 메뉴 107건 (맥도날드, 버거킹, 스타벅스 등 17개 브랜드) - ChromaDB: 247,770 → 266,468건
- UserProfileEntity에 goal, allergy, condition, activity_level 컬럼 추가 - DB 버전 2로 마이그레이션 (ALTER TABLE) - UserProfile 모델에 activityLevel, allergy, condition 필드 추가
- RAG 프롬프트에 알레르기/질환/목표/식사 이력 컨텍스트 반영 - /recommend: 사용자 맞춤 메뉴 추천 엔드포인트 추가 - /profile/extract: 대화 기반 프로필 추출 엔드포인트 추가 - /chat, /chat/stream에 meal_history 파라미터 추가 - /food/search 영양 검색 API 추가
- LLM 호출 없이 단계별 스크립트로 정보 수집 (이름/성별/나이/목표/활동량/알레르기/질환) - 빠른 답변 버튼 + 직접 입력 혼합 지원 - UserSetupScreen에 목표/활동량 칩 선택, 알레르기/질환 텍스트 입력 추가 - ProfileSummaryScreen에 목표/활동량/알레르기/질환 요약 표시
feat: RAG 파이프라인 품질 개선 및 포스트 프로세싱 추가
- 전처리: _detect_meal_time(), _calc_remaining_kcal(), _rewrite_queries()로 의도·시간대 감지 및 다중 쿼리 재작성 (최대 4개)
- 검색: _search_single() + _retrieve_multi()로 다중 쿼리 검색 → 문서별 최고 유사도 보존 → 중복 제거
- 컨텍스트: [사용자 정보] / [식단 현황] / [참고 영양 정보] 구조화 섹션으로 LLM 입력 개선
- 후처리: 남은 칼로리 기준 초과 감지 추가 (remaining_kcal * 1.2 초과 시 경고)
- SYSTEM_PROMPT에서 {context} 제거 → HumanMessage에 구조화 전달로 안정성 향상
Improve API config and server persistence
Add structured recommendation pipeline
- origin/main의 recommendation_pipeline 서비스 레이어 적용 - 우리 브랜치의 건강기능식품 메타데이터 필터(where_filter) 보존 - run_in_threadpool 비동기 처리 방식 채택
Feat/rag improvements
- Add design token system (AppColors, AppRadius, AppShadows) to app_theme.dart - Redesign main_tab_screen: bottom nav with brand colors and shadow - Redesign home_screen: big number nutrition summary, card-based layout - Redesign food_add_screen: clean input forms with token colors - Redesign calendar_screen: shadow cards, MealChip, day summary section - Redesign report_screen: SegmentedControl tabs, donut chart, stat cards - Redesign recommend_screen: filter chips, recommendation cards with shadows - Redesign ai_chat_screen: chat bubbles, rich text rendering, quick chips - Add DESIGN_PROGRESS.md tracking all 8 screens completion Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Toss TDS 디자인 시스템 전체 화면 적용 - report_screen: toss UI + DB 데이터 연동 통합 유지
fix: 빌드 오류 수정 (Container color+decoration, image_picker, MealEntity.p…
- main_tab_screen.dart: toss-design 병합으로 사라진 설정(SettingsScreen) 탭 복원 - docs/progress.md: 작업 진행사항 추적 문서 추가 - CLAUDE.md: 프로젝트 지시사항 추가
fix: 설정 탭 복원 및 진행사항 문서 추가
[codex] Harden RAG recommendation pipeline
- _allergenKeywords 매핑 (11개 알레르겐 × 키워드 목록) - _detectAllergens() 헬퍼 — 음식명 × 사용자 알레르기 교차 탐지 - _AllergyWarningBanner — 알레르기 음식 있을 때 빨간 배너 표시 - _DetectedFoodRow — 개별 음식에 알레르기 뱃지 + 성분 텍스트 표시
- _kCategoryMeta: 5개 카테고리(전체/다이어트/기호별/질환맞춤/건강기능식품) 메타데이터 - _CategoryBanner: 카테고리 선택 시 아이콘+설명 배너 표시 - _RecommendFeed에 selectedCategory 파라미터 추가
- _WeeklyNutrAvg: 기록된 날 기준 탄/단/지 일 평균 + 목표 대비 진행 바 - _NutrAvgRow: 목표 초과 시 빨간색으로 강조 - _WeeklyTipCard: 영양소 패턴 기반 AI 주간 인사이트 메시지 - _MonthlyInsightCard: 월 평균 칼로리 평가 + 베스트 데이 하이라이트
Feat/allergy warning and features
- docs/architecture.md: RAG 파이프라인·알레르기·리포트 Mermaid 다이어그램 추가 (발표용) - server/tests/test_recommendation_pipeline.py: 순수 함수 29개 단위 테스트 추가 - server/services/recommendation_pipeline.py: normalize_goal 체중 유지 → maintenance 오분류 버그 수정 - app/lib/screens/food_add_screen.dart: 알레르기 키워드 맵을 설정 화면 11개 카테고리와 정합
e5f862f to
d0f21f7
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.