# 2388326078/yuhua_blog architecture

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

## Overview

Yuhua is a Django + Vue 2 blog platform. Readers navigate the Vue app to browse articles and media, interact through comments, likes and danmaku, and access account and sharing features; administrators manage content and site settings. The frontend service layer sends API requests, while Django exposes the backend and is configured for MySQL and OSS. The README documents additional security and media capabilities; some backend wiring is not shown in the sampled source, so uncertain call relationships are omitted.

Main entry points: [`boke/boke/urls.py`](https://github.com/2388326078/yuhua_blog/blob/main/boke/boke/urls.py) (Django API), [`yuhua_block/src/directives/service.js`](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/directives/service.js) (API service), [`yuhua_block/src/router/index.js`](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/router/index.js) (Page router), [`yuhua_block/src/views`](https://github.com/2388326078/yuhua_blog/tree/main/yuhua_block/src/views) (Public pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Vue application"]
  node_vue["Vue app shell<br/>[App.vue]"]
  node_router["Page router<br/>[index.js]"]
  node_pages["Public pages"]
  node_commentui["Comments UI<br/>[CommentArea.vue]"]
  node_adminui["Admin pages"]
  node_userui["User center<br/>[UserCenter.vue]"]
  node_service["API service<br/>[service.js]"]
end

subgraph group_backend["Django backend"]
  node_django["Django API<br/>[urls.py]"]
  node_articleapi["Article endpoints<br/>[ArticleVue.py]"]
  node_commentapi["Comment endpoints<br/>[CommentVue.py]"]
  node_loginapi["Login endpoints<br/>[loginVue.py]"]
  node_models["Domain models<br/>[models.py]"]
  node_mysql[("MySQL<br/>[settings.py]")]
end

subgraph group_security["Security and identity"]
  node_auth["Identity controls<br/>[loginVue.py]"]
  node_origin["Origin checks<br/>[origin.py]"]
end

subgraph group_media["Media storage"]
  node_ossutil["Upload and media<br/>[uploadImg.py]"]
  node_oss[("Aliyun OSS")]
end

node_visitor(("Visitor"))

node_visitor -->|"opens pages"| node_router
node_router -->|"renders in"| node_vue
node_router -->|"routes to"| node_pages
node_router -->|"routes to"| node_adminui
node_pages -->|"requests data"| node_service
node_commentui -->|"submits comments"| node_service
node_adminui -->|"manages content"| node_service
node_userui -->|"requests account actions"| node_service
node_service -->|"sends API requests"| node_django
node_django -->|"routes article requests"| node_articleapi
node_django -->|"routes comment requests"| node_commentapi
node_django -->|"routes login requests"| node_loginapi
node_loginapi -->|"checks credentials"| node_auth
node_auth -->|"reads user records"| node_models
node_origin -->|"checks request origin"| node_django
node_ossutil -->|"uploads and deletes"| node_oss

click node_vue "https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/App.vue"
click node_router "https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/router/index.js"
click node_pages "https://github.com/2388326078/yuhua_blog/tree/main/yuhua_block/src/views"
click node_commentui "https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/components/Comment/CommentArea.vue"
click node_adminui "https://github.com/2388326078/yuhua_blog/tree/main/yuhua_block/src/components/admin"
click node_userui "https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/components/UserCenter.vue"
click node_service "https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/directives/service.js"
click node_django "https://github.com/2388326078/yuhua_blog/blob/main/boke/boke/urls.py"
click node_articleapi "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/ArticleVue.py"
click node_commentapi "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/CommentVue.py"
click node_loginapi "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/loginVue.py"
click node_models "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/models.py"
click node_mysql "https://github.com/2388326078/yuhua_blog/blob/main/boke/boke/settings.py"
click node_auth "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/loginVue.py"
click node_origin "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/middleware/origin.py"
click node_ossutil "https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/utils/uploadImg.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_vue,node_router,node_pages,node_commentui,node_adminui,node_userui,node_service toneBlue
class node_django,node_articleapi,node_commentapi,node_loginapi,node_models,node_mysql toneAmber
class node_auth,node_origin toneMint
class node_ossutil,node_oss toneRose
class node_visitor toneIndigo
```

## Components

### Vue application

- [Vue app shell](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/App.vue): `yuhua_block/src/App.vue`
- [Page router](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/router/index.js): `yuhua_block/src/router/index.js`
- [Public pages](https://github.com/2388326078/yuhua_blog/tree/main/yuhua_block/src/views): `yuhua_block/src/views`
- [Comments UI](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/components/Comment/CommentArea.vue): `yuhua_block/src/components/Comment/CommentArea.vue`
- [Admin pages](https://github.com/2388326078/yuhua_blog/tree/main/yuhua_block/src/components/admin): `yuhua_block/src/components/admin`
- [User center](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/components/UserCenter.vue): `yuhua_block/src/components/UserCenter.vue`
- [API service](https://github.com/2388326078/yuhua_blog/blob/main/yuhua_block/src/directives/service.js): `yuhua_block/src/directives/service.js`

### Django backend

- [Django API](https://github.com/2388326078/yuhua_blog/blob/main/boke/boke/urls.py): `boke/boke/urls.py`
- [Article endpoints](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/ArticleVue.py): `boke/YuhuaBoke/FrontEndInterface/ArticleVue.py`
- [Comment endpoints](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/CommentVue.py): `boke/YuhuaBoke/FrontEndInterface/CommentVue.py`
- [Login endpoints](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/loginVue.py): `boke/YuhuaBoke/FrontEndInterface/loginVue.py`
- [Domain models](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/models.py): `boke/YuhuaBoke/models.py`
- [MySQL](https://github.com/2388326078/yuhua_blog/blob/main/boke/boke/settings.py): `boke/boke/settings.py`

### Security and identity

- [Identity controls](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/FrontEndInterface/loginVue.py): `boke/YuhuaBoke/FrontEndInterface/loginVue.py`
- [Origin checks](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/middleware/origin.py): `boke/YuhuaBoke/middleware/origin.py`

### Media storage

- [Upload and media](https://github.com/2388326078/yuhua_blog/blob/main/boke/YuhuaBoke/utils/uploadImg.py): `boke/YuhuaBoke/utils/uploadImg.py`
- **Aliyun OSS**

### Other components

- **Visitor**

## Connections

- Visitor → Page router: opens pages
- Page router → Vue app shell: renders in
- Page router → Public pages: routes to
- Page router → Admin pages: routes to
- Public pages → API service: requests data
- Comments UI → API service: submits comments
- Admin pages → API service: manages content
- User center → API service: requests account actions
- API service → Django API: sends API requests
- Django API → Article endpoints: routes article requests
- Django API → Comment endpoints: routes comment requests
- Django API → Login endpoints: routes login requests
- Login endpoints → Identity controls: checks credentials
- Identity controls → Domain models: reads user records
- Origin checks → Django API: checks request origin
- Upload and media → Aliyun OSS: uploads and deletes
