# 2026-kb-wms/sports-wms-server architecture

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

- Interactive diagram: https://gitdiagram.com/2026-kb-wms/sports-wms-server
- Repository: https://github.com/2026-kb-wms/sports-wms-server

## Overview

Sports WMS is a Spring backend for headquarters, warehouse, and store staff to manage products, purchasing, inbound receipts, inventory, store orders, and outbound fulfillment. The principal flow is a store order being fulfilled through outbound stock allocation and picking, with inventory updated and store-order lines reconciled. The tree and README establish the wider domain capabilities; sampled source confirms parts of authentication, inventory querying, and fulfillment. Many controller-to-service and unsampled domain links are therefore omitted or marked unverified.

Main entry points: [`src/main/java/com/kb/wms/outbound/application/service/OutboundFulfillmentService.java`](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/application/service/OutboundFulfillmentService.java) (Outbound Fulfillment), [`src/main/java/com/kb/wms/auth/application/service/AuthService.java`](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/application/service/AuthService.java) (Authentication), [`src/main/java/com/kb/wms/auth/adapter/in/web/AuthController.java`](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/adapter/in/web/AuthController.java) (Auth API), [`src/main/java/com/kb/wms/inbound/application/service/PurchaseOrderService.java`](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inbound/application/service/PurchaseOrderService.java) (Suppliers and POs)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_access["Identity and Access"]
  node_auth_api["Auth API"]
  node_auth_service["Authentication<br/>[AuthService.java]"]
  node_user_store[("User Accounts")]
  node_jwt["JWT Security<br/>[JwtProvider.java]"]
end

subgraph group_catalog["Catalog and Locations"]
  node_product["Products and SKUs"]
  node_warehouse["Warehouses and Sections"]
  node_store["Stores and Members<br/>[StoreService.java]"]
end

subgraph group_stock["Inbound and Inventory"]
  node_supplier_po["Suppliers and POs"]
  node_inbound["Inbound Receiving"]
  node_inventory_query["Inventory Queries"]
  node_inventory_data[("Inventory and Lots")]
end

subgraph group_orders["Order Fulfillment"]
  node_store_order["Store Orders"]
  node_store_fulfillment["Order Reconciliation"]
  node_allocation["Stock Allocation"]
  node_outbound["Outbound Fulfillment"]
  node_outbound_query[("Allocation Queries")]
end

subgraph group_shared["Shared Services"]
  node_history["Status History"]
  node_security_context["User Context"]
  node_api_errors["API Error Mapping"]
end

node_staff(("Staff"))

node_staff -->|"logs in"| node_auth_api
node_auth_api -.->|"delegates to"| node_auth_service
node_auth_service -->|"loads account"| node_user_store
node_auth_service -->|"creates token"| node_jwt
node_staff -.->|"manages catalog"| node_product
node_staff -.->|"manages locations"| node_warehouse
node_staff -.->|"manages stores"| node_store
node_staff -.->|"places purchase orders"| node_supplier_po
node_supplier_po -.->|"receives goods"| node_inbound
node_staff -.->|"checks stock"| node_inventory_query
node_inventory_query -->|"queries"| node_inventory_data
node_staff -.->|"requests stock"| node_store_order
node_store_order -.->|"allocates stock"| node_allocation
node_allocation -.->|"queries candidates"| node_outbound_query
node_outbound -->|"applies picked quantities"| node_store_fulfillment
node_outbound -.->|"records changes"| node_history
node_store_fulfillment -.->|"records changes"| node_history
node_outbound -.->|"ships stock"| node_inventory_data
node_staff -.->|"authenticated as"| node_security_context
node_api_errors -.->|"returns errors"| node_staff

