feat: sync NutriHelp-AI routers to Nutrihelp-api (6 remaining routes)#275
Merged
Conversation
Port remaining 6 AI routers from NutriHelp-AI (Python/FastAPI) into
Nutrihelp-api (Node/Express) as JavaScript re-implementations:
- routes/ai/medicalReport.js — POST /ai-model/medical-report/retrieve
- routes/ai/imageAnalysis.js — POST /ai-model/image-analysis/image-analysis
POST /ai-model/image-analysis/multi-image-analysis
- routes/ai/mealLog.js — 7 endpoints under /ai-model/meals/*
- routes/ai/mealPlan.js — POST /ai-model/meal-plan/generate
- routes/ai/finetuneChat.js — GET/POST /ai-model/chatbot-finetune/*
- services/mealLogService.js — JSON file-based meal log storage
- services/nutritionLookupService.js — nutrition lookup (EXACT + keyword fallback)
- data/meal_library.json — meal database for plan generation
- routes/index.js — register all 5 new route prefixes
- .gitignore — allow data/meal_library.json to be tracked
All 8 NutriHelp-AI routers are now available under /ai-model/* on Nutrihelp-api.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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.
Summary
/ai-model/*prefix for compatibility with the mobile app (NutriHelp-App-2026)New files
routes/ai/medicalReport.jsPOST /ai-model/medical-report/retrieveroutes/ai/imageAnalysis.jsPOST /ai-model/image-analysis/image-analysis·POST /ai-model/image-analysis/multi-image-analysisroutes/ai/mealLog.js/ai-model/meals/*(log-scan, logs, daily-summary, chat-context, plan-context, delete)routes/ai/mealPlan.jsPOST /ai-model/meal-plan/generate— full port of meal_generator.py with allergy/condition filtering and scoringroutes/ai/finetuneChat.jsGET /ai-model/chatbot-finetune/healthz·POST /ai-model/chatbot-finetune/chat(proxies HuggingFace Space)services/mealLogService.jsservices/nutritionLookupService.jsdata/meal_library.jsonModified files
routes/index.js— register 5 new/ai-model/*route prefixes.gitignore— add!data/meal_library.jsonexception so the meal library is trackedTest plan
POST /ai-model/medical-report/retrieve— returns medical predictionPOST /ai-model/image-analysis/image-analysis— single image classificationPOST /ai-model/image-analysis/multi-image-analysis— multi-image classificationPOST /ai-model/meals/log-scan— creates meal log entry, returns entry + daily summaryGET /ai-model/meals/logs?date=&user_id=— list meal logsGET /ai-model/meals/daily-summary— returns calorie totals and breakdownPOST /ai-model/meal-plan/generate— returns full day plan with rationaleGET /ai-model/chatbot-finetune/healthz— HuggingFace Space health checkPOST /ai-model/chatbot-finetune/chat— fine-tuned chatbot response