# ivansamuelortizorellana/alvgluten_final- architecture

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

- Interactive diagram: https://gitdiagram.com/ivansamuelortizorellana/alvgluten_final-
- Repository: https://github.com/ivansamuelortizorellana/alvgluten_final-

## Overview

AlvGluten is a Laravel/Livewire online shop for gluten-free products. The customer workflow is catalog browsing, cart management, authenticated checkout, order creation and confirmation email, followed by order history. Admin product management and account/social login are separate capabilities. Routing and checkout links are shown in the provided evidence; several catalog, cart and admin implementations were not sampled, so their internal calls are not asserted.

Main entry points: [`routes/web.php`](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/web.php) (Web routes), [`app/Livewire/Checkout.php`](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Checkout.php) (Checkout), [`app/Livewire/Admin/ProductEdit.php`](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductEdit.php) (Edit product), [`app/Http/Controllers/GoogleAuthController.php`](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Controllers/GoogleAuthController.php) (Google sign-in)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Shop experience"]
  node_routes["Web routes<br/>[web.php]"]
  node_catalog["Product catalog<br/>[Catalog.php]"]
  node_cart["Shopping cart<br/>[CartDrawer.php]"]
  node_checkout["Checkout<br/>[Checkout.php]"]
end

subgraph group_orders["Orders and data"]
  node_history["Order history<br/>[MisPedidos.php]"]
  node_products["Products<br/>[Product.php]"]
  node_categories["Categories<br/>[Category.php]"]
  node_orders_model[("Orders<br/>[Order.php]")]
  node_order_items[("Order items<br/>[OrderItem.php]")]
  node_confirmation["Confirmation email"]
end

subgraph group_admin["Catalog administration"]
  node_admin_routes["Admin product routes<br/>[web.php]"]
  node_admin_index["Product management<br/>[ProductIndex.php]"]
  node_product_create["Create product<br/>[ProductCreate.php]"]
  node_product_edit["Edit product<br/>[ProductEdit.php]"]
end

subgraph group_identity["Accounts and access"]
  node_user[("User accounts<br/>[User.php]")]
  node_login["Login and registration<br/>[LoginForm.php]"]
  node_google_auth["Google sign-in"]
  node_auth_routes["Auth routes<br/>[auth.php]"]
  node_verify["Email verification"]
  node_admin_middleware["Admin access check<br/>[EsAdmin.php]"]
end

node_customer(("Customer"))
node_mail_service(("Mail service"))
node_google(("Google"))

node_customer -->|"opens shop"| node_routes
node_routes -->|"routes to"| node_catalog
node_routes -->|"routes to"| node_checkout
node_routes -->|"routes to"| node_history
node_catalog -.->|"browses"| node_products
node_customer -.->|"manages cart"| node_cart
node_cart -.->|"updates cart"| node_products
node_checkout -->|"reads cart"| node_user
node_checkout -->|"creates order"| node_orders_model
node_checkout -->|"creates items"| node_order_items
node_checkout -->|"sends"| node_confirmation
node_confirmation -.->|"delivers email"| node_mail_service
node_history -.->|"lists orders"| node_orders_model
node_orders_model -->|"has items"| node_order_items
node_admin_routes -->|"routes to"| node_admin_index
node_admin_routes -->|"routes to"| node_product_create
node_admin_routes -->|"routes to"| node_product_edit
node_product_edit -->|"edits"| node_products
node_product_edit -->|"loads categories"| node_categories
node_login -.->|"authenticates"| node_user
node_auth_routes -->|"routes verification"| node_verify
node_google_auth -.->|"exchanges identity"| node_google
node_google_auth -->|"creates or updates"| node_user
node_routes -->|"routes to"| node_google_auth

