# vongbich808927-oss/lemon architecture

> Architecture diagram of the GitHub repository vongbich808927-oss/lemon, 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/vongbich808927-oss/lemon
- Repository: https://github.com/vongbich808927-oss/lemon

## Overview

这是一个闲置商品交易应用，包含 Vue 前端和商品、用户、收藏、订单等服务端功能；路由还覆盖发布、购买确认、卖家主页及聊天。可见实现存在两套服务端入口：模块化的 Sequelize API 服务，以及包含 SQLite 和实时聊天代码的根目录服务。搜索与商品列表展示了前端到 API 的调用；由于 README 为空且多数路由和页面源码未提供，未推断未采样模块之间的具体调用关系。

Main entry points: [`代码文件夹/server/routes/index.js`](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/index.js) (API 路由汇总), [`代码文件夹/server/app.js`](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/app.js) (API 服务入口), [`代码文件夹/src/main.js`](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/main.js) (应用入口), [`代码文件夹/src/api/index.js`](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/api/index.js) (前端 API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue 应用"]
  node_spa["应用入口<br/>[main.js]"]
  node_router["页面路由<br/>[index.js]"]
  node_search["商品搜索<br/>[Search.vue]"]
  node_listing["商品列表<br/>[ProductList.vue]"]
  node_product_detail["商品详情<br/>[ProductDetail.vue]"]
  node_publish["发布商品<br/>[PublishProduct.vue]"]
  node_buy["购买确认<br/>[BuyConfirm.vue]"]
  node_orders_ui["订单页面<br/>[UserOrders.vue]"]
  node_favorites_ui["收藏页面<br/>[UserFavorites.vue]"]
  node_account_ui["用户与认证<br/>[Login.vue]"]
  node_chat_ui["聊天页面<br/>[Chat.vue]"]
  node_client_api["前端 API<br/>[index.js]"]
  node_http["HTTP 客户端<br/>[http.js]"]
end

subgraph group_commerce["交易 API"]
  node_api_app["API 服务入口<br/>[app.js]"]
  node_api_routes["API 路由汇总<br/>[index.js]"]
  node_products_api["商品路由<br/>[products.js]"]
  node_users_api["用户路由<br/>[users.js]"]
  node_orders_api["订单路由<br/>[orders.js]"]
  node_favorites_api["收藏路由<br/>[favorites.js]"]
  node_reco_api["推荐路由<br/>[reco.js]"]
  node_catalog_api["分类与标签<br/>[categories.js]"]
end

subgraph group_persistence["数据模型"]
  node_sequelize["ORM 配置<br/>[db.js]"]
  node_models["领域模型<br/>[index.js]"]
end

subgraph group_legacy["旧版服务"]
  node_chat_server["实时聊天<br/>[server.js]"]
  node_legacy_server["旧版 API 服务<br/>[server.js]"]
  node_sql_store[("SQLite 数据库")]
end

node_shopper(("买家或卖家"))

node_shopper -->|"使用"| node_spa
node_spa -->|"挂载路由"| node_router
node_search -->|"搜索商品"| node_client_api
node_listing -->|"获取商品与标签"| node_client_api
node_api_app -->|"挂载 API"| node_api_routes
node_api_app -->|"认证连接"| node_sequelize
node_api_routes -->|"分发请求"| node_products_api
node_api_routes -->|"分发请求"| node_users_api
node_api_routes -->|"分发请求"| node_orders_api
node_api_routes -->|"分发请求"| node_favorites_api
node_api_routes -->|"分发请求"| node_reco_api
node_api_routes -->|"分发请求"| node_catalog_api
node_models -->|"使用配置"| node_sequelize
node_legacy_server -->|"读写"| node_sql_store
node_chat_server -->|"读写消息"| node_sql_store

click node_spa "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/main.js"
click node_router "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/router/index.js"
click node_search "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/Search.vue"
click node_listing "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/components/ProductList.vue"
click node_product_detail "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/ProductDetail.vue"
click node_publish "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/PublishProduct.vue"
click node_buy "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/BuyConfirm.vue"
click node_orders_ui "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/UserOrders.vue"
click node_favorites_ui "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/UserFavorites.vue"
click node_account_ui "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/Login.vue"
click node_chat_ui "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/Chat.vue"
click node_client_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/api/index.js"
click node_http "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/api/http.js"
click node_api_app "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/app.js"
click node_api_routes "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/index.js"
click node_products_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/products.js"
click node_users_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/users.js"
click node_orders_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/orders.js"
click node_favorites_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/favorites.js"
click node_reco_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/reco.js"
click node_catalog_api "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/categories.js"
click node_chat_server "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server.js"
click node_legacy_server "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server.js"
click node_sequelize "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/db.js"
click node_models "https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/models/index.js"

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_spa,node_router,node_search,node_listing,node_product_detail,node_publish,node_buy,node_orders_ui,node_favorites_ui,node_account_ui,node_chat_ui,node_client_api,node_http toneBlue
class node_api_app,node_api_routes,node_products_api,node_users_api,node_orders_api,node_favorites_api,node_reco_api,node_catalog_api toneAmber
class node_sequelize,node_models toneMint
class node_chat_server,node_legacy_server,node_sql_store toneRose
class node_shopper toneIndigo
```

## Components

### Vue 应用

- [应用入口](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/main.js): `代码文件夹/src/main.js`
- [页面路由](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/router/index.js): `代码文件夹/src/router/index.js`
- [商品搜索](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/Search.vue): `代码文件夹/src/pages/Search.vue`
- [商品列表](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/components/ProductList.vue): `代码文件夹/src/components/ProductList.vue`
- [商品详情](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/ProductDetail.vue): `代码文件夹/src/pages/ProductDetail.vue`
- [发布商品](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/PublishProduct.vue): `代码文件夹/src/pages/PublishProduct.vue`
- [购买确认](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/BuyConfirm.vue): `代码文件夹/src/pages/BuyConfirm.vue`
- [订单页面](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/UserOrders.vue): `代码文件夹/src/pages/UserOrders.vue`
- [收藏页面](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/UserFavorites.vue): `代码文件夹/src/pages/UserFavorites.vue`
- [用户与认证](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/Login.vue): `代码文件夹/src/pages/Login.vue`
- [聊天页面](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/pages/Chat.vue): `代码文件夹/src/pages/Chat.vue`
- [前端 API](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/api/index.js): `代码文件夹/src/api/index.js`
- [HTTP 客户端](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/src/api/http.js): `代码文件夹/src/api/http.js`

### 交易 API

- [API 服务入口](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/app.js): `代码文件夹/server/app.js`
- [API 路由汇总](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/index.js): `代码文件夹/server/routes/index.js`
- [商品路由](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/products.js): `代码文件夹/server/routes/products.js`
- [用户路由](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/users.js): `代码文件夹/server/routes/users.js`
- [订单路由](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/orders.js): `代码文件夹/server/routes/orders.js`
- [收藏路由](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/favorites.js): `代码文件夹/server/routes/favorites.js`
- [推荐路由](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/reco.js): `代码文件夹/server/routes/reco.js`
- [分类与标签](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/routes/categories.js): `代码文件夹/server/routes/categories.js`

### 数据模型

- [ORM 配置](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/db.js): `代码文件夹/server/db.js`
- [领域模型](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server/models/index.js): `代码文件夹/server/models/index.js`

### 旧版服务

- [实时聊天](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server.js): `代码文件夹/server.js`
- [旧版 API 服务](https://github.com/vongbich808927-oss/lemon/blob/main/%E4%BB%A3%E7%A0%81%E6%96%87%E4%BB%B6%E5%A4%B9/server.js): `代码文件夹/server.js`
- **SQLite 数据库**

### Other components

- **买家或卖家**

## Connections

- 买家或卖家 → 应用入口: 使用
- 应用入口 → 页面路由: 挂载路由
- 商品搜索 → 前端 API: 搜索商品
- 商品列表 → 前端 API: 获取商品与标签
- API 服务入口 → API 路由汇总: 挂载 API
- API 服务入口 → ORM 配置: 认证连接
- API 路由汇总 → 商品路由: 分发请求
- API 路由汇总 → 用户路由: 分发请求
- API 路由汇总 → 订单路由: 分发请求
- API 路由汇总 → 收藏路由: 分发请求
- API 路由汇总 → 推荐路由: 分发请求
- API 路由汇总 → 分类与标签: 分发请求
- 领域模型 → ORM 配置: 使用配置
- 旧版 API 服务 → SQLite 数据库: 读写
- 实时聊天 → SQLite 数据库: 读写消息
