# munlaly/webgurus-nyarigyak-1csoport architecture

> Architecture diagram of the GitHub repository munlaly/webgurus-nyarigyak-1csoport, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/munlaly/webgurus-nyarigyak-1csoport
- Repository: https://github.com/munlaly/webgurus-nyarigyak-1csoport

## Overview

#### Purpose and Shape
This is an early-stage meal-planning and recipe/inventory application built on Laravel. The domain schema exists, but HTTP controllers and application routes are effectively skeletal. A separate Nuxt frontend is scaffolded, while Laravel also retains its default Vite/Vue frontend scaffold.

#### Entry Points and Runtime
Laravel serves HTTP requests through `public/index.php`, bootstraps application bindings and middleware in `bootstrap/app.php`, and defines web endpoints in `routes/web.php`. CLI and scheduled/console commands enter through `artisan` and `routes/console.php`.

The backend runtime is PHP/Laravel with Composer dependencies (`composer.json`). Local development is configured for DDEV in `.ddev/config.yaml`. The browser-facing frontend may be independently run as Nuxt from `frontend/nuxt.config.ts`.

#### Domain Persistence Model
Eloquent models define the core meal-planning data graph:
- Recipe catalog and classification: `app/Models/Recipes.php`, `app/Models/Category.php`, `app/Models/Ingredients.php`.
- Recipe-to-ingredient association: `app/Models/RecipeIngredient.php`.
- Per-user state: `app/Models/User.php`, `app/Models/UserInventory.php`, `app/Models/UserSettings.php`.
- Planned meals: `app/Models/MealPlan.php`.

Database structure is authored through corresponding migrations, especially `database/migrations/2026_08_06_205202_create_recipes_table.php`, `database/migrations/2026_08_06_205230_create_recipe_ingredients_table.php`, and `database/migrations/2026_08_06_205301_create_meal_plans_table.php`.

#### Primary Intended Data Flow
The intended business flow is: authenticated user → user settings and inventory → select recipes composed of ingredients → create meal-plan records. Recipe ingredients form the key boundary between the global recipe catalog and user-specific inventory/planning data. Persistence is mediated by Laravel Eloquent models, with connection settings centralized in `config/database.php`.

No domain orchestration layer, API controllers, or concrete request handlers are present beyond the base `app/Http/Controllers/Controller.php`; implementing these is the main missing application layer.

#### Authentication and User Boundary
Laravel’s standard user foundation is present in `app/Models/User.php` and `database/migrations/0001_01_01_000000_create_users_table.php`. Authentication behavior is configured in `config/auth.php`. User-owned inventory, settings, and plans should be authorization-scoped at the controller/service boundary before querying or mutating their associated models.

#### Presentation Boundaries
Two frontend paths coexist:
- Laravel/Vite/Vue scaffold: `resources/js/app.js`, `resources/js/App.vue`, `vite.config.js`.
- Standalone Nuxt application scaffold: `frontend/app/app.vue`, `frontend/nuxt.config.ts`.

Neither tree, from the available structure, establishes an explicit backend API contract. Decide whether Nuxt consumes Laravel APIs or whether Laravel serves the Vite application before extending UI work, to avoid parallel frontend ownership.

#### Platform Services
Laravel configuration exposes database, cache, sessions, filesystem storage, mail, logging, and queues through `config/database.php`, `config/cache.php`, `config/session.php`, `config/filesystems.php`, `config/mail.php`, and `config/queue.php`. Default cache and jobs schema migrations exist, so asynchronous work can be introduced for future plan generation or notifications, but no jobs are currently implemented.

