# trantrongtan096/techzone-store architecture

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

- Interactive diagram: https://gitdiagram.com/trantrongtan096/techzone-store
- Repository: https://github.com/trantrongtan096/techzone-store

## Overview

TechZone is an online-store application with an Angular storefront and administration UI backed by a Spring service. The customer journey runs from product discovery through cart, checkout, payment, and order tracking; separate branches cover account access, editorial content, and store administration. The sampled order service explicitly reserves stock, saves an order, creates a payment, and clears the cart. README provides no feature detail, and several frontend and backend subsystems are unsampled, so some links are intentionally omitted or marked unverified.

Main entry points: [`techzone-frontend/src/app/app.routes.ts`](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/app.routes.ts) (Page routing), [`techzone-backend/src/main/java/com/techzone/service/OrderService.java`](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/OrderService.java) (Order service), [`techzone-backend/src/main/java/com/techzone/service/ProductService.java`](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/ProductService.java) (Catalog service), [`techzone-backend/src/main/java/com/techzone/service/AuthService.java`](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/AuthService.java) (Authentication service)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Storefront"]
  node_routes["Page routing<br/>[app.routes.ts]"]
  node_home["Storefront home<br/>[home.component.ts]"]
  node_catalog_ui["Product browsing"]
  node_product_detail["Product detail"]
  node_cart_ui["Shopping cart<br/>[cart.component.ts]"]
  node_checkout_ui["Checkout"]
  node_payment_ui["Payment pages"]
  node_orders_ui["Order history"]
  node_content_ui["Article pages"]
  node_admin_ui["Admin workspace"]
end

subgraph group_identity["Accounts &amp; Security"]
  node_auth_ui["Authentication client<br/>[auth.service.ts]"]
  node_auth_service["Authentication service<br/>[AuthService.java]"]
  node_user_store[("User records")]
end

subgraph group_commerce["Commerce Backend"]
  node_product_service["Catalog service"]
  node_product_store[("Product catalog")]
  node_order_service["Order service<br/>[OrderService.java]"]
  node_order_store[("Order records")]
  node_cart_store[("Cart records")]
  node_payment_service["Payment service"]
  node_payment_store[("Payment transactions")]
end

subgraph group_operations["Store Operations"]
  node_cloudinary["Cloudinary media"]
  node_admin_product_api["Product administration API"]
  node_admin_brand_api["Brand administration API"]
  node_admin_category_api["Category administration API"]
end

node_shopper(("Shopper"))
node_admin(("Administrator"))

node_shopper -->|"browses"| node_routes
node_admin -->|"opens admin"| node_routes
node_routes -->|"routes to"| node_home
node_routes -->|"routes to"| node_catalog_ui
node_routes -->|"routes to"| node_product_detail
node_routes -->|"routes to"| node_cart_ui
node_routes -->|"routes to"| node_checkout_ui
node_routes -->|"routes to"| node_payment_ui
node_routes -->|"routes to"| node_orders_ui
node_routes -->|"routes to"| node_content_ui
node_routes -->|"routes to"| node_admin_ui
node_auth_ui -.->|"calls auth API"| node_auth_service
node_auth_service -->|"reads and saves"| node_user_store
node_product_service -->|"queries catalog"| node_product_store
node_product_service -->|"uploads media"| node_cloudinary
node_admin_product_api -->|"delegates to"| node_product_service
node_admin_brand_api -.->|"serves requests"| node_admin
node_admin_category_api -.->|"serves requests"| node_admin
node_order_service -->|"loads and clears"| node_cart_store
node_order_service -->|"saves order"| node_order_store
node_order_service -->|"creates payment"| node_payment_service
node_payment_service -->|"reads and records"| node_payment_store

