# diyukk21/praktik-toko-online architecture

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

- Interactive diagram: https://gitdiagram.com/diyukk21/praktik-toko-online
- Repository: https://github.com/diyukk21/praktik-toko-online

## Overview

This is a Laravel storefront application: shoppers browse a product catalog, while account registration, login, email verification, and profile management are also represented. The shown catalog flow routes requests to home or product controllers, which query catalog models and return views. Commerce entities for carts, addresses, orders, items, and payments exist in the model layer, but no checkout or payment workflow is shown. The graph follows the supplied excerpts and source index; unsampled controllers and templates limit further workflow detail.

Main entry points: [`app/Models/User.php`](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/User.php) (User accounts), [`app/Models/Product.php`](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Product.php) (Products), [`routes/web.php`](https://github.com/diyukk21/praktik-toko-online/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/ProductController.php`](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/ProductController.php) (Product browsing)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry and routing"]
  node_front["HTTP entry<br/>[index.php]"]
  node_appboot["Application setup<br/>[app.php]"]
  node_routes["Web routes<br/>[web.php]"]
  node_authroutes["Auth routes<br/>[auth.php]"]
end

subgraph group_catalog["Storefront catalog"]
  node_home["Home page data<br/>[HomeController.php]"]
  node_products["Product browsing"]
  node_category[("Categories<br/>[Category.php]")]
  node_product[("Products<br/>[Product.php]")]
  node_productextras[("Product images and variants<br/>[Product.php]")]
end

subgraph group_accounts["Accounts and identity"]
  node_register["Registration"]
  node_login["Login and logout"]
  node_loginrequest["Login validation<br/>[LoginRequest.php]"]
  node_profile["Profile management"]
  node_profilevalidation["Profile validation"]
  node_user[("User accounts<br/>[User.php]")]
end

subgraph group_commerce["Commerce domain"]
  node_address[("Addresses<br/>[Address.php]")]
  node_cart[("Cart<br/>[Cart.php]")]
  node_order[("Orders<br/>[Order.php]")]
  node_orderitem[("Order items<br/>[OrderItem.php]")]
  node_payment[("Payments<br/>[Payment.php]")]
end

node_shopper(("Shopper"))

node_shopper -->|"requests pages"| node_front
node_front -->|"boots app"| node_appboot
node_appboot -->|"loads routes"| node_routes
node_routes -->|"dispatches home"| node_home
node_routes -->|"dispatches catalog"| node_products
node_routes -->|"loads auth routes"| node_authroutes
node_authroutes -->|"dispatches registration"| node_register
node_authroutes -->|"dispatches login"| node_login
node_home -->|"queries"| node_category
node_home -->|"queries"| node_product
node_products -->|"queries"| node_category
node_products -->|"queries"| node_product
node_products -->|"loads relations"| node_productextras
node_register -->|"creates account"| node_user
node_login -->|"authenticates via"| node_loginrequest
node_profile -->|"validates with"| node_profilevalidation
node_user -->|"has cart"| node_cart
node_user -->|"has addresses"| node_address
node_user -->|"has orders"| node_order
node_user -->|"has verified payments"| node_payment
node_order -->|"references"| node_address
node_order -->|"has items"| node_orderitem
node_order -->|"has payment"| node_payment
node_category -->|"has products"| node_product
node_product -->|"has images and variants"| node_productextras
node_orderitem -->|"references product"| node_product

click node_front "https://github.com/diyukk21/praktik-toko-online/blob/main/public/index.php"
click node_appboot "https://github.com/diyukk21/praktik-toko-online/blob/main/bootstrap/app.php"
click node_routes "https://github.com/diyukk21/praktik-toko-online/blob/main/routes/web.php"
click node_authroutes "https://github.com/diyukk21/praktik-toko-online/blob/main/routes/auth.php"
click node_home "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/HomeController.php"
click node_products "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/ProductController.php"
click node_category "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Category.php"
click node_product "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Product.php"
click node_productextras "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Product.php"
click node_register "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php"
click node_login "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php"
click node_loginrequest "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Requests/Auth/LoginRequest.php"
click node_profile "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/ProfileController.php"
click node_profilevalidation "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Requests/ProfileUpdateRequest.php"
click node_user "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/User.php"
click node_address "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Address.php"
click node_cart "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Cart.php"
click node_order "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Order.php"
click node_orderitem "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/OrderItem.php"
click node_payment "https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Payment.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_front,node_appboot,node_routes,node_authroutes toneBlue
class node_home,node_products,node_category,node_product,node_productextras toneAmber
class node_register,node_login,node_loginrequest,node_profile,node_profilevalidation,node_user toneMint
class node_address,node_cart,node_order,node_orderitem,node_payment toneRose
class node_shopper toneIndigo
```

## Components

### Web entry and routing

- [HTTP entry](https://github.com/diyukk21/praktik-toko-online/blob/main/public/index.php): `public/index.php`
- [Application setup](https://github.com/diyukk21/praktik-toko-online/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Web routes](https://github.com/diyukk21/praktik-toko-online/blob/main/routes/web.php): `routes/web.php`
- [Auth routes](https://github.com/diyukk21/praktik-toko-online/blob/main/routes/auth.php): `routes/auth.php`

### Storefront catalog

- [Home page data](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/HomeController.php): `app/Http/Controllers/HomeController.php`
- [Product browsing](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/ProductController.php): `app/Http/Controllers/ProductController.php`
- [Categories](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Category.php): `app/Models/Category.php`
- [Products](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Product.php): `app/Models/Product.php`
- [Product images and variants](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Product.php): `app/Models/Product.php`

### Accounts and identity

- [Registration](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/Auth/RegisteredUserController.php): `app/Http/Controllers/Auth/RegisteredUserController.php`
- [Login and logout](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/Auth/AuthenticatedSessionController.php): `app/Http/Controllers/Auth/AuthenticatedSessionController.php`
- [Login validation](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Requests/Auth/LoginRequest.php): `app/Http/Requests/Auth/LoginRequest.php`
- [Profile management](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Controllers/ProfileController.php): `app/Http/Controllers/ProfileController.php`
- [Profile validation](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Http/Requests/ProfileUpdateRequest.php): `app/Http/Requests/ProfileUpdateRequest.php`
- [User accounts](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/User.php): `app/Models/User.php`

### Commerce domain

- [Addresses](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Address.php): `app/Models/Address.php`
- [Cart](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Cart.php): `app/Models/Cart.php`
- [Orders](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Order items](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/OrderItem.php): `app/Models/OrderItem.php`
- [Payments](https://github.com/diyukk21/praktik-toko-online/blob/main/app/Models/Payment.php): `app/Models/Payment.php`

### Other components

- **Shopper**

## Connections

- Shopper → HTTP entry: requests pages
- HTTP entry → Application setup: boots app (evidence: `public/index.php`)
- Application setup → Web routes: loads routes (evidence: `bootstrap/app.php`)
- Web routes → Home page data: dispatches home (evidence: `routes/web.php`)
- Web routes → Product browsing: dispatches catalog (evidence: `routes/web.php`)
- Web routes → Auth routes: loads auth routes (evidence: `routes/web.php`)
- Auth routes → Registration: dispatches registration (evidence: `routes/auth.php`)
- Auth routes → Login and logout: dispatches login (evidence: `routes/auth.php`)
- Home page data → Categories: queries (evidence: `app/Http/Controllers/HomeController.php`)
- Home page data → Products: queries (evidence: `app/Http/Controllers/HomeController.php`)
- Product browsing → Categories: queries (evidence: `app/Http/Controllers/ProductController.php`)
- Product browsing → Products: queries (evidence: `app/Http/Controllers/ProductController.php`)
- Product browsing → Product images and variants: loads relations (evidence: `app/Http/Controllers/ProductController.php`)
- Registration → User accounts: creates account (evidence: `app/Http/Controllers/Auth/RegisteredUserController.php`)
- Login and logout → Login validation: authenticates via (evidence: `app/Http/Controllers/Auth/AuthenticatedSessionController.php`)
- Profile management → Profile validation: validates with (evidence: `app/Http/Controllers/ProfileController.php`)
- User accounts → Cart: has cart (evidence: `app/Models/User.php`)
- User accounts → Addresses: has addresses (evidence: `app/Models/User.php`)
- User accounts → Orders: has orders (evidence: `app/Models/User.php`)
- User accounts → Payments: has verified payments (evidence: `app/Models/User.php`)
- Orders → Addresses: references (evidence: `app/Models/Order.php`)
- Orders → Order items: has items (evidence: `app/Models/Order.php`)
- Orders → Payments: has payment (evidence: `app/Models/Order.php`)
- Categories → Products: has products (evidence: `app/Models/Category.php`)
- Products → Product images and variants: has images and variants (evidence: `app/Models/Product.php`)
- Order items → Products: references product (evidence: `app/Models/OrderItem.php`)
