# tang730125633/huangque-main-site architecture

> Architecture diagram of the GitHub repository tang730125633/huangque-main-site, 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/tang730125633/huangque-main-site
- Repository: https://github.com/tang730125633/huangque-main-site

## Overview

黄雀 AI 创智 is a browser-based workbench for comment-driven lead generation and AI content production. Its documented loop is collect content and comments, identify prospective leads, create text/images/audio/digital-human/video, then retain and deliver reusable assets; account credits and asynchronous jobs govern production. The graph highlights the documented service boundaries, channel routing, and short-drama assembly/lipsync capability. Edges rely on README statements or SOURCE INDEX references; unsampled internals and deployment wiring beyond those sources are intentionally not inferred.

Main entry points: [`server/content_domains/channel_manager.py`](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_manager.py) (Channel configuration), [`site/workbench`](https://github.com/tang730125633/huangque-main-site/tree/main/site/workbench) (Web workbench), [`server/content_api.py`](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_api.py) (Content task API), [`server/content_domains/channel_runtime.py`](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_runtime.py) (Managed execution)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_workbench["User Workbench"]
  node_site["Web workbench"]
end

subgraph group_acquisition["Lead Acquisition"]
  node_leadgen["Lead generation API<br/>[leadgen_api.py]"]
  node_collector["Collection worker<br/>[server_worker.py]"]
  node_lead_filter["Lead intent filter<br/>[leads_filter.py]"]
end

subgraph group_production["Content Production"]
  node_content["Content task API<br/>[content_api.py]"]
  node_imggen["Image generation API<br/>[imggen_api.py]"]
  node_channel_runtime["Managed execution<br/>[channel_runtime.py]"]
  node_video["Video generation<br/>[video.py]"]
  node_video_minimax["MiniMax video adapter"]
  node_audio["Audio generation<br/>[audio.py]"]
  node_short_drama["Short-drama assembly"]
  node_assembly_plan["Assembly plan"]
  node_lipsync_worker["Lipsync job worker"]
  node_creator_agent["Creator agent<br/>[service.py]"]
end

subgraph group_platform["Platform Operations"]
  node_auth["Accounts and credits<br/>[auth_server.py]"]
  node_channels["Channel configuration<br/>[channel_manager.py]"]
  node_channel_lifecycle["Channel lifecycle"]
  node_channel_parameters["Channel parameters"]
  node_channel_store[("Channel routing store<br/>[channel_store.py]")]
  node_function_registry["Operation registry"]
  node_jobs[("Task and asset records<br/>[jobs_store.py]")]
  node_observability["Runtime observability"]
  node_observability_store[("Observability store")]
  node_admin["Operations console API<br/>[admin_api.py]"]
  node_download["Controlled downloads<br/>[dl_service.py]"]
end

node_user(("Workbench user"))

node_user -->|"uses"| node_site
node_site -->|"authenticates"| node_auth
node_site -->|"submits tasks"| node_content
node_site -->|"collects leads"| node_leadgen
node_site -->|"administers"| node_admin
node_collector -->|"filters intent"| node_lead_filter
node_leadgen -.->|"runs collection"| node_collector
node_content -.->|"uses routing"| node_channels
node_imggen -.->|"uses routing"| node_channels
node_channels -->|"dispatches storage"| node_channel_store
node_channel_lifecycle -->|"checks lifecycle"| node_channels
node_channel_parameters -->|"reads configuration"| node_channels
node_channels -->|"validates settings"| node_channel_parameters
node_channels -->|"routes execution"| node_channel_runtime
node_channel_runtime -->|"resolves operation"| node_function_registry
node_channel_runtime -->|"calls provider"| node_video
node_channel_runtime -->|"builds request"| node_video_minimax
node_channel_runtime -->|"calls provider"| node_audio
node_content -.->|"queues tasks"| node_jobs
node_content -.->|"records runtime"| node_observability
node_observability -->|"dispatches storage"| node_observability_store
node_admin -.->|"views operations"| node_observability
node_content -.->|"produces drama"| node_short_drama
node_short_drama -.->|"uses plan"| node_assembly_plan
node_lipsync_worker -->|"probes media"| node_assembly_plan
node_content -.->|"offers creation"| node_creator_agent
node_site -.->|"downloads assets"| node_download

click node_site "https://github.com/tang730125633/huangque-main-site/tree/main/site/workbench"
click node_auth "https://github.com/tang730125633/huangque-main-site/blob/main/server/auth_server.py"
click node_content "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_api.py"
click node_leadgen "https://github.com/tang730125633/huangque-main-site/blob/main/server/leadgen_api.py"
click node_collector "https://github.com/tang730125633/huangque-main-site/blob/main/worker/server_worker.py"
click node_lead_filter "https://github.com/tang730125633/huangque-main-site/blob/main/scripts/leads_filter.py"
click node_imggen "https://github.com/tang730125633/huangque-main-site/blob/main/server/imggen_api.py"
click node_channels "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_manager.py"
click node_channel_lifecycle "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_lifecycle.py"
click node_channel_parameters "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_parameters.py"
click node_channel_store "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_store.py"
click node_function_registry "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/function_registry.py"
click node_channel_runtime "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_runtime.py"
click node_video "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/video.py"
click node_video_minimax "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/video_minimax_h3.py"
click node_audio "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/audio.py"
click node_short_drama "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/short_drama_assembly_engine.py"
click node_assembly_plan "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/short_drama_assembly_plan.py"
click node_lipsync_worker "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/short_drama_lipsync_worker.py"
click node_jobs "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/jobs_store.py"
click node_observability "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/runtime_observability.py"
click node_observability_store "https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/observability_store.py"
click node_admin "https://github.com/tang730125633/huangque-main-site/blob/main/server/admin_api.py"
click node_download "https://github.com/tang730125633/huangque-main-site/blob/main/server/dl_service.py"
click node_creator_agent "https://github.com/tang730125633/huangque-main-site/blob/main/server/creator_agent/service.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_site,node_user toneBlue
class node_leadgen,node_collector,node_lead_filter toneAmber
class node_content,node_imggen,node_channel_runtime,node_video,node_video_minimax,node_audio,node_short_drama,node_assembly_plan,node_lipsync_worker,node_creator_agent toneMint
class node_auth,node_channels,node_channel_lifecycle,node_channel_parameters,node_channel_store,node_function_registry,node_jobs,node_observability,node_observability_store,node_admin,node_download toneRose
```

## Components

### User Workbench

- [Web workbench](https://github.com/tang730125633/huangque-main-site/tree/main/site/workbench): `site/workbench`

### Lead Acquisition

- [Lead generation API](https://github.com/tang730125633/huangque-main-site/blob/main/server/leadgen_api.py): `server/leadgen_api.py`
- [Collection worker](https://github.com/tang730125633/huangque-main-site/blob/main/worker/server_worker.py): `worker/server_worker.py`
- [Lead intent filter](https://github.com/tang730125633/huangque-main-site/blob/main/scripts/leads_filter.py): `scripts/leads_filter.py`

### Content Production

- [Content task API](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_api.py): `server/content_api.py`
- [Image generation API](https://github.com/tang730125633/huangque-main-site/blob/main/server/imggen_api.py): `server/imggen_api.py`
- [Managed execution](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_runtime.py): `server/content_domains/channel_runtime.py`
- [Video generation](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/video.py): `server/content_domains/video.py`
- [MiniMax video adapter](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/video_minimax_h3.py): `server/content_domains/video_minimax_h3.py`
- [Audio generation](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/audio.py): `server/content_domains/audio.py`
- [Short-drama assembly](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/short_drama_assembly_engine.py): `server/content_domains/short_drama_assembly_engine.py`
- [Assembly plan](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/short_drama_assembly_plan.py): `server/content_domains/short_drama_assembly_plan.py`
- [Lipsync job worker](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/short_drama_lipsync_worker.py): `server/content_domains/short_drama_lipsync_worker.py`
- [Creator agent](https://github.com/tang730125633/huangque-main-site/blob/main/server/creator_agent/service.py): `server/creator_agent/service.py`

### Platform Operations

- [Accounts and credits](https://github.com/tang730125633/huangque-main-site/blob/main/server/auth_server.py): `server/auth_server.py`
- [Channel configuration](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_manager.py): `server/content_domains/channel_manager.py`
- [Channel lifecycle](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_lifecycle.py): `server/content_domains/channel_lifecycle.py`
- [Channel parameters](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_parameters.py): `server/content_domains/channel_parameters.py`
- [Channel routing store](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/channel_store.py): `server/content_domains/channel_store.py`
- [Operation registry](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/function_registry.py): `server/content_domains/function_registry.py`
- [Task and asset records](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/jobs_store.py): `server/content_domains/jobs_store.py`
- [Runtime observability](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/runtime_observability.py): `server/content_domains/runtime_observability.py`
- [Observability store](https://github.com/tang730125633/huangque-main-site/blob/main/server/content_domains/observability_store.py): `server/content_domains/observability_store.py`
- [Operations console API](https://github.com/tang730125633/huangque-main-site/blob/main/server/admin_api.py): `server/admin_api.py`
- [Controlled downloads](https://github.com/tang730125633/huangque-main-site/blob/main/server/dl_service.py): `server/dl_service.py`

### Other components

- **Workbench user**

## Connections

- Workbench user → Web workbench: uses (evidence: `README.md`)
- Web workbench → Accounts and credits: authenticates (evidence: `README.md`)
- Web workbench → Content task API: submits tasks (evidence: `README.md`)
- Web workbench → Lead generation API: collects leads (evidence: `README.md`)
- Web workbench → Operations console API: administers (evidence: `README.md`)
- Collection worker → Lead intent filter: filters intent (evidence: `worker/server_worker.py`)
- Lead generation API → Collection worker: runs collection
- Content task API → Channel configuration: uses routing
- Image generation API → Channel configuration: uses routing
- Channel configuration → Channel routing store: dispatches storage (evidence: `server/content_domains/channel_manager.py`)
- Channel lifecycle → Channel configuration: checks lifecycle (evidence: `server/content_domains/channel_lifecycle.py`)
- Channel parameters → Channel configuration: reads configuration (evidence: `server/content_domains/channel_parameters.py`)
- Channel configuration → Channel parameters: validates settings (evidence: `server/content_domains/channel_manager.py`)
- Channel configuration → Managed execution: routes execution (evidence: `server/content_domains/channel_manager.py`)
- Managed execution → Operation registry: resolves operation (evidence: `server/content_domains/channel_runtime.py`)
- Managed execution → Video generation: calls provider (evidence: `server/content_domains/channel_runtime.py`)
- Managed execution → MiniMax video adapter: builds request (evidence: `server/content_domains/channel_runtime.py`)
- Managed execution → Audio generation: calls provider (evidence: `server/content_domains/channel_runtime.py`)
- Content task API → Task and asset records: queues tasks
- Content task API → Runtime observability: records runtime
- Runtime observability → Observability store: dispatches storage (evidence: `server/content_domains/runtime_observability.py`)
- Operations console API → Runtime observability: views operations
- Content task API → Short-drama assembly: produces drama
- Short-drama assembly → Assembly plan: uses plan
- Lipsync job worker → Assembly plan: probes media (evidence: `server/content_domains/short_drama_lipsync_worker.py`)
- Content task API → Creator agent: offers creation
- Web workbench → Controlled downloads: downloads assets
