# odiazca/sistema_restaurante architecture

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

- Interactive diagram: https://gitdiagram.com/odiazca/sistema_restaurante
- Repository: https://github.com/odiazca/sistema_restaurante

## Overview

Restaurante is a Laravel restaurant-management and point-of-sale application. Staff enter through web routes to manage tables and reservations, build orders, complete sales, and handle delivery; the same application supports kitchen operations, inventory, cash registers, electronic billing, reporting, and configuration. The sampled POS controller shows order creation, stock deductions, and SUNAT submission; the model layer represents the principal business records. Several feature controllers are present in the tree but were not sampled, so their internal links are omitted rather than inferred.

Main entry points: [`restaurante/routes/web.php`](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/routes/web.php) (Web routes), [`restaurante/app/Http/Controllers/PosController.php`](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/PosController.php) (Point of sale), [`restaurante/app/Models/Order.php`](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Order.php) (Orders and items), [`restaurante/app/Http/Controllers/DashboardController.php`](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/DashboardController.php) (Dashboard)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_front["Web entry"]
  node_web_routes["Web routes<br/>[web.php]"]
end

subgraph group_operations["Restaurant operations"]
  node_pos["Point of sale<br/>[PosController.php]"]
  node_delivery["Delivery management"]
  node_kitchen["Kitchen operations"]
  node_reservations["Reservations"]
  node_catalog["Products and catalog"]
  node_inventory[("Inventory records<br/>[InventoryLog.php]")]
  node_order_data[("Orders and items<br/>[Order.php]")]
  node_table_data[("Tables and areas<br/>[Table.php]")]
  node_reservation_data[("Reservation records<br/>[Reservation.php]")]
  node_delivery_data[("Delivery records<br/>[Delivery.php]")]
  node_clients[("Client records<br/>[Client.php]")]
end

subgraph group_finance["Sales and finance"]
  node_sales["Sales and billing<br/>[SaleController.php]"]
  node_cash[("Cash registers<br/>[CashRegister.php]")]
  node_credit_notes["Credit notes"]
  node_sunat["SUNAT integration<br/>[SunatService.php]"]
end

subgraph group_insights["Management"]
  node_dashboard["Dashboard"]
  node_reports["Reports"]
  node_settings[("Application settings<br/>[Setting.php]")]
end

node_staff(("Staff"))

node_staff -->|"uses"| node_web_routes
node_web_routes -->|"routes to"| node_pos
node_web_routes -->|"routes to"| node_delivery
node_web_routes -->|"routes to"| node_kitchen
node_web_routes -->|"routes to"| node_reservations
node_web_routes -->|"routes to"| node_catalog
node_web_routes -->|"routes to"| node_sales
node_web_routes -->|"routes to"| node_credit_notes
node_web_routes -->|"routes to"| node_dashboard
node_web_routes -->|"routes to"| node_reports
node_pos -->|"creates and updates"| node_order_data
node_pos -->|"reads tables"| node_table_data
node_pos -->|"loads products"| node_catalog
node_pos -->|"logs stock changes"| node_inventory
node_pos -->|"submits invoices"| node_sunat
node_pos -->|"loads clients"| node_clients
node_delivery -->|"creates and updates"| node_delivery_data
node_delivery -->|"creates orders"| node_order_data
node_delivery -->|"logs stock changes"| node_inventory
node_delivery -->|"loads clients"| node_clients
node_dashboard -->|"queries sales"| node_order_data
node_dashboard -->|"loads table status"| node_table_data
node_dashboard -->|"counts reservations"| node_reservation_data
node_dashboard -->|"reads configuration"| node_settings
node_dashboard -->|"renders dashboard"| node_staff
node_order_data -->|"belongs to"| node_table_data
node_order_data -->|"belongs to"| node_clients
node_order_data -->|"belongs to"| node_cash
node_table_data -->|"has reservations"| node_reservation_data
node_sunat -->|"stores billing status"| node_order_data

