# hongch666/mix-web-demo architecture

> Architecture diagram of the GitHub repository hongch666/mix-web-demo, 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/hongch666/mix-web-demo
- Repository: https://github.com/hongch666/mix-web-demo

## Overview

This is a multi-service IT article discovery, recommendation, and knowledge-Q&A system. A typical user request enters through the API gateway and reaches Spring for article and account operations, GoZero for search or real-time chat, and FastAPI for RAG, AI agents, graph search, or analytics; NestJS supplies log, export, upload, and OAuth capabilities. The graph preserves these distinct branches and documented integrations. Cross-service links follow README descriptions; sampled excerpts substantiate only selected implementations, so uncertain internal call chains are omitted.

Main entry points: [`gozero/app/internal/handler/routes.go`](https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/handler/routes.go) (GoZero API), [`fastapi/app/app.py`](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/app.py) (FastAPI API), [`fastapi/app/internal/agents/extractor.py`](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/agents/extractor.py) (RAG and agents), [`nestjs/src/module/system/system.module.ts`](https://github.com/hongch666/mix-web-demo/blob/main/nestjs/src/module/system/system.module.ts) (NestJS system API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_content["Content and identity"]
  node_spring["Spring content API"]
  node_contentdb[("MySQL content store")]
  node_auth["Spring auth API"]
end

subgraph group_discovery["Search and realtime"]
  node_go["GoZero API<br/>[routes.go]"]
  node_searchlogic["Search logic"]
  node_es[("Elasticsearch")]
  node_chat["Realtime chat<br/>[chatHub.go]"]
  node_chatstore[("Chat messages")]
end

subgraph group_ai["AI and knowledge"]
  node_fastapi["FastAPI API<br/>[app.py]"]
  node_rag["RAG and agents<br/>[extractor.py]"]
  node_vector["Vector search"]
  node_vectorstore[("pgvector store")]
  node_graph["Graph search"]
  node_neo4j[("Neo4j graph")]
  node_llm["LLM providers"]
  node_analytics["Warehouse analytics<br/>[analyzeService.py]"]
  node_clickhouse[("ClickHouse warehouse")]
end

subgraph group_operations["Logs and exports"]
  node_nestjs["NestJS system API<br/>[system.module.ts]"]
  node_logs[("MongoDB logs<br/>[articlelogs.js]")]
  node_export["Article export"]
  node_oss[("Object storage")]
end

subgraph group_platform["Shared platform"]
  node_gateway["APISIX gateway"]
  node_trace["Telemetry<br/>[instrumentation.py]"]
end

node_user(("User / client"))

node_user -->|"sends request"| node_gateway
node_gateway -->|"routes content/auth"| node_spring
node_gateway -->|"routes search/chat"| node_go
node_gateway -->|"routes AI/analysis"| node_fastapi
node_gateway -->|"routes system requests"| node_nestjs
node_spring -->|"reads/writes"| node_contentdb
node_go -->|"dispatches search"| node_searchlogic
node_searchlogic -->|"searches articles"| node_es
node_go -->|"dispatches chat"| node_chat
node_chat -->|"persists messages"| node_chatstore
node_fastapi -->|"dispatches AI work"| node_rag
node_rag -->|"requests semantic search"| node_vector
node_vector -->|"searches embeddings"| node_vectorstore
node_rag -->|"requests graph enhancement"| node_graph
node_graph -->|"queries relations"| node_neo4j
node_rag -->|"invokes model"| node_llm
node_fastapi -->|"dispatches analysis"| node_analytics
node_analytics -->|"queries warehouse"| node_clickhouse
node_nestjs -->|"reads/writes logs"| node_logs
node_nestjs -->|"dispatches downloads"| node_export
node_export -->|"uploads exports"| node_oss
node_fastapi -.->|"emits telemetry"| node_trace
node_nestjs -.->|"emits telemetry"| node_trace
node_go -.->|"emits telemetry"| node_trace

click node_spring "https://github.com/hongch666/mix-web-demo/blob/main/spring/src/main/java/com/hcsy/spring/api/controller/ArticleController.java"
click node_auth "https://github.com/hongch666/mix-web-demo/blob/main/spring/src/main/java/com/hcsy/spring/api/controller/UserController.java"
click node_go "https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/handler/routes.go"
click node_searchlogic "https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/logic/search/searchArticlesLogic.go"
click node_chat "https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/hub/chatHub.go"
click node_chatstore "https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/model/chatMessages/chatMessagesModel.go"
click node_fastapi "https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/app.py"
click node_rag "https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/agents/extractor.py"
click node_vector "https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/services/vectorSearch/vectorSearchService.py"
click node_graph "https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/services/graphSearch/graphSearchService.py"
click node_analytics "https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/services/analyze/analyzeService.py"
click node_nestjs "https://github.com/hongch666/mix-web-demo/blob/main/nestjs/src/module/system/system.module.ts"
click node_logs "https://github.com/hongch666/mix-web-demo/blob/main/db/mongodb/articlelogs.js"
click node_export "https://github.com/hongch666/mix-web-demo/blob/main/nestjs/src/module/system/download/download.controller.ts"
click node_trace "https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/core/telemetry/instrumentation.py"

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_spring,node_contentdb,node_auth,node_user toneBlue
class node_go,node_searchlogic,node_es,node_chat,node_chatstore toneAmber
class node_fastapi,node_rag,node_vector,node_vectorstore,node_graph,node_neo4j,node_llm,node_analytics,node_clickhouse toneMint
class node_nestjs,node_logs,node_export,node_oss toneRose
class node_gateway,node_trace toneIndigo
```

## Components

### Content and identity

- [Spring content API](https://github.com/hongch666/mix-web-demo/blob/main/spring/src/main/java/com/hcsy/spring/api/controller/ArticleController.java): `spring/src/main/java/com/hcsy/spring/api/controller/ArticleController.java`
- **MySQL content store**
- [Spring auth API](https://github.com/hongch666/mix-web-demo/blob/main/spring/src/main/java/com/hcsy/spring/api/controller/UserController.java): `spring/src/main/java/com/hcsy/spring/api/controller/UserController.java`

### Search and realtime

- [GoZero API](https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/handler/routes.go): `gozero/app/internal/handler/routes.go`
- [Search logic](https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/logic/search/searchArticlesLogic.go): `gozero/app/internal/logic/search/searchArticlesLogic.go`
- **Elasticsearch**
- [Realtime chat](https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/internal/hub/chatHub.go): `gozero/app/internal/hub/chatHub.go`
- [Chat messages](https://github.com/hongch666/mix-web-demo/blob/main/gozero/app/model/chatMessages/chatMessagesModel.go): `gozero/app/model/chatMessages/chatMessagesModel.go`

### AI and knowledge

- [FastAPI API](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/app.py): `fastapi/app/app.py`
- [RAG and agents](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/agents/extractor.py): `fastapi/app/internal/agents/extractor.py`
- [Vector search](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/services/vectorSearch/vectorSearchService.py): `fastapi/app/internal/services/vectorSearch/vectorSearchService.py`
- **pgvector store**
- [Graph search](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/services/graphSearch/graphSearchService.py): `fastapi/app/internal/services/graphSearch/graphSearchService.py`
- **Neo4j graph**
- **LLM providers**
- [Warehouse analytics](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/internal/services/analyze/analyzeService.py): `fastapi/app/internal/services/analyze/analyzeService.py`
- **ClickHouse warehouse**

### Logs and exports

- [NestJS system API](https://github.com/hongch666/mix-web-demo/blob/main/nestjs/src/module/system/system.module.ts): `nestjs/src/module/system/system.module.ts`
- [MongoDB logs](https://github.com/hongch666/mix-web-demo/blob/main/db/mongodb/articlelogs.js): `db/mongodb/articlelogs.js`
- [Article export](https://github.com/hongch666/mix-web-demo/blob/main/nestjs/src/module/system/download/download.controller.ts): `nestjs/src/module/system/download/download.controller.ts`
- **Object storage**

### Shared platform

- **APISIX gateway**
- [Telemetry](https://github.com/hongch666/mix-web-demo/blob/main/fastapi/app/core/telemetry/instrumentation.py): `fastapi/app/core/telemetry/instrumentation.py`

### Other components

- **User / client**

## Connections

- User / client → APISIX gateway: sends request
- APISIX gateway → Spring content API: routes content/auth
- APISIX gateway → GoZero API: routes search/chat
- APISIX gateway → FastAPI API: routes AI/analysis
- APISIX gateway → NestJS system API: routes system requests
- Spring content API → MySQL content store: reads/writes
- GoZero API → Search logic: dispatches search
- Search logic → Elasticsearch: searches articles
- GoZero API → Realtime chat: dispatches chat
- Realtime chat → Chat messages: persists messages
- FastAPI API → RAG and agents: dispatches AI work
- RAG and agents → Vector search: requests semantic search
- Vector search → pgvector store: searches embeddings
- RAG and agents → Graph search: requests graph enhancement
- Graph search → Neo4j graph: queries relations
- RAG and agents → LLM providers: invokes model
- FastAPI API → Warehouse analytics: dispatches analysis
- Warehouse analytics → ClickHouse warehouse: queries warehouse
- NestJS system API → MongoDB logs: reads/writes logs
- NestJS system API → Article export: dispatches downloads
- Article export → Object storage: uploads exports
- FastAPI API → Telemetry: emits telemetry
- NestJS system API → Telemetry: emits telemetry
- GoZero API → Telemetry: emits telemetry