Main entry points: [`app/Models/User.php`](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/User.php) (Users and preferences), [`app/Http/Controllers/Controller.php`](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Http/Controllers/Controller.php) (Controller boundary), [`app/Models/RecipeIngredient.php`](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/RecipeIngredient.php) (Recipe ingredients), [`routes/web.php`](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/routes/web.php) (Web routes)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_backend["Laravel runtime"]
  node_http_entry["HTTP entry<br/>PHP entrypoint<br/>[index.php]"]
  node_laravel_bootstrap["Application bootstrap<br/>Laravel bootstrap<br/>[app.php]"]
  node_web_routes["Web routes<br/>route definitions<br/>[web.php]"]
  node_controller_boundary["Controller boundary<br/>base controller<br/>[Controller.php]"]
  node_cli_entry["CLI entry<br/>Artisan entrypoint"]
  node_console_routes["Console commands<br/>console routes<br/>[console.php]"]
  node_auth["Authentication<br/>auth configuration<br/>[auth.php]"]
end

subgraph group_domain["Meal-planning domain"]
  node_eloquent{{"Eloquent persistence<br/>ORM models"}}
  node_users["Users and preferences<br/>user models<br/>[User.php]"]
  node_inventory["User inventory<br/>inventory model<br/>[UserInventory.php]"]
  node_settings["User settings<br/>settings model<br/>[UserSettings.php]"]
  node_recipe_catalog["Recipe catalog<br/>recipe models<br/>[Recipes.php]"]
  node_recipe_ingredients["Recipe ingredients<br/>association model"]
  node_meal_plans["Meal plans<br/>planning model<br/>[MealPlan.php]"]
  node_database[("Application database<br/>[database.php]")]
  node_schema_migrations["Domain schema<br/>migrations"]
end

subgraph group_frontend["Frontend options"]
  node_vite_vue["Laravel Vite/Vue scaffold<br/>embedded frontend<br/>[app.js]"]
  node_nuxt["Standalone Nuxt scaffold<br/>frontend application<br/>[nuxt.config.ts]"]
end

node_http_entry -->|"boots"| node_laravel_bootstrap
node_laravel_bootstrap -->|"loads"| node_web_routes
node_web_routes -.->|"should dispatch to"| node_controller_boundary
node_controller_boundary -.->|"authenticates and scopes"| node_auth
node_controller_boundary -.->|"orchestrates"| node_eloquent
node_cli_entry -->|"loads"| node_console_routes
node_auth -->|"identifies"| node_users
node_eloquent -->|"persists"| node_users
node_eloquent -->|"persists"| node_recipe_catalog
node_eloquent -->|"persists"| node_recipe_ingredients
node_eloquent -->|"persists"| node_meal_plans
node_users -->|"owns"| node_inventory
node_users -->|"owns"| node_settings
node_users -->|"owns"| node_meal_plans
node_recipe_catalog -->|"composed of"| node_recipe_ingredients
node_recipe_ingredients -->|"matches against"| node_inventory
node_recipe_ingredients -->|"informs selection"| node_meal_plans
node_eloquent -->|"reads and writes"| node_database
node_schema_migrations -->|"defines"| node_database
node_vite_vue -.->|"possible Laravel-served UI"| node_web_routes
node_nuxt -.->|"requires API contract"| node_controller_boundary