click node_routes "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/web.php"
click node_catalog "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Catalog.php"
click node_cart "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/CartDrawer.php"
click node_checkout "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Checkout.php"
click node_history "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/MisPedidos.php"
click node_products "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/Product.php"
click node_categories "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/Category.php"
click node_orders_model "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/Order.php"
click node_order_items "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/OrderItem.php"
click node_confirmation "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Mail/ConfirmacionPedido.php"
click node_admin_routes "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/web.php"
click node_admin_index "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductIndex.php"
click node_product_create "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductCreate.php"
click node_product_edit "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductEdit.php"
click node_user "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/User.php"
click node_login "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Forms/LoginForm.php"
click node_google_auth "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Controllers/GoogleAuthController.php"
click node_auth_routes "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/auth.php"
click node_verify "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php"
click node_admin_middleware "https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Middleware/EsAdmin.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_routes,node_catalog,node_cart,node_checkout toneBlue
class node_history,node_products,node_categories,node_orders_model,node_order_items,node_confirmation toneAmber
class node_admin_routes,node_admin_index,node_product_create,node_product_edit toneMint
class node_user,node_login,node_google_auth,node_auth_routes,node_verify,node_admin_middleware toneRose
class node_customer,node_mail_service,node_google toneIndigo
```

## Components

### Shop experience

- [Web routes](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/web.php): `routes/web.php`
- [Product catalog](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Catalog.php): `app/Livewire/Catalog.php`
- [Shopping cart](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/CartDrawer.php): `app/Livewire/CartDrawer.php`
- [Checkout](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Checkout.php): `app/Livewire/Checkout.php`

### Orders and data

- [Order history](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/MisPedidos.php): `app/Livewire/MisPedidos.php`
- [Products](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Categories](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Orders](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Order items](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/OrderItem.php): `app/Models/OrderItem.php`
- [Confirmation email](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Mail/ConfirmacionPedido.php): `app/Mail/ConfirmacionPedido.php`

### Catalog administration

- [Admin product routes](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/web.php): `routes/web.php`
- [Product management](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductIndex.php): `app/Livewire/Admin/ProductIndex.php`
- [Create product](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductCreate.php): `app/Livewire/Admin/ProductCreate.php`
- [Edit product](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Admin/ProductEdit.php): `app/Livewire/Admin/ProductEdit.php`

### Accounts and access

- [User accounts](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Models/User.php): `app/Models/User.php`
- [Login and registration](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Livewire/Forms/LoginForm.php): `app/Livewire/Forms/LoginForm.php`
- [Google sign-in](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Controllers/GoogleAuthController.php): `app/Http/Controllers/GoogleAuthController.php`
- [Auth routes](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/routes/auth.php): `routes/auth.php`
- [Email verification](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Controllers/Auth/VerifyEmailController.php): `app/Http/Controllers/Auth/VerifyEmailController.php`
- [Admin access check](https://github.com/ivansamuelortizorellana/alvgluten_final-/blob/main/app/Http/Middleware/EsAdmin.php): `app/Http/Middleware/EsAdmin.php`

### Other components

- **Customer**
- **Mail service**
- **Google**

## Connections

- Customer → Web routes: opens shop (evidence: `routes/web.php`)
- Web routes → Product catalog: routes to (evidence: `routes/web.php`)
- Web routes → Checkout: routes to (evidence: `routes/web.php`)
- Web routes → Order history: routes to (evidence: `routes/web.php`)
- Product catalog → Products: browses
- Customer → Shopping cart: manages cart
- Shopping cart → Products: updates cart
- Checkout → User accounts: reads cart (evidence: `app/Livewire/Checkout.php`)
- Checkout → Orders: creates order (evidence: `app/Livewire/Checkout.php`)
- Checkout → Order items: creates items (evidence: `app/Livewire/Checkout.php`)
- Checkout → Confirmation email: sends (evidence: `app/Livewire/Checkout.php`)
- Confirmation email → Mail service: delivers email
- Order history → Orders: lists orders
- Orders → Order items: has items (evidence: `app/Models/Order.php`)
- Admin product routes → Product management: routes to (evidence: `routes/web.php`)
- Admin product routes → Create product: routes to (evidence: `routes/web.php`)
- Admin product routes → Edit product: routes to (evidence: `routes/web.php`)
- Edit product → Products: edits (evidence: `app/Livewire/Admin/ProductEdit.php`)
- Edit product → Categories: loads categories (evidence: `app/Livewire/Admin/ProductEdit.php`)
- Login and registration → User accounts: authenticates
- Auth routes → Email verification: routes verification (evidence: `routes/auth.php`)
- Google sign-in → Google: exchanges identity
- Google sign-in → User accounts: creates or updates (evidence: `app/Http/Controllers/GoogleAuthController.php`)
- Web routes → Google sign-in: routes to (evidence: `routes/web.php`)
