# kltaekwondo/clothing-system architecture

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

- Interactive diagram: https://gitdiagram.com/kltaekwondo/clothing-system
- Repository: https://github.com/kltaekwondo/clothing-system

## Overview

This is a clothing sales and inventory management system with a Vue 3 client and Spring Boot API. Staff use the checkout flow to create or complete sales; administrators manage products, people, purchasing, transfers, stock checks and reporting. The backend separates controllers, business services and JPA repositories, with MySQL for application records and Redis for optional session controls. The README documents an AI chat and tool capability. Some subsystem wiring is represented at the documented layer level because its source was not sampled.

Main entry points: [`backend/src/main/java/com/superkl/backend/controller`](https://github.com/kltaekwondo/clothing-system/tree/main/backend/src/main/java/com/superkl/backend/controller) (API controllers), [`frontend/src/axios/api/OrderAPI.js`](https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/axios/api/OrderAPI.js) (API clients), [`backend/src/main/java/com/superkl/backend/repository/product/ProductRepository.java`](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/product/ProductRepository.java) (Domain repositories), [`frontend/src/App.vue`](https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/App.vue) (Vue application)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Client experience"]
  node_client_app["Vue application<br/>[App.vue]"]
  node_checkout_ui["Checkout<br/>[Checkout.vue]"]
  node_management_ui["Management pages<br/>[Manage.vue]"]
  node_client_api["API clients<br/>[OrderAPI.js]"]
end

subgraph group_operations["Sales and inventory"]
  node_order_api["Order endpoints"]
  node_order_service["Sales orders<br/>[OrderService.java]"]
  node_stock_service["Warehouse stock"]
  node_procurement["Purchasing and transfers"]
  node_stock_checks["Stock checks"]
end

subgraph group_management["Management and reporting"]
  node_product_service["Products and SKUs"]
  node_basic_service["People and warehouses"]
  node_dashboard_service["Dashboards and statistics"]
  node_ai_chat["AI chat and tools"]
end

subgraph group_backend["Backend services"]
  node_controllers["API controllers"]
  node_auth["Authentication and sessions"]
end

subgraph group_persistence["Persistence and integrations"]
  node_order_data["Order repositories"]
  node_stock_data["Stock repositories"]
  node_business_data["Domain repositories"]
  node_mysql[("MySQL database")]
  node_redis[("Redis")]
  node_ai_model["AI model service"]
end

node_staff(("Staff user"))

node_staff -->|"uses"| node_client_app
node_client_app -->|"opens checkout"| node_checkout_ui
node_client_app -->|"opens management"| node_management_ui
node_checkout_ui -->|"requests sales"| node_client_api
node_management_ui -->|"requests operations"| node_client_api
node_client_api -->|"HTTP requests"| node_order_api
node_client_api -->|"HTTP requests"| node_controllers
node_order_api -->|"delegates"| node_order_service
node_controllers -->|"delegates"| node_product_service
node_controllers -->|"delegates"| node_basic_service
node_controllers -->|"delegates"| node_procurement
node_controllers -->|"delegates"| node_stock_checks
node_controllers -->|"delegates"| node_dashboard_service
node_controllers -->|"delegates"| node_ai_chat
node_controllers -->|"delegates"| node_auth
node_order_service -->|"adjusts stock"| node_stock_service
node_order_service -->|"reads and writes"| node_order_data
node_stock_service -->|"reads and writes"| node_stock_data
node_procurement -->|"reads and writes"| node_business_data
node_stock_checks -->|"reads and writes"| node_stock_data
node_product_service -->|"reads and writes"| node_business_data
node_basic_service -->|"reads and writes"| node_business_data
node_dashboard_service -->|"queries totals"| node_order_data
node_ai_chat -.->|"chat requests"| node_ai_model
node_ai_chat -->|"invokes dashboard tool"| node_dashboard_service
node_auth -.->|"records sessions"| node_redis
node_order_data -->|"persists records"| node_mysql
node_stock_data -->|"persists stock"| node_mysql
node_business_data -->|"persists records"| node_mysql

click node_client_app "https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/App.vue"
click node_checkout_ui "https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/page/checkout/Checkout.vue"
click node_management_ui "https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/page/manage/Manage.vue"
click node_client_api "https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/axios/api/OrderAPI.js"
click node_order_api "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/controller/order/OrderController.java"
click node_order_service "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/order/OrderService.java"
click node_stock_service "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/stock/WareHouseStockService.java"
click node_procurement "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/order/ImportOrderService.java"
click node_stock_checks "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/order/StockCheckService.java"
click node_product_service "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/product/ProductSkuService.java"
click node_basic_service "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/basic/WareHouseService.java"
click node_dashboard_service "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/dash/OrderDashboardService.java"
click node_ai_chat "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/springai/AIChatClientService.java"
click node_controllers "https://github.com/kltaekwondo/clothing-system/tree/main/backend/src/main/java/com/superkl/backend/controller"
click node_auth "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/auth/AuthRedisService.java"
click node_order_data "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/order/OrderRepository.java"
click node_stock_data "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/stock/WareHouseStockRepository.java"
click node_business_data "https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/product/ProductRepository.java"

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_client_app,node_checkout_ui,node_management_ui,node_client_api,node_staff toneBlue
class node_order_api,node_order_service,node_stock_service,node_procurement,node_stock_checks toneAmber
class node_product_service,node_basic_service,node_dashboard_service,node_ai_chat toneMint
class node_controllers,node_auth toneRose
class node_order_data,node_stock_data,node_business_data,node_mysql,node_redis,node_ai_model toneIndigo
```

## Components

### Client experience

- [Vue application](https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/App.vue): `frontend/src/App.vue`
- [Checkout](https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/page/checkout/Checkout.vue): `frontend/src/page/checkout/Checkout.vue`
- [Management pages](https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/page/manage/Manage.vue): `frontend/src/page/manage/Manage.vue`
- [API clients](https://github.com/kltaekwondo/clothing-system/blob/main/frontend/src/axios/api/OrderAPI.js): `frontend/src/axios/api/OrderAPI.js`

### Sales and inventory

- [Order endpoints](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/controller/order/OrderController.java): `backend/src/main/java/com/superkl/backend/controller/order/OrderController.java`
- [Sales orders](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/order/OrderService.java): `backend/src/main/java/com/superkl/backend/service/order/OrderService.java`
- [Warehouse stock](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/stock/WareHouseStockService.java): `backend/src/main/java/com/superkl/backend/service/stock/WareHouseStockService.java`
- [Purchasing and transfers](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/order/ImportOrderService.java): `backend/src/main/java/com/superkl/backend/service/order/ImportOrderService.java`
- [Stock checks](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/order/StockCheckService.java): `backend/src/main/java/com/superkl/backend/service/order/StockCheckService.java`

### Management and reporting

- [Products and SKUs](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/product/ProductSkuService.java): `backend/src/main/java/com/superkl/backend/service/product/ProductSkuService.java`
- [People and warehouses](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/basic/WareHouseService.java): `backend/src/main/java/com/superkl/backend/service/basic/WareHouseService.java`
- [Dashboards and statistics](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/dash/OrderDashboardService.java): `backend/src/main/java/com/superkl/backend/service/dash/OrderDashboardService.java`
- [AI chat and tools](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/springai/AIChatClientService.java): `backend/src/main/java/com/superkl/backend/service/springai/AIChatClientService.java`

### Backend services

- [API controllers](https://github.com/kltaekwondo/clothing-system/tree/main/backend/src/main/java/com/superkl/backend/controller): `backend/src/main/java/com/superkl/backend/controller`
- [Authentication and sessions](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/service/auth/AuthRedisService.java): `backend/src/main/java/com/superkl/backend/service/auth/AuthRedisService.java`

### Persistence and integrations

- [Order repositories](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/order/OrderRepository.java): `backend/src/main/java/com/superkl/backend/repository/order/OrderRepository.java`
- [Stock repositories](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/stock/WareHouseStockRepository.java): `backend/src/main/java/com/superkl/backend/repository/stock/WareHouseStockRepository.java`
- [Domain repositories](https://github.com/kltaekwondo/clothing-system/blob/main/backend/src/main/java/com/superkl/backend/repository/product/ProductRepository.java): `backend/src/main/java/com/superkl/backend/repository/product/ProductRepository.java`
- **MySQL database**
- **Redis**
- **AI model service**

### Other components

- **Staff user**

## Connections

- Staff user → Vue application: uses
- Vue application → Checkout: opens checkout
- Vue application → Management pages: opens management
- Checkout → API clients: requests sales
- Management pages → API clients: requests operations
- API clients → Order endpoints: HTTP requests
- API clients → API controllers: HTTP requests
- Order endpoints → Sales orders: delegates
- API controllers → Products and SKUs: delegates
- API controllers → People and warehouses: delegates
- API controllers → Purchasing and transfers: delegates
- API controllers → Stock checks: delegates
- API controllers → Dashboards and statistics: delegates
- API controllers → AI chat and tools: delegates
- API controllers → Authentication and sessions: delegates
- Sales orders → Warehouse stock: adjusts stock
- Sales orders → Order repositories: reads and writes
- Warehouse stock → Stock repositories: reads and writes
- Purchasing and transfers → Domain repositories: reads and writes
- Stock checks → Stock repositories: reads and writes
- Products and SKUs → Domain repositories: reads and writes
- People and warehouses → Domain repositories: reads and writes
- Dashboards and statistics → Order repositories: queries totals
- AI chat and tools → AI model service: chat requests
- AI chat and tools → Dashboards and statistics: invokes dashboard tool
- Authentication and sessions → Redis: records sessions
- Order repositories → MySQL database: persists records
- Stock repositories → MySQL database: persists stock
- Domain repositories → MySQL database: persists records
