# lequanphat/furniture-shop architecture

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

- Interactive diagram: https://gitdiagram.com/lequanphat/furniture-shop
- Repository: https://github.com/lequanphat/furniture-shop

## Overview

This is a Laravel furniture-shop application with customer storefront and staff administration. Customers browse and filter catalog items, manage accounts and addresses, then submit orders and track/cancel them; staff maintain products, inventory-related records, orders, users, and operational settings. The sampled controllers show catalog queries and product administration, plus order updates that can create or remove warranties. Routes document the HTTP entry points. Several substantial subsystems are represented by their exact controller paths, but their implementation was not sampled; their internal links are therefore omitted rather than inferred.

Main entry points: [`routes/web.php`](https://github.com/lequanphat/furniture-shop/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/OrderController.php`](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/OrderController.php) (Order processing), [`app/Http/Controllers/ProductController.php`](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ProductController.php) (Product catalog), [`app/Http/Controllers/PagesController.php`](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/PagesController.php) (Page controller)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_store_pages["Store pages"]
  node_page_controller["Page controller"]
  node_address_controller["Address management"]
end

subgraph group_commerce["Commerce"]
  node_product_controller["Product catalog"]
  node_product_model["Product records<br/>[Product.php]"]
  node_product_detail_model["Product variants<br/>[ProductDetail.php]"]
  node_order_controller["Order processing"]
  node_order_model["Orders<br/>[Order.php]"]
  node_order_detail_model["Order lines<br/>[OrderDetail.php]"]
end

subgraph group_operations["Store Operations"]
  node_warranty_controller["Warranty administration"]
  node_warranty_model["Warranty records<br/>[Warranty.php]"]
  node_brand_controller["Brand management"]
  node_category_controller["Category management"]
  node_color_controller["Color management"]
  node_discount_controller["Discount management"]
  node_supplier_controller["Supplier records"]
  node_receipt_controller["Receiving records"]
  node_statistics_controller["Statistics"]
end

subgraph group_identity["Identity and Access"]
  node_auth_controller["Authentication<br/>[AuthController.php]"]
  node_social_login["Social login"]
  node_facebook_login["Facebook login"]
  node_user_controller["User administration<br/>[UserController.php]"]
  node_permission_controller["Permissions"]
end

node_shopper(("Shopper"))
node_web_routes["Web routes<br/>[web.php]"]
node_database[("MySQL database")]

node_shopper -->|"requests"| node_web_routes
node_web_routes -->|"routes to"| node_page_controller
node_web_routes -->|"routes to"| node_order_controller
node_web_routes -->|"routes to"| node_address_controller
node_web_routes -->|"routes to"| node_auth_controller
node_web_routes -->|"routes to"| node_social_login
node_web_routes -->|"routes to"| node_facebook_login
node_web_routes -->|"routes to"| node_product_controller
node_web_routes -->|"routes to"| node_brand_controller
node_web_routes -->|"routes to"| node_category_controller
node_web_routes -->|"routes to"| node_color_controller
node_web_routes -->|"routes to"| node_discount_controller
node_web_routes -->|"routes to"| node_supplier_controller
node_web_routes -->|"routes to"| node_receipt_controller
node_web_routes -->|"routes to"| node_statistics_controller
node_web_routes -->|"routes to"| node_warranty_controller
node_web_routes -->|"routes to"| node_user_controller
node_web_routes -->|"routes to"| node_permission_controller
node_page_controller -->|"renders"| node_store_pages
node_page_controller -->|"queries"| node_database
node_product_controller -->|"queries and updates"| node_product_model
node_product_controller -->|"queries and updates"| node_product_detail_model
node_product_controller -->|"stores images"| node_database
node_order_controller -->|"reads and updates"| node_order_model
node_order_controller -->|"reads"| node_order_detail_model
node_order_controller -->|"looks up variants"| node_product_detail_model
node_order_controller -->|"creates and deletes"| node_warranty_model
node_order_controller -->|"persists orders"| node_database
node_user_controller -->|"reads and updates"| node_database

click node_web_routes "https://github.com/lequanphat/furniture-shop/blob/main/routes/web.php"
click node_store_pages "https://github.com/lequanphat/furniture-shop/tree/main/resources/views/pages"
click node_page_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/PagesController.php"
click node_auth_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/AuthController.php"
click node_social_login "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/GoogleController.php"
click node_facebook_login "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/FacebookController.php"
click node_address_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/AddressController.php"
click node_user_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/UserController.php"
click node_product_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ProductController.php"
click node_product_model "https://github.com/lequanphat/furniture-shop/blob/main/app/Models/Product.php"
click node_product_detail_model "https://github.com/lequanphat/furniture-shop/blob/main/app/Models/ProductDetail.php"
click node_order_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/OrderController.php"
click node_order_model "https://github.com/lequanphat/furniture-shop/blob/main/app/Models/Order.php"
click node_order_detail_model "https://github.com/lequanphat/furniture-shop/blob/main/app/Models/OrderDetail.php"
click node_warranty_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/WarrantyController.php"
click node_warranty_model "https://github.com/lequanphat/furniture-shop/blob/main/app/Models/Warranty.php"
click node_brand_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/BrandController.php"
click node_category_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/CategoryController.php"
click node_color_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ColorController.php"
click node_discount_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/DiscountController.php"
click node_supplier_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/SupplierController.php"
click node_receipt_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ReceiptsController.php"
click node_statistics_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/StatisticController.php"
click node_permission_controller "https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/PermissionController.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_store_pages,node_page_controller,node_address_controller toneBlue
class node_product_controller,node_product_model,node_product_detail_model,node_order_controller,node_order_model,node_order_detail_model,node_database toneAmber
class node_warranty_controller,node_warranty_model,node_brand_controller,node_category_controller,node_color_controller,node_discount_controller,node_supplier_controller,node_receipt_controller,node_statistics_controller,node_web_routes toneMint
class node_auth_controller,node_social_login,node_facebook_login,node_user_controller,node_permission_controller toneRose
class node_shopper toneIndigo
```

## Components

### Storefront

- [Store pages](https://github.com/lequanphat/furniture-shop/tree/main/resources/views/pages): `resources/views/pages`
- [Page controller](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/PagesController.php): `app/Http/Controllers/PagesController.php`
- [Address management](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/AddressController.php): `app/Http/Controllers/AddressController.php`

### Commerce

- [Product catalog](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [Product records](https://github.com/lequanphat/furniture-shop/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Product variants](https://github.com/lequanphat/furniture-shop/blob/main/app/Models/ProductDetail.php): `app/Models/ProductDetail.php`
- [Order processing](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Orders](https://github.com/lequanphat/furniture-shop/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Order lines](https://github.com/lequanphat/furniture-shop/blob/main/app/Models/OrderDetail.php): `app/Models/OrderDetail.php`

### Store Operations

- [Warranty administration](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/WarrantyController.php): `app/Http/Controllers/WarrantyController.php`
- [Warranty records](https://github.com/lequanphat/furniture-shop/blob/main/app/Models/Warranty.php): `app/Models/Warranty.php`
- [Brand management](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/BrandController.php): `app/Http/Controllers/BrandController.php`
- [Category management](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/CategoryController.php): `app/Http/Controllers/CategoryController.php`
- [Color management](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ColorController.php): `app/Http/Controllers/ColorController.php`
- [Discount management](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/DiscountController.php): `app/Http/Controllers/DiscountController.php`
- [Supplier records](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/SupplierController.php): `app/Http/Controllers/SupplierController.php`
- [Receiving records](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/ReceiptsController.php): `app/Http/Controllers/ReceiptsController.php`
- [Statistics](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/StatisticController.php): `app/Http/Controllers/StatisticController.php`

### Identity and Access

- [Authentication](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/AuthController.php): `app/Http/Controllers/AuthController.php`
- [Social login](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/GoogleController.php): `app/Http/Controllers/GoogleController.php`
- [Facebook login](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/FacebookController.php): `app/Http/Controllers/FacebookController.php`
- [User administration](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Permissions](https://github.com/lequanphat/furniture-shop/blob/main/app/Http/Controllers/PermissionController.php): `app/Http/Controllers/PermissionController.php`

### Other components

- **Shopper**
- [Web routes](https://github.com/lequanphat/furniture-shop/blob/main/routes/web.php): `routes/web.php`
- **MySQL database**

## Connections

- Shopper → Web routes: requests (evidence: `routes/web.php`)
- Web routes → Page controller: routes to (evidence: `routes/web.php`)
- Web routes → Order processing: routes to (evidence: `routes/web.php`)
- Web routes → Address management: routes to (evidence: `routes/web.php`)
- Web routes → Authentication: routes to (evidence: `routes/web.php`)
- Web routes → Social login: routes to (evidence: `routes/web.php`)
- Web routes → Facebook login: routes to (evidence: `routes/web.php`)
- Web routes → Product catalog: routes to (evidence: `routes/web.php`)
- Web routes → Brand management: routes to (evidence: `routes/web.php`)
- Web routes → Category management: routes to (evidence: `routes/web.php`)
- Web routes → Color management: routes to (evidence: `routes/web.php`)
- Web routes → Discount management: routes to (evidence: `routes/web.php`)
- Web routes → Supplier records: routes to (evidence: `routes/web.php`)
- Web routes → Receiving records: routes to (evidence: `routes/web.php`)
- Web routes → Statistics: routes to (evidence: `routes/web.php`)
- Web routes → Warranty administration: routes to (evidence: `routes/web.php`)
- Web routes → User administration: routes to (evidence: `routes/web.php`)
- Web routes → Permissions: routes to (evidence: `routes/web.php`)
- Page controller → Store pages: renders (evidence: `app/Http/Controllers/PagesController.php`)
- Page controller → MySQL database: queries (evidence: `app/Http/Controllers/PagesController.php`)
- Product catalog → Product records: queries and updates (evidence: `app/Http/Controllers/ProductController.php`)
- Product catalog → Product variants: queries and updates (evidence: `app/Http/Controllers/ProductController.php`)
- Product catalog → MySQL database: stores images (evidence: `app/Http/Controllers/ProductController.php`)
- Order processing → Orders: reads and updates (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → Order lines: reads (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → Product variants: looks up variants (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → Warranty records: creates and deletes (evidence: `app/Http/Controllers/OrderController.php`)
- Order processing → MySQL database: persists orders (evidence: `app/Http/Controllers/OrderController.php`)
- User administration → MySQL database: reads and updates (evidence: `app/Http/Controllers/UserController.php`)