click node_web_routes "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/routes/web.php"
click node_pos "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/PosController.php"
click node_delivery "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/DeliveryController.php"
click node_kitchen "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/KitchenController.php"
click node_reservations "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/ReservationController.php"
click node_catalog "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/ProductController.php"
click node_inventory "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/InventoryLog.php"
click node_order_data "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Order.php"
click node_table_data "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Table.php"
click node_reservation_data "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Reservation.php"
click node_delivery_data "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Delivery.php"
click node_clients "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Client.php"
click node_sales "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/SaleController.php"
click node_cash "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/CashRegister.php"
click node_credit_notes "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/CreditNoteController.php"
click node_sunat "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Services/Sunat/SunatService.php"
click node_dashboard "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/DashboardController.php"
click node_reports "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/ReportController.php"
click node_settings "https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Setting.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 toneBlue
class node_pos,node_delivery,node_kitchen,node_reservations,node_catalog,node_inventory,node_order_data,node_table_data,node_reservation_data,node_delivery_data,node_clients toneAmber
class node_sales,node_cash,node_credit_notes,node_sunat toneMint
class node_dashboard,node_reports,node_settings toneRose
class node_staff toneIndigo
```

## Components

### Web entry

- [Web routes](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/routes/web.php): `restaurante/routes/web.php`

### Restaurant operations

- [Point of sale](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/PosController.php): `restaurante/app/Http/Controllers/PosController.php`
- [Delivery management](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/DeliveryController.php): `restaurante/app/Http/Controllers/DeliveryController.php`
- [Kitchen operations](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/KitchenController.php): `restaurante/app/Http/Controllers/KitchenController.php`
- [Reservations](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/ReservationController.php): `restaurante/app/Http/Controllers/ReservationController.php`
- [Products and catalog](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/ProductController.php): `restaurante/app/Http/Controllers/ProductController.php`
- [Inventory records](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/InventoryLog.php): `restaurante/app/Models/InventoryLog.php`
- [Orders and items](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Order.php): `restaurante/app/Models/Order.php`
- [Tables and areas](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Table.php): `restaurante/app/Models/Table.php`
- [Reservation records](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Reservation.php): `restaurante/app/Models/Reservation.php`
- [Delivery records](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Delivery.php): `restaurante/app/Models/Delivery.php`
- [Client records](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Client.php): `restaurante/app/Models/Client.php`

### Sales and finance

- [Sales and billing](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/SaleController.php): `restaurante/app/Http/Controllers/SaleController.php`
- [Cash registers](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/CashRegister.php): `restaurante/app/Models/CashRegister.php`
- [Credit notes](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/CreditNoteController.php): `restaurante/app/Http/Controllers/CreditNoteController.php`
- [SUNAT integration](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Services/Sunat/SunatService.php): `restaurante/app/Services/Sunat/SunatService.php`

### Management

- [Dashboard](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/DashboardController.php): `restaurante/app/Http/Controllers/DashboardController.php`
- [Reports](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Http/Controllers/ReportController.php): `restaurante/app/Http/Controllers/ReportController.php`
- [Application settings](https://github.com/odiazca/sistema_restaurante/blob/main/restaurante/app/Models/Setting.php): `restaurante/app/Models/Setting.php`

### Other components

- **Staff**

## Connections

- Staff → Web routes: uses (evidence: `restaurante/routes/web.php`)
- Web routes → Point of sale: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Delivery management: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Kitchen operations: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Reservations: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Products and catalog: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Sales and billing: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Credit notes: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Dashboard: routes to (evidence: `restaurante/routes/web.php`)
- Web routes → Reports: routes to (evidence: `restaurante/routes/web.php`)
- Point of sale → Orders and items: creates and updates (evidence: `restaurante/app/Http/Controllers/PosController.php`)
- Point of sale → Tables and areas: reads tables (evidence: `restaurante/app/Http/Controllers/PosController.php`)
- Point of sale → Products and catalog: loads products (evidence: `restaurante/app/Http/Controllers/PosController.php`)
- Point of sale → Inventory records: logs stock changes (evidence: `restaurante/app/Http/Controllers/PosController.php`)
- Point of sale → SUNAT integration: submits invoices (evidence: `restaurante/app/Http/Controllers/PosController.php`)
- Point of sale → Client records: loads clients (evidence: `restaurante/app/Http/Controllers/PosController.php`)
- Delivery management → Delivery records: creates and updates (evidence: `restaurante/app/Http/Controllers/DeliveryController.php`)
- Delivery management → Orders and items: creates orders (evidence: `restaurante/app/Http/Controllers/DeliveryController.php`)
- Delivery management → Inventory records: logs stock changes (evidence: `restaurante/app/Http/Controllers/DeliveryController.php`)
- Delivery management → Client records: loads clients (evidence: `restaurante/app/Http/Controllers/DeliveryController.php`)
- Dashboard → Orders and items: queries sales (evidence: `restaurante/app/Http/Controllers/DashboardController.php`)
- Dashboard → Tables and areas: loads table status (evidence: `restaurante/app/Http/Controllers/DashboardController.php`)
- Dashboard → Reservation records: counts reservations (evidence: `restaurante/app/Http/Controllers/DashboardController.php`)
- Dashboard → Application settings: reads configuration (evidence: `restaurante/app/Http/Controllers/DashboardController.php`)
- Dashboard → Staff: renders dashboard (evidence: `restaurante/app/Http/Controllers/DashboardController.php`)
- Orders and items → Tables and areas: belongs to (evidence: `restaurante/app/Models/Order.php`)
- Orders and items → Client records: belongs to (evidence: `restaurante/app/Models/Order.php`)
- Orders and items → Cash registers: belongs to (evidence: `restaurante/app/Models/Order.php`)
- Tables and areas → Reservation records: has reservations (evidence: `restaurante/app/Models/Table.php`)
- SUNAT integration → Orders and items: stores billing status (evidence: `restaurante/app/Services/Sunat/SunatService.php`)
