How baba-ti/foodiea_remaster works
Foodia is a mobile meal-recommendation app backed by FastAPI and LangGraph. Its main flow combines a user’s request with preferences, restaurant history, date, and weather, then returns source-linked recipe suggestions; separate flows analyze ingredient photos and search for recipes. The README documents these capabilities and workflow stages. Several frontend screens and graph implementations were not sampled, so their internal links are included only where the README or source index supports them.
Main entry points: foodiaApi.js Foodia API client · app.py FastAPI app · AssistantHome.js AI assistant · ingredients.py Image analysis endpoint
Components 29
Mobile app
- App shell
frontend-expo/src/App.js - Navigation
frontend-expo/src/navigations/stack.js - AI assistant
frontend-expo/src/screens/AssistantHome.js - Foodia API client
frontend-expo/src/api/foodiaApi.js - Ingredient camera
frontend-expo/src/screens/CameraScreen.js - Confirm ingredients
frontend-expo/src/screens/IngredientConfirmScreen.js - Recipe results
frontend-expo/src/screens/RecipeListScreen.js - Recipe detail
frontend-expo/src/screens/RecipeDetail.js
Personalization
- Preference setup
frontend-expo/src/screens/FoodPreferencesOnboardingScreen.js - Food preferences
frontend-expo/src/context/FoodPreferencesContext.js - Recommendation context
frontend-expo/src/services/recommendationContext.js
Assistant workflow
- FastAPI app
backend/src/app.py - Recommendation endpoint
backend/src/routes/assistant.py - Context and recommendation
backend/src/workflows/foodia/nodes/assistant_nodes.py - Weather lookup
backend/src/services/weather_service.py - Recipe web search
backend/src/services/search_service.py
Food workflows
- Image analysis endpoint
backend/src/routes/ingredients.py - Ingredient workflow
backend/src/workflows/foodia/ingredient_graph.py - Image recognition
backend/src/workflows/foodia/nodes/ingredient_nodes.py - Vision model service
backend/src/services/image_service.py - Recipe search endpoint
backend/src/routes/recipes.py - Recipe workflow
backend/src/workflows/foodia/recipe_graph.py - Recipe validation
backend/src/workflows/foodia/nodes/recipe_nodes.py
Local records
- Restaurant diary
frontend-expo/src/screens/RestaurantDiaryScreen.js - Restaurant entry
frontend-expo/src/screens/RestaurantEntryScreen.js - Restaurant records
frontend-expo/src/storage/restaurantDatabase.js - Diary map
frontend-expo/src/components/RestaurantMap.js
Other components
- User
- OpenAI search
Connections 33
- User → App shell: uses
- App shell → Navigation: opens
frontend-expo/src/App.js - Navigation → Preference setup: routes
frontend-expo/src/navigations/stack.js - Navigation → AI assistant: routes
- Preference setup → Food preferences: saves
frontend-expo/src/screens/FoodPreferencesOnboardingScreen.js - AI assistant → Recommendation context: builds context
- Recommendation context → Restaurant records: reads history
frontend-expo/src/services/recommendationContext.js - Restaurant diary → Restaurant records: reads and writes
frontend-expo/src/screens/RestaurantDiaryScreen.js - Restaurant entry → Restaurant records: writes entries
frontend-expo/src/screens/RestaurantEntryScreen.js - Restaurant diary → Diary map: renders map
frontend-expo/src/screens/RestaurantDiaryScreen.js - AI assistant → Foodia API client: requests suggestions
- Ingredient camera → Foodia API client: submits image
frontend-expo/src/screens/CameraScreen.js - Foodia API client → FastAPI app: calls API
- FastAPI app → Recommendation endpoint: registers route
backend/src/app.py - Recommendation endpoint → Context and recommendation: starts workflow
backend/src/routes/assistant.py - Context and recommendation → Weather lookup: gets weather
backend/src/workflows/foodia/nodes/assistant_nodes.py - Context and recommendation → Recipe web search: searches recipes
backend/src/workflows/foodia/nodes/assistant_nodes.py - Recipe web search → OpenAI search: searches web
backend/src/services/search_service.py - Confirm ingredients → AI assistant: continues recommendation
- FastAPI app → Image analysis endpoint: registers route
backend/src/app.py - Image analysis endpoint → Ingredient workflow: starts workflow
backend/src/routes/ingredients.py - Image analysis endpoint → Vision model service: uses vision service
backend/src/routes/ingredients.py - Ingredient workflow → Image recognition: dispatches nodes
backend/src/workflows/foodia/ingredient_graph.py - Image recognition → Vision model service: analyzes image
- Foodia API client → Image analysis endpoint: requests analysis
- Ingredient camera → Confirm ingredients: shows candidates
- FastAPI app → Recipe search endpoint: registers route
backend/src/app.py - Recipe search endpoint → Recipe workflow: starts workflow
backend/src/routes/recipes.py - Recipe workflow → Recipe validation: dispatches nodes
- Recipe validation → Recipe web search: searches candidates
backend/src/workflows/foodia/nodes/recipe_nodes.py - Recipe validation → OpenAI search: optional verification
- Recipe results → Recipe detail: opens recipe
- Foodia API client → Recipe search endpoint: searches recipes