click node_auth_api "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/adapter/in/web/AuthController.java"
click node_auth_service "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/application/service/AuthService.java"
click node_user_store "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/adapter/out/persistence/UserPersistenceAdapter.java"
click node_jwt "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/common/security/JwtProvider.java"
click node_product "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/product/application/service/ProductService.java"
click node_warehouse "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/warehouse/application/service/WarehouseService.java"
click node_store "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/store/application/service/StoreService.java"
click node_supplier_po "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inbound/application/service/PurchaseOrderService.java"
click node_inbound "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inbound/application/service/InboundCompleteService.java"
click node_inventory_query "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inventory/application/service/InventoryQueryService.java"
click node_inventory_data "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inventory/adapter/out/persistence/InventoryLotPersistenceAdapter.java"
click node_store_order "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/storeorder/application/service/StoreOrderService.java"
click node_store_fulfillment "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/storeorder/application/service/StoreOrderFulfillmentService.java"
click node_allocation "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/application/service/StockAllocationService.java"
click node_outbound "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/application/service/OutboundFulfillmentService.java"
click node_outbound_query "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/adapter/out/persistence/repository/StockAllocationQueryJpaRepository.java"
click node_history "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/statushistory/application/service/StatusHistoryService.java"
click node_security_context "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/common/security/AuthenticatedUser.java"
click node_api_errors "https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/common/exception/GlobalExceptionHandler.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_auth_api,node_auth_service,node_user_store,node_jwt toneBlue
class node_product,node_warehouse,node_store toneAmber
class node_supplier_po,node_inbound,node_inventory_query,node_inventory_data toneMint
class node_store_order,node_store_fulfillment,node_allocation,node_outbound,node_outbound_query toneRose
class node_history,node_security_context,node_api_errors,node_staff toneIndigo
```

## Components

### Identity and Access

- [Auth API](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/adapter/in/web/AuthController.java): `src/main/java/com/kb/wms/auth/adapter/in/web/AuthController.java`
- [Authentication](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/application/service/AuthService.java): `src/main/java/com/kb/wms/auth/application/service/AuthService.java`
- [User Accounts](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/auth/adapter/out/persistence/UserPersistenceAdapter.java): `src/main/java/com/kb/wms/auth/adapter/out/persistence/UserPersistenceAdapter.java`
- [JWT Security](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/common/security/JwtProvider.java): `src/main/java/com/kb/wms/common/security/JwtProvider.java`

### Catalog and Locations

- [Products and SKUs](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/product/application/service/ProductService.java): `src/main/java/com/kb/wms/product/application/service/ProductService.java`
- [Warehouses and Sections](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/warehouse/application/service/WarehouseService.java): `src/main/java/com/kb/wms/warehouse/application/service/WarehouseService.java`
- [Stores and Members](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/store/application/service/StoreService.java): `src/main/java/com/kb/wms/store/application/service/StoreService.java`

### Inbound and Inventory

- [Suppliers and POs](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inbound/application/service/PurchaseOrderService.java): `src/main/java/com/kb/wms/inbound/application/service/PurchaseOrderService.java`
- [Inbound Receiving](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inbound/application/service/InboundCompleteService.java): `src/main/java/com/kb/wms/inbound/application/service/InboundCompleteService.java`
- [Inventory Queries](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inventory/application/service/InventoryQueryService.java): `src/main/java/com/kb/wms/inventory/application/service/InventoryQueryService.java`
- [Inventory and Lots](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/inventory/adapter/out/persistence/InventoryLotPersistenceAdapter.java): `src/main/java/com/kb/wms/inventory/adapter/out/persistence/InventoryLotPersistenceAdapter.java`

### Order Fulfillment

- [Store Orders](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/storeorder/application/service/StoreOrderService.java): `src/main/java/com/kb/wms/storeorder/application/service/StoreOrderService.java`
- [Order Reconciliation](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/storeorder/application/service/StoreOrderFulfillmentService.java): `src/main/java/com/kb/wms/storeorder/application/service/StoreOrderFulfillmentService.java`
- [Stock Allocation](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/application/service/StockAllocationService.java): `src/main/java/com/kb/wms/outbound/application/service/StockAllocationService.java`
- [Outbound Fulfillment](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/application/service/OutboundFulfillmentService.java): `src/main/java/com/kb/wms/outbound/application/service/OutboundFulfillmentService.java`
- [Allocation Queries](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/outbound/adapter/out/persistence/repository/StockAllocationQueryJpaRepository.java): `src/main/java/com/kb/wms/outbound/adapter/out/persistence/repository/StockAllocationQueryJpaRepository.java`

### Shared Services

- [Status History](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/statushistory/application/service/StatusHistoryService.java): `src/main/java/com/kb/wms/statushistory/application/service/StatusHistoryService.java`
- [User Context](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/common/security/AuthenticatedUser.java): `src/main/java/com/kb/wms/common/security/AuthenticatedUser.java`
- [API Error Mapping](https://github.com/2026-kb-wms/sports-wms-server/blob/develop/src/main/java/com/kb/wms/common/exception/GlobalExceptionHandler.java): `src/main/java/com/kb/wms/common/exception/GlobalExceptionHandler.java`

### Other components

- **Staff**

## Connections

- Staff → Auth API: logs in (evidence: `README.md`)
- Auth API → Authentication: delegates to
- Authentication → User Accounts: loads account (evidence: `src/main/java/com/kb/wms/auth/application/service/AuthService.java`)
- Authentication → JWT Security: creates token (evidence: `src/main/java/com/kb/wms/auth/application/service/AuthService.java`)
- Staff → Products and SKUs: manages catalog
- Staff → Warehouses and Sections: manages locations
- Staff → Stores and Members: manages stores
- Staff → Suppliers and POs: places purchase orders
- Suppliers and POs → Inbound Receiving: receives goods
- Staff → Inventory Queries: checks stock
- Inventory Queries → Inventory and Lots: queries (evidence: `src/main/java/com/kb/wms/inventory/application/service/InventoryQueryService.java`)
- Staff → Store Orders: requests stock
- Store Orders → Stock Allocation: allocates stock
- Stock Allocation → Allocation Queries: queries candidates
- Outbound Fulfillment → Order Reconciliation: applies picked quantities (evidence: `src/main/java/com/kb/wms/outbound/application/service/OutboundFulfillmentService.java`)
- Outbound Fulfillment → Status History: records changes
- Order Reconciliation → Status History: records changes
- Outbound Fulfillment → Inventory and Lots: ships stock
- Staff → User Context: authenticated as
- API Error Mapping → Staff: returns errors