click node_routes "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/app.routes.ts"
click node_home "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/home/home.component.ts"
click node_catalog_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/product-list/product-list.component.ts"
click node_product_detail "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/product-detail/product-detail.component.ts"
click node_cart_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/cart/cart.component.ts"
click node_checkout_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/checkout/checkout.component.ts"
click node_payment_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/payment/payment.component.ts"
click node_orders_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/my-orders/my-orders.component.ts"
click node_content_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/article-list/article-list.component.ts"
click node_admin_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/admin/admin-product-list/admin-product-list.component.ts"
click node_auth_ui "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/services/auth.service.ts"
click node_auth_service "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/AuthService.java"
click node_user_store "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/UserRepository.java"
click node_product_service "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/ProductService.java"
click node_product_store "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/ProductRepository.java"
click node_order_service "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/OrderService.java"
click node_order_store "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/OrderRepository.java"
click node_cart_store "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/CartRepository.java"
click node_payment_service "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/PaymentService.java"
click node_payment_store "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/PaymentTransactionRepository.java"
click node_cloudinary "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/CloudinaryService.java"
click node_admin_product_api "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/controller/AdminProductController.java"
click node_admin_brand_api "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/controller/AdminBrandController.java"
click node_admin_category_api "https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/controller/AdminCategoryController.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_routes,node_home,node_catalog_ui,node_product_detail,node_cart_ui,node_checkout_ui,node_payment_ui,node_orders_ui,node_content_ui,node_admin_ui toneBlue
class node_auth_ui,node_auth_service,node_user_store toneAmber
class node_product_service,node_product_store,node_order_service,node_order_store,node_cart_store,node_payment_service,node_payment_store toneMint
class node_cloudinary,node_admin_product_api,node_admin_brand_api,node_admin_category_api toneRose
class node_shopper,node_admin toneIndigo
```

## Components

### Storefront

- [Page routing](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/app.routes.ts): `techzone-frontend/src/app/app.routes.ts`
- [Storefront home](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/home/home.component.ts): `techzone-frontend/src/app/pages/home/home.component.ts`
- [Product browsing](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/product-list/product-list.component.ts): `techzone-frontend/src/app/pages/product-list/product-list.component.ts`
- [Product detail](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/product-detail/product-detail.component.ts): `techzone-frontend/src/app/pages/product-detail/product-detail.component.ts`
- [Shopping cart](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/cart/cart.component.ts): `techzone-frontend/src/app/pages/cart/cart.component.ts`
- [Checkout](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/checkout/checkout.component.ts): `techzone-frontend/src/app/pages/checkout/checkout.component.ts`
- [Payment pages](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/payment/payment.component.ts): `techzone-frontend/src/app/pages/payment/payment.component.ts`
- [Order history](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/my-orders/my-orders.component.ts): `techzone-frontend/src/app/pages/my-orders/my-orders.component.ts`
- [Article pages](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/article-list/article-list.component.ts): `techzone-frontend/src/app/pages/article-list/article-list.component.ts`
- [Admin workspace](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/pages/admin/admin-product-list/admin-product-list.component.ts): `techzone-frontend/src/app/pages/admin/admin-product-list/admin-product-list.component.ts`

### Accounts & Security

- [Authentication client](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-frontend/src/app/services/auth.service.ts): `techzone-frontend/src/app/services/auth.service.ts`
- [Authentication service](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/AuthService.java): `techzone-backend/src/main/java/com/techzone/service/AuthService.java`
- [User records](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/UserRepository.java): `techzone-backend/src/main/java/com/techzone/repository/UserRepository.java`

### Commerce Backend

- [Catalog service](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/ProductService.java): `techzone-backend/src/main/java/com/techzone/service/ProductService.java`
- [Product catalog](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/ProductRepository.java): `techzone-backend/src/main/java/com/techzone/repository/ProductRepository.java`
- [Order service](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/OrderService.java): `techzone-backend/src/main/java/com/techzone/service/OrderService.java`
- [Order records](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/OrderRepository.java): `techzone-backend/src/main/java/com/techzone/repository/OrderRepository.java`
- [Cart records](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/CartRepository.java): `techzone-backend/src/main/java/com/techzone/repository/CartRepository.java`
- [Payment service](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/PaymentService.java): `techzone-backend/src/main/java/com/techzone/service/PaymentService.java`
- [Payment transactions](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/repository/PaymentTransactionRepository.java): `techzone-backend/src/main/java/com/techzone/repository/PaymentTransactionRepository.java`

### Store Operations

- [Cloudinary media](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/service/CloudinaryService.java): `techzone-backend/src/main/java/com/techzone/service/CloudinaryService.java`
- [Product administration API](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/controller/AdminProductController.java): `techzone-backend/src/main/java/com/techzone/controller/AdminProductController.java`
- [Brand administration API](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/controller/AdminBrandController.java): `techzone-backend/src/main/java/com/techzone/controller/AdminBrandController.java`
- [Category administration API](https://github.com/trantrongtan096/techzone-store/blob/main/techzone-backend/src/main/java/com/techzone/controller/AdminCategoryController.java): `techzone-backend/src/main/java/com/techzone/controller/AdminCategoryController.java`

### Other components

- **Shopper**
- **Administrator**

## Connections

- Shopper → Page routing: browses (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Administrator → Page routing: opens admin (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Storefront home: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Product browsing: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Product detail: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Shopping cart: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Checkout: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Payment pages: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Order history: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Article pages: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Page routing → Admin workspace: routes to (evidence: `techzone-frontend/src/app/app.routes.ts`)
- Authentication client → Authentication service: calls auth API
- Authentication service → User records: reads and saves (evidence: `techzone-backend/src/main/java/com/techzone/service/AuthService.java`)
- Catalog service → Product catalog: queries catalog (evidence: `techzone-backend/src/main/java/com/techzone/service/ProductService.java`)
- Catalog service → Cloudinary media: uploads media (evidence: `techzone-backend/src/main/java/com/techzone/service/ProductService.java`)
- Product administration API → Catalog service: delegates to (evidence: `techzone-backend/src/main/java/com/techzone/controller/AdminProductController.java`)
- Brand administration API → Administrator: serves requests
- Category administration API → Administrator: serves requests
- Order service → Cart records: loads and clears (evidence: `techzone-backend/src/main/java/com/techzone/service/OrderService.java`)
- Order service → Order records: saves order (evidence: `techzone-backend/src/main/java/com/techzone/service/OrderService.java`)
- Order service → Payment service: creates payment (evidence: `techzone-backend/src/main/java/com/techzone/service/OrderService.java`)
- Payment service → Payment transactions: reads and records (evidence: `techzone-backend/src/main/java/com/techzone/service/PaymentService.java`)
