# esquitef/combos-comida architecture

> Architecture diagram of the GitHub repository esquitef/combos-comida, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-22). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/esquitef/combos-comida
- Repository: https://github.com/esquitef/combos-comida

## Overview

ComiBox is a session-scoped meal-planning web application: users choose available ingredients and preferences, generate a meal combo or multi-day plan, then view meals and missing ingredients as a shopping list. The graph shows routes, controllers, generation services, catalog models, and result views. Source excerpts support the core calls and rendering; unsampled catalog and persistence details are represented at the model-directory level, without assuming an external integration.

Main entry points: [`app/Http/Controllers/ComboController.php`](https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/ComboController.php) (Combo controller), [`app/Services/ComboGeneratorService.php`](https://github.com/esquitef/combos-comida/blob/main/app/Services/ComboGeneratorService.php) (Combo generator), [`routes/web.php`](https://github.com/esquitef/combos-comida/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/PlanController.php`](https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/PlanController.php) (Plan controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and UI"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_app_bootstrap["Laravel entry<br/>[app.php]"]
  node_combo_controller["Combo controller"]
  node_plan_controller["Plan controller<br/>[PlanController.php]"]
  node_about_controller["About page handler"]
  node_combo_views["Combo screens<br/>[index.blade.php]"]
  node_about_view["About screen<br/>[acerca.blade.php]"]
end

subgraph group_generation["Meal generation"]
  node_combo_generator["Combo generator"]
  node_weekly_planner["Weekly planner"]
end

subgraph group_catalog["Food catalog"]
  node_catalog_models["Catalog and meal models"]
end

subgraph group_planning["Plans and results"]
  node_combo_result["Combo result screen<br/>[show.blade.php]"]
  node_history_view["History screen"]
  node_plan_view["Weekly plan screen<br/>[show.blade.php]"]
  node_combo_model["Combo records<br/>[Combo.php]"]
  node_meal_plan_model["Meal plan records<br/>[MealPlan.php]"]
  node_shopping_list_model["Shopping list records<br/>[ShoppingList.php]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests pages"| node_web_routes
node_app_bootstrap -->|"loads routes"| node_web_routes
node_web_routes -->|"routes requests"| node_combo_controller
node_web_routes -->|"routes requests"| node_plan_controller
node_web_routes -->|"routes requests"| node_about_controller
node_combo_controller -->|"loads catalog"| node_catalog_models
node_combo_controller -->|"generates and saves"| node_combo_generator
node_combo_controller -->|"renders form"| node_combo_views
node_combo_controller -->|"renders result"| node_combo_result
node_combo_controller -->|"renders history"| node_history_view
node_plan_controller -->|"generates and saves"| node_weekly_planner
node_plan_controller -->|"renders plan"| node_plan_view
node_about_controller -->|"counts catalog"| node_catalog_models
node_about_controller -->|"renders about"| node_about_view
node_combo_generator -->|"loads dishes"| node_catalog_models
node_combo_generator -->|"persists combos"| node_combo_model
node_combo_generator -->|"persists missing items"| node_shopping_list_model
node_weekly_planner -->|"requests daily combos"| node_combo_generator
node_weekly_planner -->|"creates plan"| node_meal_plan_model
node_weekly_planner -->|"saves daily combos"| node_combo_generator
node_plan_controller -->|"loads plan"| node_meal_plan_model

click node_web_routes "https://github.com/esquitef/combos-comida/blob/main/routes/web.php"
click node_app_bootstrap "https://github.com/esquitef/combos-comida/blob/main/bootstrap/app.php"
click node_combo_controller "https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/ComboController.php"
click node_plan_controller "https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/PlanController.php"
click node_about_controller "https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/AcercaController.php"
click node_combo_views "https://github.com/esquitef/combos-comida/blob/main/resources/views/combos/index.blade.php"
click node_combo_result "https://github.com/esquitef/combos-comida/blob/main/resources/views/combos/show.blade.php"
click node_history_view "https://github.com/esquitef/combos-comida/blob/main/resources/views/combos/historial.blade.php"
click node_plan_view "https://github.com/esquitef/combos-comida/blob/main/resources/views/planes/show.blade.php"
click node_about_view "https://github.com/esquitef/combos-comida/blob/main/resources/views/acerca.blade.php"
click node_combo_generator "https://github.com/esquitef/combos-comida/blob/main/app/Services/ComboGeneratorService.php"
click node_weekly_planner "https://github.com/esquitef/combos-comida/blob/main/app/Services/PlanSemanalService.php"
click node_catalog_models "https://github.com/esquitef/combos-comida/tree/main/app/Models"
click node_combo_model "https://github.com/esquitef/combos-comida/blob/main/app/Models/Combo.php"
click node_meal_plan_model "https://github.com/esquitef/combos-comida/blob/main/app/Models/MealPlan.php"
click node_shopping_list_model "https://github.com/esquitef/combos-comida/blob/main/app/Models/ShoppingList.php"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_web_routes,node_app_bootstrap,node_combo_controller,node_plan_controller,node_about_controller,node_combo_views,node_about_view toneBlue
class node_combo_generator,node_weekly_planner toneAmber
class node_catalog_models toneMint
class node_combo_result,node_history_view,node_plan_view,node_combo_model,node_meal_plan_model,node_shopping_list_model toneRose
class node_visitor toneIndigo
```

## Components

### Web entry and UI

- [Web routes](https://github.com/esquitef/combos-comida/blob/main/routes/web.php): `routes/web.php`
- [Laravel entry](https://github.com/esquitef/combos-comida/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Combo controller](https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/ComboController.php): `app/Http/Controllers/ComboController.php`
- [Plan controller](https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/PlanController.php): `app/Http/Controllers/PlanController.php`
- [About page handler](https://github.com/esquitef/combos-comida/blob/main/app/Http/Controllers/AcercaController.php): `app/Http/Controllers/AcercaController.php`
- [Combo screens](https://github.com/esquitef/combos-comida/blob/main/resources/views/combos/index.blade.php): `resources/views/combos/index.blade.php`
- [About screen](https://github.com/esquitef/combos-comida/blob/main/resources/views/acerca.blade.php): `resources/views/acerca.blade.php`

### Meal generation

- [Combo generator](https://github.com/esquitef/combos-comida/blob/main/app/Services/ComboGeneratorService.php): `app/Services/ComboGeneratorService.php`
- [Weekly planner](https://github.com/esquitef/combos-comida/blob/main/app/Services/PlanSemanalService.php): `app/Services/PlanSemanalService.php`

### Food catalog

- [Catalog and meal models](https://github.com/esquitef/combos-comida/tree/main/app/Models): `app/Models`

### Plans and results

- [Combo result screen](https://github.com/esquitef/combos-comida/blob/main/resources/views/combos/show.blade.php): `resources/views/combos/show.blade.php`
- [History screen](https://github.com/esquitef/combos-comida/blob/main/resources/views/combos/historial.blade.php): `resources/views/combos/historial.blade.php`
- [Weekly plan screen](https://github.com/esquitef/combos-comida/blob/main/resources/views/planes/show.blade.php): `resources/views/planes/show.blade.php`
- [Combo records](https://github.com/esquitef/combos-comida/blob/main/app/Models/Combo.php): `app/Models/Combo.php`
- [Meal plan records](https://github.com/esquitef/combos-comida/blob/main/app/Models/MealPlan.php): `app/Models/MealPlan.php`
- [Shopping list records](https://github.com/esquitef/combos-comida/blob/main/app/Models/ShoppingList.php): `app/Models/ShoppingList.php`

### Other components

- **Visitor**

## Connections

- Visitor → Web routes: requests pages (evidence: `routes/web.php`)
- Laravel entry → Web routes: loads routes (evidence: `bootstrap/app.php`)
- Web routes → Combo controller: routes requests (evidence: `routes/web.php`)
- Web routes → Plan controller: routes requests (evidence: `routes/web.php`)
- Web routes → About page handler: routes requests (evidence: `routes/web.php`)
- Combo controller → Catalog and meal models: loads catalog (evidence: `app/Http/Controllers/ComboController.php`)
- Combo controller → Combo generator: generates and saves (evidence: `app/Http/Controllers/ComboController.php`)
- Combo controller → Combo screens: renders form (evidence: `app/Http/Controllers/ComboController.php`)
- Combo controller → Combo result screen: renders result (evidence: `app/Http/Controllers/ComboController.php`)
- Combo controller → History screen: renders history (evidence: `app/Http/Controllers/ComboController.php`)
- Plan controller → Weekly planner: generates and saves (evidence: `app/Http/Controllers/PlanController.php`)
- Plan controller → Weekly plan screen: renders plan (evidence: `app/Http/Controllers/PlanController.php`)
- About page handler → Catalog and meal models: counts catalog (evidence: `app/Http/Controllers/AcercaController.php`)
- About page handler → About screen: renders about (evidence: `app/Http/Controllers/AcercaController.php`)
- Combo generator → Catalog and meal models: loads dishes (evidence: `app/Services/ComboGeneratorService.php`)
- Combo generator → Combo records: persists combos (evidence: `app/Services/ComboGeneratorService.php`)
- Combo generator → Shopping list records: persists missing items (evidence: `app/Services/ComboGeneratorService.php`)
- Weekly planner → Combo generator: requests daily combos (evidence: `app/Services/PlanSemanalService.php`)
- Weekly planner → Meal plan records: creates plan (evidence: `app/Services/PlanSemanalService.php`)
- Weekly planner → Combo generator: saves daily combos (evidence: `app/Services/PlanSemanalService.php`)
- Plan controller → Meal plan records: loads plan (evidence: `app/Http/Controllers/PlanController.php`)
