# vam12375/muying-mall architecture

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

- Interactive diagram: https://gitdiagram.com/vam12375/muying-mall
- Repository: https://github.com/vam12375/muying-mall

## Overview

Muying Mall is a B2C mother-and-baby commerce platform. Its principal customer journey spans product discovery, cart and order submission, payment, and delivery, with refunds and reviews as after-sales stages. The README also describes promotions, flash sales, community and parenting content, search, and operations features. The tree and README support these capability branches, but sampled source is limited; links between unsampled domain components are therefore shown only where the documented workflow or architecture explicitly supports them.

Main entry points: [`src/main/java/com/muyingmall/controller/user`](https://github.com/vam12375/muying-mall/tree/master/src/main/java/com/muyingmall/controller/user) (Storefront APIs), [`src/main/java/com/muyingmall/controller/user/OrderController.java`](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/OrderController.java) (Order management), [`src/main/java/com/muyingmall/controller/common/PaymentController.java`](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/common/PaymentController.java) (Payment processing), [`src/main/java/com/muyingmall/service/ProductSearchService.java`](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/service/ProductSearchService.java) (Product search)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_commerce["Commerce"]
  node_user_api["Storefront APIs"]
  node_catalog["Product catalog"]
  node_search["Product search"]
  node_search_index[("Search index")]
  node_cart["Cart and checkout"]
  node_orders["Order management"]
  node_payments["Payment processing"]
  node_fulfillment["Shipping and tracking"]
  node_after_sales["Refunds and reviews"]
  node_flash_sales["Flash sales"]
end

subgraph group_engagement["Engagement"]
  node_coupons["Coupons and points"]
  node_community["Parenting community"]
  node_parenting_tips["Parenting tips"]
  node_ai_assistant["AI support"]
end

subgraph group_platform["Platform"]
  node_sql_store[("MySQL data")]
  node_redis[("Redis cache<br/>[LocalCache.java]")]
  node_tcc["TCC coordinator"]
end

subgraph group_operations["Operations"]
  node_admin["Operations console"]
  node_seckill_admin["Flash-sale operations"]
end

node_customer(("Customer"))
node_payment_gateway{{"Alipay"}}
node_amap{{"AMap services"}}
node_mq["RabbitMQ"]

node_customer -->|"uses"| node_user_api
node_user_api -->|"browses"| node_catalog
node_user_api -->|"searches"| node_search
node_search -->|"queries"| node_search_index
node_user_api -->|"adds items"| node_cart
node_cart -->|"submits order"| node_orders
node_orders -->|"requests payment"| node_payments
node_payments -.->|"initiates payment"| node_payment_gateway
node_payment_gateway -.->|"notifies"| node_payments
node_orders -->|"proceeds to shipping"| node_fulfillment
node_fulfillment -.->|"tracks routes"| node_amap
node_user_api -->|"requests after-sales"| node_after_sales
node_user_api -->|"uses rewards"| node_coupons
node_customer -->|"joins sale"| node_flash_sales
node_flash_sales -->|"queues orders"| node_mq
node_mq -->|"dispatches orders"| node_orders
node_customer -->|"participates"| node_community
node_customer -->|"reads tips"| node_parenting_tips
node_customer -->|"asks for help"| node_ai_assistant
node_admin -->|"monitors sales"| node_seckill_admin
node_orders -.->|"coordinates transaction"| node_tcc
node_coupons -.->|"coordinates transaction"| node_tcc
node_orders -->|"persists commerce data"| node_sql_store
node_payments -->|"persists payment data"| node_sql_store
node_catalog -->|"reads catalog data"| node_sql_store
node_search -.->|"uses caching"| node_redis
node_flash_sales -->|"uses stock cache"| node_redis

click node_user_api "https://github.com/vam12375/muying-mall/tree/master/src/main/java/com/muyingmall/controller/user"
click node_catalog "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/common/ProductController.java"
click node_search "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/service/ProductSearchService.java"
click node_search_index "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/repository/ProductSearchRepository.java"
click node_cart "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/CartController.java"
click node_orders "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/OrderController.java"
click node_payments "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/common/PaymentController.java"
click node_fulfillment "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/ShippingController.java"
click node_after_sales "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/RefundController.java"
click node_coupons "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/CouponController.java"
click node_flash_sales "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/SeckillController.java"
click node_community "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/CircleController.java"
click node_parenting_tips "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/ParentingTipController.java"
click node_ai_assistant "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/ai/controller/AiChatController.java"
click node_admin "https://github.com/vam12375/muying-mall/tree/master/src/main/java/com/muyingmall/controller/admin"
click node_seckill_admin "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/admin/SeckillMonitorAdminController.java"
click node_redis "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/cache/LocalCache.java"
click node_tcc "https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/tcc/TccTransactionManager.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_user_api,node_catalog,node_search,node_search_index,node_cart,node_orders,node_payments,node_fulfillment,node_after_sales,node_flash_sales toneBlue
class node_coupons,node_community,node_parenting_tips,node_ai_assistant toneAmber
class node_sql_store,node_redis,node_tcc toneMint
class node_admin,node_seckill_admin toneRose
class node_customer,node_payment_gateway,node_amap,node_mq toneIndigo
```

## Components

### Commerce

- [Storefront APIs](https://github.com/vam12375/muying-mall/tree/master/src/main/java/com/muyingmall/controller/user): `src/main/java/com/muyingmall/controller/user`
- [Product catalog](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/common/ProductController.java): `src/main/java/com/muyingmall/controller/common/ProductController.java`
- [Product search](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/service/ProductSearchService.java): `src/main/java/com/muyingmall/service/ProductSearchService.java`
- [Search index](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/repository/ProductSearchRepository.java): `src/main/java/com/muyingmall/repository/ProductSearchRepository.java`
- [Cart and checkout](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/CartController.java): `src/main/java/com/muyingmall/controller/user/CartController.java`
- [Order management](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/OrderController.java): `src/main/java/com/muyingmall/controller/user/OrderController.java`
- [Payment processing](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/common/PaymentController.java): `src/main/java/com/muyingmall/controller/common/PaymentController.java`
- [Shipping and tracking](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/ShippingController.java): `src/main/java/com/muyingmall/controller/user/ShippingController.java`
- [Refunds and reviews](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/RefundController.java): `src/main/java/com/muyingmall/controller/user/RefundController.java`
- [Flash sales](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/SeckillController.java): `src/main/java/com/muyingmall/controller/user/SeckillController.java`

### Engagement

- [Coupons and points](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/CouponController.java): `src/main/java/com/muyingmall/controller/user/CouponController.java`
- [Parenting community](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/CircleController.java): `src/main/java/com/muyingmall/controller/user/CircleController.java`
- [Parenting tips](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/user/ParentingTipController.java): `src/main/java/com/muyingmall/controller/user/ParentingTipController.java`
- [AI support](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/ai/controller/AiChatController.java): `src/main/java/com/muyingmall/ai/controller/AiChatController.java`

### Platform

- **MySQL data**
- [Redis cache](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/cache/LocalCache.java): `src/main/java/com/muyingmall/cache/LocalCache.java`
- [TCC coordinator](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/tcc/TccTransactionManager.java): `src/main/java/com/muyingmall/tcc/TccTransactionManager.java`

### Operations

- [Operations console](https://github.com/vam12375/muying-mall/tree/master/src/main/java/com/muyingmall/controller/admin): `src/main/java/com/muyingmall/controller/admin`
- [Flash-sale operations](https://github.com/vam12375/muying-mall/blob/master/src/main/java/com/muyingmall/controller/admin/SeckillMonitorAdminController.java): `src/main/java/com/muyingmall/controller/admin/SeckillMonitorAdminController.java`

### Other components

- **Customer**
- **Alipay**
- **AMap services**
- **RabbitMQ**

## Connections

- Customer → Storefront APIs: uses
- Storefront APIs → Product catalog: browses
- Storefront APIs → Product search: searches
- Product search → Search index: queries
- Storefront APIs → Cart and checkout: adds items
- Cart and checkout → Order management: submits order
- Order management → Payment processing: requests payment
- Payment processing → Alipay: initiates payment
- Alipay → Payment processing: notifies
- Order management → Shipping and tracking: proceeds to shipping
- Shipping and tracking → AMap services: tracks routes
- Storefront APIs → Refunds and reviews: requests after-sales
- Storefront APIs → Coupons and points: uses rewards
- Customer → Flash sales: joins sale
- Flash sales → RabbitMQ: queues orders
- RabbitMQ → Order management: dispatches orders
- Customer → Parenting community: participates
- Customer → Parenting tips: reads tips
- Customer → AI support: asks for help
- Operations console → Flash-sale operations: monitors sales
- Order management → TCC coordinator: coordinates transaction
- Coupons and points → TCC coordinator: coordinates transaction
- Order management → MySQL data: persists commerce data
- Payment processing → MySQL data: persists payment data
- Product catalog → MySQL data: reads catalog data
- Product search → Redis cache: uses caching
- Flash sales → Redis cache: uses stock cache