click node_http_entry "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/public/index.php"
click node_laravel_bootstrap "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/bootstrap/app.php"
click node_web_routes "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/routes/web.php"
click node_controller_boundary "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Http/Controllers/Controller.php"
click node_cli_entry "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/artisan"
click node_console_routes "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/routes/console.php"
click node_auth "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/config/auth.php"
click node_users "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/User.php"
click node_inventory "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/UserInventory.php"
click node_settings "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/UserSettings.php"
click node_recipe_catalog "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/Recipes.php"
click node_recipe_ingredients "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/RecipeIngredient.php"
click node_meal_plans "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/MealPlan.php"
click node_database "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/config/database.php"
click node_schema_migrations "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/database/migrations/2026_08_06_205202_create_recipes_table.php"
click node_vite_vue "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/resources/js/app.js"
click node_nuxt "https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/frontend/nuxt.config.ts"

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_http_entry,node_laravel_bootstrap,node_web_routes,node_controller_boundary,node_cli_entry,node_console_routes,node_auth toneBlue
class node_eloquent,node_users,node_inventory,node_settings,node_recipe_catalog,node_recipe_ingredients,node_meal_plans,node_database,node_schema_migrations toneAmber
class node_vite_vue,node_nuxt toneMint
```

## Components

### Laravel runtime

- [HTTP entry](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/public/index.php): PHP entrypoint · `public/index.php`
- [Application bootstrap](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/bootstrap/app.php): Laravel bootstrap · Registers application bindings and middleware. · `bootstrap/app.php`
- [Web routes](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/routes/web.php): route definitions · Endpoints are currently skeletal. · `routes/web.php`
- [Controller boundary](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Http/Controllers/Controller.php): base controller · Missing request orchestration and ownership authorization belong here. · `app/Http/Controllers/Controller.php`
- [CLI entry](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/artisan): Artisan entrypoint · `artisan`
- [Console commands](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/routes/console.php): console routes · `routes/console.php`
- [Authentication](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/config/auth.php): auth configuration · `config/auth.php`

### Meal-planning domain

- **Eloquent persistence**: ORM models · Mediates domain reads and writes.
- [Users and preferences](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/User.php): user models · User identity, settings, and inventory ownership. · `app/Models/User.php`
- [User inventory](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/UserInventory.php): inventory model · `app/Models/UserInventory.php`
- [User settings](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/UserSettings.php): settings model · `app/Models/UserSettings.php`
- [Recipe catalog](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/Recipes.php): recipe models · Recipes, categories, and ingredients are global catalog data. · `app/Models/Recipes.php`
- [Recipe ingredients](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/RecipeIngredient.php): association model · Connects recipes to ingredients and is the catalog-to-planning boundary. · `app/Models/RecipeIngredient.php`
- [Meal plans](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/app/Models/MealPlan.php): planning model · User-owned planned meal records. · `app/Models/MealPlan.php`
- [Application database](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/config/database.php): database · Connection configuration is centralized in Laravel. · `config/database.php`
- [Domain schema](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/database/migrations/2026_08_06_205202_create_recipes_table.php): migrations · Creates recipe, recipe-ingredient, meal-plan, and user tables. · `database/migrations/2026_08_06_205202_create_recipes_table.php`

### Frontend options

- [Laravel Vite/Vue scaffold](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/resources/js/app.js): embedded frontend · Alternative browser UI path served by Laravel. · `resources/js/app.js`
- [Standalone Nuxt scaffold](https://github.com/munlaly/webgurus-nyarigyak-1csoport/blob/main/frontend/nuxt.config.ts): frontend application · Its backend API contract is not yet defined. · `frontend/nuxt.config.ts`

## Connections

- HTTP entry → Application bootstrap: boots
- Application bootstrap → Web routes: loads
- Web routes → Controller boundary: should dispatch to
- Controller boundary → Authentication: authenticates and scopes
- Controller boundary → Eloquent persistence: orchestrates
- CLI entry → Console commands: loads
- Authentication → Users and preferences: identifies
- Eloquent persistence → Users and preferences: persists
- Eloquent persistence → Recipe catalog: persists
- Eloquent persistence → Recipe ingredients: persists
- Eloquent persistence → Meal plans: persists
- Users and preferences → User inventory: owns
- Users and preferences → User settings: owns
- Users and preferences → Meal plans: owns
- Recipe catalog → Recipe ingredients: composed of
- Recipe ingredients → User inventory: matches against
- Recipe ingredients → Meal plans: informs selection
- Eloquent persistence → Application database: reads and writes
- Domain schema → Application database: defines
- Laravel Vite/Vue scaffold → Web routes: possible Laravel-served UI
- Standalone Nuxt scaffold → Controller boundary: requires API contract
