# andrade-bit/mina-andrade-andy architecture

> Architecture diagram of the GitHub repository andrade-bit/mina-andrade-andy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-09-30). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/andrade-bit/mina-andrade-andy
- Repository: https://github.com/andrade-bit/mina-andrade-andy

## Overview

This repository is a Laravel café point-of-sale and back-office application. Staff unlock the POS with a passcode, load products and cup sizes, then submit a sale; the terminal records the transaction and deducts ingredient and cup stock. Administrators manage catalog, inventory, purchasing, expenses, users, and sales reporting. The graph groups those workflows with their principal models. Several controller-to-model links are visible in the source index, but unsampled implementation details and database schema are not represented.

Main entry points: [`routes/web.php`](https://github.com/andrade-bit/mina-andrade-andy/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/Pos/TerminalController.php`](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Pos/TerminalController.php) (POS terminal), [`app/Models/InventoryItem.php`](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/InventoryItem.php) (Inventory items), [`app/Models/InventoryTransaction.php`](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/InventoryTransaction.php) (Stock movements)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Web entry and access"]
  node_web_routes["Web routes<br/>[web.php]"]
  node_admin_auth["Admin authentication"]
  node_pos_auth["POS passcode"]
  node_credentials["POS credentials"]
  node_controller_base["Controller base<br/>[Controller.php]"]
end

subgraph group_pos["Point of sale"]
  node_pos_view["POS terminal view<br/>[terminal.blade.php]"]
  node_terminal["POS terminal"]
  node_sales["Sales transactions"]
  node_sale_items["Sale line items"]
  node_cup_sizes["Cup sizes<br/>[CupSize.php]"]
end

subgraph group_inventory["Stock and purchasing"]
  node_inventory_admin["Inventory management"]
  node_inventory["Inventory items<br/>[InventoryItem.php]"]
  node_ingredients["Ingredients<br/>[Ingredient.php]"]
  node_stock_moves["Stock movements"]
  node_movement_admin["Stock adjustment"]
  node_purchases["Supply purchases"]
  node_purchase_model["Purchase records<br/>[SupplyPurchase.php]"]
  node_suppliers["Suppliers<br/>[Supplier.php]"]
end

subgraph group_admin["Administration"]
  node_products["Products<br/>[Product.php]"]
  node_categories["Product categories"]
  node_expenses["Expense management"]
  node_expense_model["Expenses<br/>[Expense.php]"]
  node_expense_categories["Expense categories"]
  node_reports["Sales reporting"]
  node_dashboard["Admin dashboard"]
  node_users["User management<br/>[UserController.php]"]
  node_user_model["Users<br/>[User.php]"]
end

node_staff(("Staff"))

node_staff -->|"requests pages"| node_web_routes
node_web_routes -->|"routes requests"| node_admin_auth
node_web_routes -->|"routes requests"| node_pos_auth
node_web_routes -->|"routes requests"| node_terminal
node_web_routes -->|"routes requests"| node_inventory_admin
node_web_routes -->|"routes requests"| node_movement_admin
node_web_routes -->|"routes requests"| node_purchases
node_web_routes -->|"routes requests"| node_expenses
node_web_routes -->|"routes requests"| node_reports
node_web_routes -->|"routes requests"| node_dashboard
node_web_routes -->|"routes requests"| node_users
node_admin_auth -->|"extends"| node_controller_base
node_pos_auth -->|"extends"| node_controller_base
node_pos_auth -->|"checks passcode"| node_credentials
node_terminal -->|"extends"| node_controller_base
node_terminal -->|"renders"| node_pos_view
node_terminal -->|"loads session identity"| node_credentials
node_terminal -->|"loads catalog"| node_products
node_terminal -->|"loads sizes"| node_cup_sizes
node_terminal -->|"records sale"| node_sales
node_terminal -->|"creates line items"| node_sale_items
node_terminal -->|"deducts stock"| node_inventory
node_terminal -->|"records deductions"| node_stock_moves
node_inventory_admin -->|"manages items"| node_inventory
node_inventory_admin -->|"lists movements"| node_stock_moves
node_movement_admin -->|"updates quantities"| node_inventory
node_movement_admin -->|"records movements"| node_stock_moves
node_purchases -->|"records purchases"| node_purchase_model
node_purchases -->|"receives stock"| node_inventory
node_purchases -->|"records restock"| node_stock_moves
node_purchase_model -->|"belongs to"| node_suppliers
node_purchase_model -->|"associates items"| node_inventory
node_products -->|"belongs to"| node_categories
node_products -->|"uses ingredients"| node_ingredients
node_inventory -->|"tracks"| node_ingredients
node_inventory -->|"supplies stock"| node_cup_sizes
node_inventory -->|"has movements"| node_stock_moves
node_sales -->|"has items"| node_sale_items
node_expenses -->|"manages"| node_expense_model
node_expenses -->|"uses categories"| node_expense_categories
node_reports -->|"reports sales"| node_sales
node_dashboard -->|"summarizes stock"| node_inventory
node_dashboard -->|"summarizes catalog"| node_products
node_dashboard -->|"summarizes sales"| node_sales
node_users -.->|"manages users"| node_user_model

click node_web_routes "https://github.com/andrade-bit/mina-andrade-andy/blob/main/routes/web.php"
click node_admin_auth "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Auth/AdminAuthController.php"
click node_pos_auth "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Auth/PosAuthController.php"
click node_pos_view "https://github.com/andrade-bit/mina-andrade-andy/blob/main/resources/views/pos/terminal.blade.php"
click node_terminal "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Pos/TerminalController.php"
click node_sales "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/SalesTransaction.php"
click node_sale_items "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/SalesTransactionItem.php"
click node_products "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Product.php"
click node_categories "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/ProductCategory.php"
click node_cup_sizes "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/CupSize.php"
click node_inventory_admin "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/InventoryItemController.php"
click node_inventory "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/InventoryItem.php"
click node_ingredients "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Ingredient.php"
click node_stock_moves "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/InventoryTransaction.php"
click node_movement_admin "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/InventoryTransactionController.php"
click node_purchases "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/SupplyPurchaseController.php"
click node_purchase_model "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/SupplyPurchase.php"
click node_suppliers "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Supplier.php"
click node_expenses "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/ExpenseController.php"
click node_expense_model "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Expense.php"
click node_expense_categories "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/ExpenseCategory.php"
click node_reports "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/SalesReportController.php"
click node_dashboard "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/DashboardController.php"
click node_users "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/UserController.php"
click node_user_model "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/User.php"
click node_controller_base "https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Controller.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_admin_auth,node_pos_auth,node_credentials,node_controller_base toneBlue
class node_pos_view,node_terminal,node_sales,node_sale_items,node_cup_sizes toneAmber
class node_inventory_admin,node_inventory,node_ingredients,node_stock_moves,node_movement_admin,node_purchases,node_purchase_model,node_suppliers toneMint
class node_products,node_categories,node_expenses,node_expense_model,node_expense_categories,node_reports,node_dashboard,node_users,node_user_model toneRose
class node_staff toneIndigo
```

## Components

### Web entry and access

- [Web routes](https://github.com/andrade-bit/mina-andrade-andy/blob/main/routes/web.php): `routes/web.php`
- [Admin authentication](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Auth/AdminAuthController.php): `app/Http/Controllers/Auth/AdminAuthController.php`
- [POS passcode](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Auth/PosAuthController.php): `app/Http/Controllers/Auth/PosAuthController.php`
- **POS credentials**
- [Controller base](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Controller.php): `app/Http/Controllers/Controller.php`

### Point of sale

- [POS terminal view](https://github.com/andrade-bit/mina-andrade-andy/blob/main/resources/views/pos/terminal.blade.php): `resources/views/pos/terminal.blade.php`
- [POS terminal](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Pos/TerminalController.php): `app/Http/Controllers/Pos/TerminalController.php`
- [Sales transactions](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/SalesTransaction.php): `app/Models/SalesTransaction.php`
- [Sale line items](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/SalesTransactionItem.php): `app/Models/SalesTransactionItem.php`
- [Cup sizes](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/CupSize.php): `app/Models/CupSize.php`

### Stock and purchasing

- [Inventory management](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/InventoryItemController.php): `app/Http/Controllers/Admin/InventoryItemController.php`
- [Inventory items](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/InventoryItem.php): `app/Models/InventoryItem.php`
- [Ingredients](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Ingredient.php): `app/Models/Ingredient.php`
- [Stock movements](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/InventoryTransaction.php): `app/Models/InventoryTransaction.php`
- [Stock adjustment](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/InventoryTransactionController.php): `app/Http/Controllers/Admin/InventoryTransactionController.php`
- [Supply purchases](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/SupplyPurchaseController.php): `app/Http/Controllers/Admin/SupplyPurchaseController.php`
- [Purchase records](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/SupplyPurchase.php): `app/Models/SupplyPurchase.php`
- [Suppliers](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Supplier.php): `app/Models/Supplier.php`

### Administration

- [Products](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Product categories](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/ProductCategory.php): `app/Models/ProductCategory.php`
- [Expense management](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/ExpenseController.php): `app/Http/Controllers/Admin/ExpenseController.php`
- [Expenses](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/Expense.php): `app/Models/Expense.php`
- [Expense categories](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/ExpenseCategory.php): `app/Models/ExpenseCategory.php`
- [Sales reporting](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/SalesReportController.php): `app/Http/Controllers/Admin/SalesReportController.php`
- [Admin dashboard](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/DashboardController.php): `app/Http/Controllers/Admin/DashboardController.php`
- [User management](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Http/Controllers/Admin/UserController.php): `app/Http/Controllers/Admin/UserController.php`
- [Users](https://github.com/andrade-bit/mina-andrade-andy/blob/main/app/Models/User.php): `app/Models/User.php`

### Other components

- **Staff**

## Connections

- Staff → Web routes: requests pages
- Web routes → Admin authentication: routes requests (evidence: `routes/web.php`)
- Web routes → POS passcode: routes requests (evidence: `routes/web.php`)
- Web routes → POS terminal: routes requests (evidence: `routes/web.php`)
- Web routes → Inventory management: routes requests (evidence: `routes/web.php`)
- Web routes → Stock adjustment: routes requests (evidence: `routes/web.php`)
- Web routes → Supply purchases: routes requests (evidence: `routes/web.php`)
- Web routes → Expense management: routes requests (evidence: `routes/web.php`)
- Web routes → Sales reporting: routes requests (evidence: `routes/web.php`)
- Web routes → Admin dashboard: routes requests (evidence: `routes/web.php`)
- Web routes → User management: routes requests (evidence: `routes/web.php`)
- Admin authentication → Controller base: extends (evidence: `app/Http/Controllers/Auth/AdminAuthController.php`)
- POS passcode → Controller base: extends (evidence: `app/Http/Controllers/Auth/PosAuthController.php`)
- POS passcode → POS credentials: checks passcode (evidence: `app/Http/Controllers/Auth/PosAuthController.php`)
- POS terminal → Controller base: extends (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → POS terminal view: renders (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → POS credentials: loads session identity (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → Products: loads catalog (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → Cup sizes: loads sizes (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → Sales transactions: records sale (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → Sale line items: creates line items (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → Inventory items: deducts stock (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- POS terminal → Stock movements: records deductions (evidence: `app/Http/Controllers/Pos/TerminalController.php`)
- Inventory management → Inventory items: manages items (evidence: `app/Http/Controllers/Admin/InventoryItemController.php`)
- Inventory management → Stock movements: lists movements (evidence: `app/Http/Controllers/Admin/InventoryItemController.php`)
- Stock adjustment → Inventory items: updates quantities (evidence: `app/Http/Controllers/Admin/InventoryTransactionController.php`)
- Stock adjustment → Stock movements: records movements (evidence: `app/Http/Controllers/Admin/InventoryTransactionController.php`)
- Supply purchases → Purchase records: records purchases (evidence: `app/Http/Controllers/Admin/SupplyPurchaseController.php`)
- Supply purchases → Inventory items: receives stock (evidence: `app/Http/Controllers/Admin/SupplyPurchaseController.php`)
- Supply purchases → Stock movements: records restock (evidence: `app/Http/Controllers/Admin/SupplyPurchaseController.php`)
- Purchase records → Suppliers: belongs to (evidence: `app/Models/SupplyPurchase.php`)
- Purchase records → Inventory items: associates items (evidence: `app/Models/SupplyPurchase.php`)
- Products → Product categories: belongs to (evidence: `app/Models/Product.php`)
- Products → Ingredients: uses ingredients (evidence: `app/Models/Product.php`)
- Inventory items → Ingredients: tracks (evidence: `app/Models/InventoryItem.php`)
- Inventory items → Cup sizes: supplies stock (evidence: `app/Models/InventoryItem.php`)
- Inventory items → Stock movements: has movements (evidence: `app/Models/InventoryItem.php`)
- Sales transactions → Sale line items: has items (evidence: `app/Models/SalesTransaction.php`)
- Expense management → Expenses: manages (evidence: `app/Http/Controllers/Admin/ExpenseController.php`)
- Expense management → Expense categories: uses categories (evidence: `app/Http/Controllers/Admin/ExpenseController.php`)
- Sales reporting → Sales transactions: reports sales (evidence: `app/Http/Controllers/Admin/SalesReportController.php`)
- Admin dashboard → Inventory items: summarizes stock (evidence: `app/Http/Controllers/Admin/DashboardController.php`)
- Admin dashboard → Products: summarizes catalog (evidence: `app/Http/Controllers/Admin/DashboardController.php`)
- Admin dashboard → Sales transactions: summarizes sales (evidence: `app/Http/Controllers/Admin/DashboardController.php`)
- User management → Users: manages users
