How jarrel-sit/26inf1103-p4-7 works
This is a command-line AI recipe planner. Users add pantry ingredients, select ingredients for a recipe, and provide dietary and allergy preferences; the application requests a recipe from Gemini, validates the response, applies business rules, scores and routes the result, then displays and saves it. Separate menu flows support viewing ingredients and filtering saved recipes. The graph follows calls shown in main.py and the sampled managers; README capabilities not clearly implemented in those excerpts are not expanded into extra components.
Main entry points: main.py Application workflows · io_manager.py Recipe and history views · ai_manager.py AI response processing · logic_manager.py Recipe rule evaluation
Components 13
CLI interaction
- Application menu
io_manager.py - Ingredient entry
io_manager.py - Recipe preferences
io_manager.py - Recipe and history views
io_manager.py
Recipe generation
- Application workflows
main.py - AI response processing
ai_manager.py
Safety and evaluation
- Recipe rule evaluation
logic_manager.py - Recipe scoring and routing
logic_manager.py
CSV persistence
- Ingredient CSV records
data_manager.py - Recipe CSV records
data_manager.py - Recipe history filters
data_manager.py
Other components
- CLI user
- Gemini API
Connections 19
- CLI user → Application menu: chooses options
io_manager.py - Application menu → Application workflows: dispatches choices
main.py - Application workflows → Ingredient entry: requests ingredients
main.py - Ingredient entry → Application workflows: returns entries
main.py - Application workflows → Ingredient CSV records: loads and saves
main.py - Application workflows → Recipe preferences: collects preferences
main.py - Recipe preferences → Application workflows: returns recipe inputs
main.py - Application workflows → AI response processing: requests recipe
main.py - AI response processing → Gemini API: sends prompt
ai_manager.py - Gemini API → AI response processing: streams response
ai_manager.py - Application workflows → Recipe rule evaluation: evaluates recipe
main.py - Recipe rule evaluation → Recipe scoring and routing: routes and scores
logic_manager.py - Application workflows → Recipe CSV records: saves recipe
main.py - Application workflows → Recipe and history views: displays result
main.py - CLI user → Recipe and history views: views history
- Application workflows → Recipe history filters: filters history
main.py - Recipe history filters → Recipe and history views: provides filtered records
main.py - Application workflows → Recipe CSV records: loads saved recipes
main.py - Application workflows → Recipe and history views: shows ingredients
main.py