# raflyprtm-08/project-tokoonline-1-7 architecture

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

- Interactive diagram: https://gitdiagram.com/raflyprtm-08/project-tokoonline-1-7
- Repository: https://github.com/raflyprtm-08/project-tokoonline-1-7

## Overview

This is a Laravel storefront and shop-management application, rather than the Laravel framework described by its README. The main customer journey is browsing products, viewing categories or details, maintaining an account, and using a cart/order flow; staff have separate product, customer, and user management screens. Shipping estimates use local data and calculations, with RajaOngkir requests as a fallback. The source excerpts show some controller/model and view relationships; unsampled routes and controller behavior are represented only where the source index or route file supports them.

Main entry points: [`routes/web.php`](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/routes/web.php) (Web routes), [`app/Http/Controllers/ProdukController.php`](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/ProdukController.php) (Product browsing and admin), [`app/Http/Controllers/OrderController.php`](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/OrderController.php) (Cart and orders), [`app/Http/Controllers/CustomerController.php`](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/CustomerController.php) (Customer accounts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web entry"]
  node_routes["Web routes<br/>[web.php]"]
  node_kernel["HTTP kernel<br/>[Kernel.php]"]
  node_bootstrap["Application bootstrap<br/>[app.php]"]
  node_base_controller["Base controller<br/>[Controller.php]"]
end

subgraph group_storefront["Storefront"]
  node_home["Home page"]
  node_product_controller["Product browsing and admin"]
  node_product_views["Product views<br/>[index.blade.php]"]
  node_store_layout["Store layout<br/>[app.blade.php]"]
end

subgraph group_commerce["Commerce"]
  node_product_model["Products<br/>[Produk.php]"]
  node_category_model["Categories<br/>[Kategori.php]"]
  node_photo_model["Product photos<br/>[FotoProduk.php]"]
  node_order_controller["Cart and orders"]
  node_order_model["Orders<br/>[Order.php]"]
  node_order_item_model["Order items<br/>[OrderItem.php]"]
end

subgraph group_management["Shop management"]
  node_backend_layout["Admin layout<br/>[app.blade.php]"]
  node_user_controller["User management<br/>[UserController.php]"]
  node_category_controller["Category management"]
end

subgraph group_identity["Identity and shipping"]
  node_customer_controller["Customer accounts"]
  node_customer_model["Customer records<br/>[Customer.php]"]
  node_user_model["User records<br/>[User.php]"]
  node_image_helper["Image resizing<br/>[ImageHelper.php]"]
  node_shipping_controller["Shipping estimates"]
end

node_shopper(("Shopper"))
node_staff(("Staff"))
node_rajaongkir{{"RajaOngkir API"}}

node_shopper -->|"requests pages"| node_routes
node_staff -->|"requests admin"| node_routes
node_kernel -->|"loads web routes"| node_routes
node_bootstrap -->|"binds kernel"| node_kernel
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_product_controller
node_routes -->|"routes to"| node_order_controller
node_routes -->|"routes to"| node_customer_controller
node_routes -->|"routes to"| node_shipping_controller
node_routes -->|"routes to"| node_user_controller
node_routes -->|"routes to"| node_category_controller
node_product_controller -->|"queries products"| node_product_model
node_product_controller -->|"queries categories"| node_category_model
node_product_controller -->|"queries photos"| node_photo_model
node_product_controller -->|"renders listing"| node_product_views
node_product_controller -->|"renders storefront"| node_store_layout
node_store_layout -->|"loads categories"| node_category_model
node_product_model -->|"belongs to"| node_category_model
node_product_model -->|"has photos"| node_photo_model
node_order_controller -->|"uses order records"| node_order_model
node_order_controller -->|"uses order items"| node_order_item_model
node_order_controller -->|"uses products"| node_product_model
node_order_controller -->|"uses customer"| node_customer_model
node_order_model -->|"has items"| node_order_item_model
node_order_model -->|"belongs to"| node_customer_model
node_order_item_model -->|"references product"| node_product_model
node_order_item_model -->|"references category"| node_category_model
node_customer_controller -->|"updates accounts"| node_customer_model
node_customer_controller -->|"syncs user"| node_user_model
node_customer_controller -->|"resizes uploads"| node_image_helper
node_customer_model -->|"belongs to"| node_user_model
node_user_model -->|"has one"| node_customer_model
node_customer_controller -.->|"signs in via Google"| node_rajaongkir
node_shipping_controller -->|"requests rates"| node_rajaongkir
node_user_controller -.->|"manages users"| node_user_model
node_category_controller -.->|"manages categories"| node_category_model
node_product_controller -.->|"renders admin pages"| node_backend_layout

click node_routes "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/routes/web.php"
click node_kernel "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Kernel.php"
click node_bootstrap "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/bootstrap/app.php"
click node_base_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/Controller.php"
click node_home "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/BerandaController.php"
click node_product_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/ProdukController.php"
click node_product_views "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/resources/views/v_produk/index.blade.php"
click node_store_layout "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/resources/views/v_layouts/app.blade.php"
click node_product_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Produk.php"
click node_category_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Kategori.php"
click node_photo_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/FotoProduk.php"
click node_order_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/OrderController.php"
click node_order_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Order.php"
click node_order_item_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/OrderItem.php"
click node_customer_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/CustomerController.php"
click node_customer_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Customer.php"
click node_user_model "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/User.php"
click node_image_helper "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Helpers/ImageHelper.php"
click node_shipping_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/RajaOngkirController.php"
click node_backend_layout "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/resources/views/backend/v_layouts/app.blade.php"
click node_user_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/UserController.php"
click node_category_controller "https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/KategoriController.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_kernel,node_bootstrap,node_base_controller toneBlue
class node_home,node_product_controller,node_product_views,node_store_layout toneAmber
class node_product_model,node_category_model,node_photo_model,node_order_controller,node_order_model,node_order_item_model,node_rajaongkir toneMint
class node_backend_layout,node_user_controller,node_category_controller toneRose
class node_customer_controller,node_customer_model,node_user_model,node_image_helper,node_shipping_controller,node_shopper,node_staff toneIndigo
```

## Components

### Web entry

- [Web routes](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/routes/web.php): `routes/web.php`
- [HTTP kernel](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Application bootstrap](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [Base controller](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/Controller.php): `app/Http/Controllers/Controller.php`

### Storefront

- [Home page](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/BerandaController.php): `app/Http/Controllers/BerandaController.php`
- [Product browsing and admin](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/ProdukController.php): `app/Http/Controllers/ProdukController.php`
- [Product views](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/resources/views/v_produk/index.blade.php): `resources/views/v_produk/index.blade.php`
- [Store layout](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/resources/views/v_layouts/app.blade.php): `resources/views/v_layouts/app.blade.php`

### Commerce

- [Products](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Produk.php): `app/Models/Produk.php`
- [Categories](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Kategori.php): `app/Models/Kategori.php`
- [Product photos](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/FotoProduk.php): `app/Models/FotoProduk.php`
- [Cart and orders](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Orders](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Order items](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/OrderItem.php): `app/Models/OrderItem.php`

### Shop management

- [Admin layout](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/resources/views/backend/v_layouts/app.blade.php): `resources/views/backend/v_layouts/app.blade.php`
- [User management](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Category management](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/KategoriController.php): `app/Http/Controllers/KategoriController.php`

### Identity and shipping

- [Customer accounts](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/CustomerController.php): `app/Http/Controllers/CustomerController.php`
- [Customer records](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/Customer.php): `app/Models/Customer.php`
- [User records](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Models/User.php): `app/Models/User.php`
- [Image resizing](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Helpers/ImageHelper.php): `app/Helpers/ImageHelper.php`
- [Shipping estimates](https://github.com/raflyprtm-08/project-tokoonline-1-7/blob/main/app/Http/Controllers/RajaOngkirController.php): `app/Http/Controllers/RajaOngkirController.php`

### Other components

- **Shopper**
- **Staff**
- **RajaOngkir API**

## Connections

- Shopper → Web routes: requests pages (evidence: `routes/web.php`)
- Staff → Web routes: requests admin (evidence: `routes/web.php`)
- HTTP kernel → Web routes: loads web routes
- Application bootstrap → HTTP kernel: binds kernel (evidence: `bootstrap/app.php`)
- Web routes → Home page: routes to (evidence: `routes/web.php`)
- Web routes → Product browsing and admin: routes to (evidence: `routes/web.php`)
- Web routes → Cart and orders: routes to (evidence: `routes/web.php`)
- Web routes → Customer accounts: routes to (evidence: `routes/web.php`)
- Web routes → Shipping estimates: routes to (evidence: `routes/web.php`)
- Web routes → User management: routes to (evidence: `routes/web.php`)
- Web routes → Category management: routes to (evidence: `routes/web.php`)
- Product browsing and admin → Products: queries products (evidence: `app/Http/Controllers/ProdukController.php`)
- Product browsing and admin → Categories: queries categories (evidence: `app/Http/Controllers/ProdukController.php`)
- Product browsing and admin → Product photos: queries photos (evidence: `app/Http/Controllers/ProdukController.php`)
- Product browsing and admin → Product views: renders listing (evidence: `app/Http/Controllers/ProdukController.php`)
- Product browsing and admin → Store layout: renders storefront (evidence: `app/Http/Controllers/ProdukController.php`)
- Store layout → Categories: loads categories (evidence: `resources/views/v_layouts/app.blade.php`)
- Products → Categories: belongs to (evidence: `app/Models/Produk.php`)
- Products → Product photos: has photos (evidence: `app/Models/Produk.php`)
- Cart and orders → Orders: uses order records (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and orders → Order items: uses order items (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and orders → Products: uses products (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and orders → Customer records: uses customer (evidence: `app/Http/Controllers/OrderController.php`)
- Orders → Order items: has items (evidence: `app/Models/Order.php`)
- Orders → Customer records: belongs to (evidence: `app/Models/Order.php`)
- Order items → Products: references product (evidence: `app/Models/OrderItem.php`)
- Order items → Categories: references category (evidence: `app/Models/OrderItem.php`)
- Customer accounts → Customer records: updates accounts (evidence: `app/Http/Controllers/CustomerController.php`)
- Customer accounts → User records: syncs user (evidence: `app/Http/Controllers/CustomerController.php`)
- Customer accounts → Image resizing: resizes uploads (evidence: `app/Http/Controllers/CustomerController.php`)
- Customer records → User records: belongs to (evidence: `app/Models/Customer.php`)
- User records → Customer records: has one (evidence: `app/Models/User.php`)
- Customer accounts → RajaOngkir API: signs in via Google
- Shipping estimates → RajaOngkir API: requests rates (evidence: `app/Http/Controllers/RajaOngkirController.php`)
- User management → User records: manages users
- Category management → Categories: manages categories
- Product browsing and admin → Admin layout: renders admin pages
