# zidanr2005/tokoonline architecture

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

- Interactive diagram: https://gitdiagram.com/zidanr2005/tokoonline
- Repository: https://github.com/zidanr2005/tokoonline

## Overview

This is a Laravel online shop, with storefront browsing and a customer order workflow alongside administration of products, categories, customers, and users. The main customer journey is browse products, manage a pending cart, select shipping, and review order history; order handling also calls the RajaOngkir API for shipping data and cost. The graph includes the sampled controller/model/view interactions and documented routing. Routes and several controller implementations were not excerpted, so unverified dispatch links are omitted.

Main entry points: [`app/Http/Controllers/OrderController.php`](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/OrderController.php) (Cart and checkout), [`app/Models/Produk.php`](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Produk.php) (Products), [`app/Http/Controllers/ProdukController.php`](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/ProdukController.php) (Product catalog), [`app/Models/Customer.php`](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Customer.php) (Customers)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_storefront["Storefront"]
  node_catalog["Product catalog"]
  node_product_pages["Product pages"]
  node_store_layout["Store layout<br/>[app.blade.php]"]
end

subgraph group_orders["Ordering"]
  node_order_workflow["Cart and checkout"]
  node_order_pages["Order pages"]
  node_shipping_api{{"RajaOngkir API"}}
end

subgraph group_admin["Administration"]
  node_admin_product["Product management"]
  node_admin_customer["Customer management"]
  node_admin_users["User management<br/>[UserController.php]"]
  node_admin_categories["Category management"]
  node_admin_layout["Admin layout<br/>[app.blade.php]"]
end

subgraph group_domain["Domain models"]
  node_orders_model[("Orders and items<br/>[Order.php]")]
  node_products_model[("Products<br/>[Produk.php]")]
  node_category_model[("Categories<br/>[Kategori.php]")]
  node_customer_model[("Customers<br/>[Customer.php]")]
  node_user_model[("Users<br/>[User.php]")]
  node_image_helper["Image processing<br/>[ImageHelper.php]"]
end

subgraph group_runtime["Laravel runtime"]
  node_http_entry["HTTP entry<br/>[index.php]"]
  node_route_setup["Route setup"]
  node_web_routes["Web routes<br/>[web.php]"]
end

node_shopper(("Shopper"))

node_shopper -->|"views storefront"| node_store_layout
node_store_layout -->|"links products"| node_catalog
node_catalog -->|"queries products"| node_products_model
node_catalog -->|"queries categories"| node_category_model
node_catalog -->|"renders pages"| node_product_pages
node_admin_product -->|"resizes images"| node_image_helper
node_admin_product -->|"updates products"| node_products_model
node_admin_product -->|"loads categories"| node_category_model
node_order_workflow -->|"finds customer"| node_customer_model
node_order_workflow -->|"checks stock"| node_products_model
node_order_workflow -->|"manages cart"| node_orders_model
node_order_workflow -->|"renders checkout"| node_order_pages
node_order_workflow -->|"requests rates"| node_shipping_api
node_admin_customer -->|"manages customers"| node_customer_model
node_admin_customer -->|"uses user records"| node_user_model
node_admin_customer -->|"processes images"| node_image_helper
node_admin_users -->|"manages users"| node_user_model
node_admin_users -->|"processes images"| node_image_helper
node_customer_model -->|"belongs to"| node_user_model
node_orders_model -->|"belongs to"| node_customer_model
node_orders_model -->|"items reference"| node_products_model
node_products_model -->|"belongs to"| node_category_model
node_http_entry -->|"boots application"| node_route_setup
node_route_setup -->|"loads routes"| node_web_routes
node_admin_layout -->|"links management"| node_admin_product
node_admin_layout -->|"links management"| node_admin_categories

