How chiadan/yearwhat2eat works
YeahWhat2Eat is a personalized recipe-recommendation and cooking Q&A app. Its main path runs from a user’s chat or recommendation request through the Vue client and FastAPI chat endpoint into chat_service and the RAG graph, which analyzes intent, retrieves and ranks recipe knowledge, then streams an answer. Separate branches cover recipe browsing, accounts and personalization, feedback, and recipe-data ingestion. The graph reflects README-described capabilities; several internal links are dashed because their implementation was not sampled.
Main entry points: chat_service.py Chat orchestration · chat.py Chat endpoint · factory.py Storage factory · runner.py Recipe ingestion
Components 28
Web client
- Vue application
frontend/src/App.vue - Chat interface
frontend/src/views/ChatView.vue - Stream renderer
frontend/src/components/StreamChat.vue - HTTP client
frontend/src/api/http.ts - Chat API client
frontend/src/api/chat.ts
API and services
- API router
backend/app/api/v1/router.py - Chat endpoint
backend/app/api/v1/chat.py - Chat orchestration
backend/app/services/chat_service.py - Recipe endpoints
backend/app/api/v1/dishes.py - Recipe service
backend/app/services/dish_service.py - Feedback and favorites
backend/app/services/feedback_service.py - Profile service
backend/app/services/profile_service.py
RAG and recommendation
- Menu recommendations
backend/app/services/recommend_service.py - RAG graph
backend/app/rag/graph.py - Analysis and retrieval stages
backend/app/rag/nodes - Vector retriever
backend/app/rag/retrievers/vector_retriever.py - Preference rule engine
backend/app/rag/rule_engine.py
Recipe knowledge
- Recipe ingestion
backend/app/pipeline/runner.py - Recipe parser
backend/app/pipeline/parser.py - Vector indexer
backend/app/pipeline/vector_indexer.py
State and integrations
- Relational data
backend/app/db/models.py - Database sessions
backend/app/db/session.py - LLM client
backend/app/core/clients/llm.py - Embedding client
backend/app/core/clients/embedding.py - Storage factory
backend/app/core/clients/factory.py - Vector store
backend/app/core/clients/qdrant.py
Other components
- User
- LLM provider
Connections 31
- User → Chat interface: asks or recommends
README.md - Chat interface → Chat API client: submits prompts
frontend/src/views/ChatView.vue - Chat API client → HTTP client: uses transport
frontend/src/api/chat.ts - HTTP client → Chat endpoint: sends API requests
- Chat endpoint → Chat orchestration: delegates chat
backend/app/api/v1/chat.py - Chat orchestration → RAG graph: runs agent
backend/app/services/chat_service.py - RAG graph → Analysis and retrieval stages: dispatches stages
- Analysis and retrieval stages → Vector retriever: retrieves recipes
- Vector retriever → Embedding client: encodes queries
backend/app/rag/retrievers/vector_retriever.py - Vector retriever → Storage factory: builds store
backend/app/rag/retrievers/vector_retriever.py - Storage factory → Vector store: selects provider
backend/app/core/clients/factory.py - Analysis and retrieval stages → Preference rule engine: filters preferences
- Chat orchestration → LLM client: generates response
backend/app/services/chat_service.py - LLM client → LLM provider: calls model
backend/app/core/clients/llm.py - Chat orchestration → Stream renderer: streams answer
README.md - Stream renderer → User: shows response
README.md - API router → Chat endpoint: registers route
backend/app/api/v1/router.py - API router → Recipe endpoints: registers route
backend/app/api/v1/router.py - Recipe endpoints → Recipe service: delegates recipes
backend/app/api/v1/dishes.py - Recipe endpoints → Feedback and favorites: records feedback
backend/app/api/v1/dishes.py - Feedback and favorites → Profile service: recalculates profile
backend/app/services/feedback_service.py - Feedback and favorites → Storage factory: mirrors preferences
backend/app/services/feedback_service.py - Chat endpoint → Menu recommendations: routes recommendations
backend/app/api/v1/chat.py - Menu recommendations → Preference rule engine: applies hard filters
- Recipe ingestion → Recipe parser: parses source
- Recipe ingestion → Vector indexer: builds indexes
- Recipe ingestion → Relational data: stores recipe metadata
- Vector indexer → Embedding client: creates vectors
- Vector indexer → Storage factory: builds vector store
- Database sessions → Relational data: opens sessions
backend/app/db/session.py - Chat orchestration → Profile service: uses user profile
backend/app/services/chat_service.py