# nguyentrandinhhieu2017-dev/cnpm_24ct1 architecture

> Architecture diagram of the GitHub repository nguyentrandinhhieu2017-dev/cnpm_24ct1, 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/nguyentrandinhhieu2017-dev/cnpm_24ct1
- Repository: https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1

## Overview

This Spring Boot application is a product-auction web app. Users browse/search products, inspect auction activity, and place bids; bids are validated and persisted before live updates are broadcast. Separate flows handle account registration/login/profile recovery, admin product management, a product-advice chatbot, and a QR-code checkout page. The graph reflects sampled controllers and repositories plus named subsystems in the tree; no README was provided, and several controllers/entities are represented only at their known directory paths.

Main entry points: [`src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/BidController.java`](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/BidController.java) (Place bid), [`src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/ProductRepository.java`](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/ProductRepository.java) (Product catalog), [`src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java`](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java) (Auction detail), [`src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/ChatbotController.java`](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/ChatbotController.java) (Product chatbot)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_home["Browse products"]
  node_product_catalog[("Product catalog")]
  node_auction_detail["Auction detail"]
  node_payment["QR checkout"]
end

subgraph group_auction["Auction workflow"]
  node_bids[("Bid history<br/>[BidRepository.java]")]
  node_auction_store[("Auction sessions")]
  node_place_bid["Place bid<br/>[BidController.java]"]
  node_live_updates["Live bid updates"]
end

subgraph group_accounts["Accounts and administration"]
  node_user_controller["Account workflows"]
  node_user_store[("User accounts")]
  node_admin["Product administration"]
end

subgraph group_integrations["External services"]
  node_chatbot["Product chatbot"]
end

node_visitor(("Visitor"))
node_gemini{{"Gemini API"}}
node_browser(("Bid subscribers"))

node_visitor -->|"browse"| node_home
node_home -->|"queries"| node_product_catalog
node_visitor -->|"inspect"| node_auction_detail
node_auction_detail -->|"loads product"| node_product_catalog
node_auction_detail -->|"loads session"| node_auction_store
node_auction_detail -->|"loads history"| node_bids
node_visitor -->|"submits bid"| node_place_bid
node_place_bid -->|"loads bidder"| node_user_store
node_place_bid -->|"loads product"| node_product_catalog
node_place_bid -->|"finds or saves session"| node_auction_store
node_place_bid -->|"checks and saves bids"| node_bids
node_place_bid -->|"publishes price"| node_live_updates
node_live_updates -->|"broadcasts"| node_browser
node_visitor -->|"registers or signs in"| node_user_controller
node_user_controller -->|"reads and saves account"| node_user_store
node_visitor -->|"manages products"| node_admin
node_admin -->|"reads and writes"| node_product_catalog
node_visitor -->|"opens checkout"| node_payment
node_visitor -->|"asks advice"| node_chatbot
node_chatbot -->|"loads inventory"| node_product_catalog
node_chatbot -.->|"sends prompt"| node_gemini

click node_home "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java"
click node_product_catalog "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/ProductRepository.java"
click node_auction_detail "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java"
click node_bids "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/BidRepository.java"
click node_auction_store "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/AuctionRepository.java"
click node_place_bid "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/BidController.java"
click node_live_updates "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/config/WebSocketConfig.java"
click node_user_controller "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/UserController.java"
click node_user_store "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/UserRepository.java"
click node_admin "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/AdminController.java"
click node_payment "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/PaymentController.java"
click node_chatbot "https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/ChatbotController.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_home,node_product_catalog,node_auction_detail,node_payment toneBlue
class node_bids,node_auction_store,node_place_bid,node_live_updates toneAmber
class node_user_controller,node_user_store,node_admin,node_gemini toneMint
class node_chatbot toneRose
class node_visitor,node_browser toneIndigo
```

## Components

### Web experience

- [Browse products](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java`
- [Product catalog](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/ProductRepository.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/ProductRepository.java`
- [Auction detail](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/HomeController.java`
- [QR checkout](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/PaymentController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/PaymentController.java`

### Auction workflow

- [Bid history](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/BidRepository.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/BidRepository.java`
- [Auction sessions](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/AuctionRepository.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/AuctionRepository.java`
- [Place bid](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/BidController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/BidController.java`
- [Live bid updates](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/config/WebSocketConfig.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/config/WebSocketConfig.java`

### Accounts and administration

- [Account workflows](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/UserController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/UserController.java`
- [User accounts](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/UserRepository.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/repository/UserRepository.java`
- [Product administration](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/AdminController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/AdminController.java`

### External services

- [Product chatbot](https://github.com/nguyentrandinhhieu2017-dev/cnpm_24ct1/blob/main/src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/ChatbotController.java): `src/main/java/_CT1_NGUYEN_TRAN_DINH_HIEU/controller/ChatbotController.java`

### Other components

- **Visitor**
- **Gemini API**
- **Bid subscribers**

## Connections

- Visitor → Browse products: browse
- Browse products → Product catalog: queries
- Visitor → Auction detail: inspect
- Auction detail → Product catalog: loads product
- Auction detail → Auction sessions: loads session
- Auction detail → Bid history: loads history
- Visitor → Place bid: submits bid
- Place bid → User accounts: loads bidder
- Place bid → Product catalog: loads product
- Place bid → Auction sessions: finds or saves session
- Place bid → Bid history: checks and saves bids
- Place bid → Live bid updates: publishes price
- Live bid updates → Bid subscribers: broadcasts
- Visitor → Account workflows: registers or signs in
- Account workflows → User accounts: reads and saves account
- Visitor → Product administration: manages products
- Product administration → Product catalog: reads and writes
- Visitor → QR checkout: opens checkout
- Visitor → Product chatbot: asks advice
- Product chatbot → Product catalog: loads inventory
- Product chatbot → Gemini API: sends prompt