click node_catalog "https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/ProdukController.php"
click node_product_pages "https://github.com/zidanr2005/tokoonline/tree/main/resources/views/v_produk"
click node_store_layout "https://github.com/zidanr2005/tokoonline/blob/main/resources/views/v_layouts/app.blade.php"
click node_order_workflow "https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/OrderController.php"
click node_order_pages "https://github.com/zidanr2005/tokoonline/tree/main/resources/views/v_order"
click node_admin_product "https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/ProdukController.php"
click node_admin_customer "https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/CustomerController.php"
click node_admin_users "https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/UserController.php"
click node_admin_categories "https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/KategoriController.php"
click node_admin_layout "https://github.com/zidanr2005/tokoonline/blob/main/resources/views/backend/v_layouts/app.blade.php"
click node_orders_model "https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Order.php"
click node_products_model "https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Produk.php"
click node_category_model "https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Kategori.php"
click node_customer_model "https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Customer.php"
click node_user_model "https://github.com/zidanr2005/tokoonline/blob/main/app/Models/User.php"
click node_image_helper "https://github.com/zidanr2005/tokoonline/blob/main/app/Helpers/ImageHelper.php"
click node_http_entry "https://github.com/zidanr2005/tokoonline/blob/main/public/index.php"
click node_route_setup "https://github.com/zidanr2005/tokoonline/blob/main/app/Providers/RouteServiceProvider.php"
click node_web_routes "https://github.com/zidanr2005/tokoonline/blob/main/routes/web.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_catalog,node_product_pages,node_store_layout toneBlue
class node_order_workflow,node_order_pages,node_shipping_api toneAmber
class node_admin_product,node_admin_customer,node_admin_users,node_admin_categories,node_admin_layout toneMint
class node_orders_model,node_products_model,node_category_model,node_customer_model,node_user_model,node_image_helper toneRose
class node_http_entry,node_route_setup,node_web_routes,node_shopper toneIndigo
```

## Components

### Storefront

- [Product catalog](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/ProdukController.php): `app/Http/Controllers/ProdukController.php`
- [Product pages](https://github.com/zidanr2005/tokoonline/tree/main/resources/views/v_produk): `resources/views/v_produk`
- [Store layout](https://github.com/zidanr2005/tokoonline/blob/main/resources/views/v_layouts/app.blade.php): `resources/views/v_layouts/app.blade.php`

### Ordering

- [Cart and checkout](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/OrderController.php): `app/Http/Controllers/OrderController.php`
- [Order pages](https://github.com/zidanr2005/tokoonline/tree/main/resources/views/v_order): `resources/views/v_order`
- **RajaOngkir API**

### Administration

- [Product management](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/ProdukController.php): `app/Http/Controllers/ProdukController.php`
- [Customer management](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/CustomerController.php): `app/Http/Controllers/CustomerController.php`
- [User management](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/UserController.php): `app/Http/Controllers/UserController.php`
- [Category management](https://github.com/zidanr2005/tokoonline/blob/main/app/Http/Controllers/KategoriController.php): `app/Http/Controllers/KategoriController.php`
- [Admin layout](https://github.com/zidanr2005/tokoonline/blob/main/resources/views/backend/v_layouts/app.blade.php): `resources/views/backend/v_layouts/app.blade.php`

### Domain models

- [Orders and items](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Order.php): `app/Models/Order.php`
- [Products](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Produk.php): `app/Models/Produk.php`
- [Categories](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Kategori.php): `app/Models/Kategori.php`
- [Customers](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/Customer.php): `app/Models/Customer.php`
- [Users](https://github.com/zidanr2005/tokoonline/blob/main/app/Models/User.php): `app/Models/User.php`
- [Image processing](https://github.com/zidanr2005/tokoonline/blob/main/app/Helpers/ImageHelper.php): `app/Helpers/ImageHelper.php`

### Laravel runtime

- [HTTP entry](https://github.com/zidanr2005/tokoonline/blob/main/public/index.php): `public/index.php`
- [Route setup](https://github.com/zidanr2005/tokoonline/blob/main/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/zidanr2005/tokoonline/blob/main/routes/web.php): `routes/web.php`

### Other components

- **Shopper**

## Connections

- Shopper → Store layout: views storefront (evidence: `resources/views/v_layouts/app.blade.php`)
- Store layout → Product catalog: links products (evidence: `resources/views/v_layouts/app.blade.php`)
- Product catalog → Products: queries products (evidence: `app/Http/Controllers/ProdukController.php`)
- Product catalog → Categories: queries categories (evidence: `app/Http/Controllers/ProdukController.php`)
- Product catalog → Product pages: renders pages (evidence: `app/Http/Controllers/ProdukController.php`)
- Product management → Image processing: resizes images (evidence: `app/Http/Controllers/ProdukController.php`)
- Product management → Products: updates products (evidence: `app/Http/Controllers/ProdukController.php`)
- Product management → Categories: loads categories (evidence: `app/Http/Controllers/ProdukController.php`)
- Cart and checkout → Customers: finds customer (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and checkout → Products: checks stock (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and checkout → Orders and items: manages cart (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and checkout → Order pages: renders checkout (evidence: `app/Http/Controllers/OrderController.php`)
- Cart and checkout → RajaOngkir API: requests rates (evidence: `app/Http/Controllers/OrderController.php`)
- Customer management → Customers: manages customers (evidence: `app/Http/Controllers/CustomerController.php`)
- Customer management → Users: uses user records (evidence: `app/Http/Controllers/CustomerController.php`)
- Customer management → Image processing: processes images (evidence: `app/Http/Controllers/CustomerController.php`)
- User management → Users: manages users (evidence: `app/Http/Controllers/UserController.php`)
- User management → Image processing: processes images (evidence: `app/Http/Controllers/UserController.php`)
- Customers → Users: belongs to (evidence: `app/Models/Customer.php`)
- Orders and items → Customers: belongs to (evidence: `app/Models/Order.php`)
- Orders and items → Products: items reference (evidence: `app/Models/OrderItem.php`)
- Products → Categories: belongs to (evidence: `app/Models/Produk.php`)
- HTTP entry → Route setup: boots application (evidence: `public/index.php`)
- Route setup → Web routes: loads routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Admin layout → Product management: links management (evidence: `resources/views/backend/v_layouts/app.blade.php`)
- Admin layout → Category management: links management (evidence: `resources/views/backend/v_layouts/app.blade.php`)
