# bigxingyun/yuyue-novel-platform architecture

> Architecture diagram of the GitHub repository bigxingyun/yuyue-novel-platform, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-04). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/bigxingyun/yuyue-novel-platform
- Repository: https://github.com/bigxingyun/yuyue-novel-platform

## Overview

欲阅 is a multi-user short-fiction reading and publishing platform. Readers browse books, read chapters, manage a shelf and history, and comment; users register or recover access, authors apply for approval and manage works, and administrators govern users and content. The Vue client calls a FastAPI API, whose domain services use SQLAlchemy-backed SQLite. The README documents reader settings, progress sync, device adaptation, and operational features; some associated source was not sampled, so those links are shown only where documented, and unsampled service relationships are omitted.

Main entry points: [`backend/app/api/v1/router.py`](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/router.py) (API router), [`frontend/src/views/reader/ReaderView.vue`](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/reader/ReaderView.vue) (Reading experience), [`frontend/src/api/request.ts`](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/api/request.ts) (API client), [`backend/app/models`](https://github.com/bigxingyun/yuyue-novel-platform/tree/main/backend/app/models) (Domain models)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_client["Vue client"]
  node_webapp["Vue application<br/>[main.ts]"]
  node_browse["Browse books<br/>[SquareView.vue]"]
  node_reader_view["Reading experience<br/>[ReaderView.vue]"]
  node_author_view["Author workspace"]
  node_admin_view["Admin console"]
  node_api_client["API client<br/>[request.ts]"]
end

subgraph group_identity["Identity and profiles"]
  node_api_routes["API router<br/>[router.py]"]
  node_auth_api["Auth endpoints<br/>[auth.py]"]
  node_auth_service["Authentication<br/>[auth_service.py]"]
  node_profile_api["User and profile routes<br/>[profile.py]"]
  node_profile_service["Profiles and experience<br/>[profile_service.py]"]
end

subgraph group_content["Reading and creation"]
  node_book_api["Book routes<br/>[books.py]"]
  node_book_service["Book catalog<br/>[book_service.py]"]
  node_reading_api["Chapter and reading routes<br/>[reading.py]"]
  node_author_api["Author routes<br/>[author.py]"]
  node_author_service["Work and chapter editing<br/>[author_service.py]"]
  node_upload_service["Image uploads<br/>[upload_service.py]"]
end

subgraph group_community["Community and governance"]
  node_comments_api["Comment routes<br/>[comments.py]"]
  node_comment_service["Comment management<br/>[comment_service.py]"]
  node_admin_api["Admin routes"]
  node_admin_service["Platform governance<br/>[admin_service.py]"]
end

subgraph group_persistence["Persistence"]
  node_orm["Domain models"]
  node_database[("SQLite database<br/>[database.py]")]
end

node_reader(("Reader"))

node_reader -->|"uses"| node_webapp
node_webapp -->|"routes to"| node_browse
node_webapp -->|"routes to"| node_reader_view
node_webapp -.->|"calls"| node_api_client
node_browse -.->|"requests books"| node_api_client
node_reader_view -.->|"requests chapters"| node_api_client
node_author_view -.->|"submits work"| node_api_client
node_admin_view -.->|"governs content"| node_api_client
node_api_client -->|"HTTP requests"| node_api_routes
node_api_routes -->|"dispatches"| node_auth_api
node_api_routes -->|"dispatches"| node_book_api
node_api_routes -->|"dispatches"| node_reading_api
node_api_routes -->|"dispatches"| node_author_api
node_api_routes -->|"dispatches"| node_comments_api
node_api_routes -->|"dispatches"| node_admin_api
node_auth_api -->|"calls"| node_auth_service
node_profile_api -.->|"calls"| node_profile_service
node_book_api -->|"calls"| node_book_service
node_author_api -->|"calls"| node_author_service
node_comments_api -.->|"calls"| node_comment_service
node_admin_api -->|"reviews applications"| node_admin_service
node_author_service -->|"reads and writes"| node_orm
node_auth_service -->|"reads and writes"| node_orm
node_comment_service -->|"reads and writes"| node_orm
node_admin_service -->|"reads and writes"| node_orm
node_database -.->|"maps models"| node_orm
node_reader_view -.->|"syncs settings"| node_reader_view
node_reader_view -.->|"saves progress"| node_reader_view

click node_webapp "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/main.ts"
click node_browse "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/square/SquareView.vue"
click node_reader_view "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/reader/ReaderView.vue"
click node_author_view "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/profile/WorksManageView.vue"
click node_admin_view "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/admin/ApplicationReviewView.vue"
click node_api_client "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/api/request.ts"
click node_api_routes "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/router.py"
click node_auth_api "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/auth.py"
click node_auth_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/auth_service.py"
click node_profile_api "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/profile.py"
click node_profile_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/profile_service.py"
click node_book_api "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/books.py"
click node_book_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/book_service.py"
click node_reading_api "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/reading.py"
click node_author_api "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/author.py"
click node_author_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/author_service.py"
click node_comments_api "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/comments.py"
click node_comment_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/comment_service.py"
click node_admin_api "https://github.com/bigxingyun/yuyue-novel-platform/tree/main/backend/app/api/v1/admin"
click node_admin_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/admin_service.py"
click node_upload_service "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/upload_service.py"
click node_orm "https://github.com/bigxingyun/yuyue-novel-platform/tree/main/backend/app/models"
click node_database "https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/database.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_webapp,node_browse,node_reader_view,node_author_view,node_admin_view,node_api_client toneBlue
class node_api_routes,node_auth_api,node_auth_service,node_profile_api,node_profile_service toneAmber
class node_book_api,node_book_service,node_reading_api,node_author_api,node_author_service,node_upload_service toneMint
class node_comments_api,node_comment_service,node_admin_api,node_admin_service toneRose
class node_orm,node_database,node_reader toneIndigo
```

## Components

### Vue client

- [Vue application](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/main.ts): `frontend/src/main.ts`
- [Browse books](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/square/SquareView.vue): `frontend/src/views/square/SquareView.vue`
- [Reading experience](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/reader/ReaderView.vue): `frontend/src/views/reader/ReaderView.vue`
- [Author workspace](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/profile/WorksManageView.vue): `frontend/src/views/profile/WorksManageView.vue`
- [Admin console](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/views/admin/ApplicationReviewView.vue): `frontend/src/views/admin/ApplicationReviewView.vue`
- [API client](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/frontend/src/api/request.ts): `frontend/src/api/request.ts`

### Identity and profiles

- [API router](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/router.py): `backend/app/api/v1/router.py`
- [Auth endpoints](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/auth.py): `backend/app/api/v1/auth.py`
- [Authentication](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/auth_service.py): `backend/app/services/auth_service.py`
- [User and profile routes](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/profile.py): `backend/app/api/v1/profile.py`
- [Profiles and experience](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/profile_service.py): `backend/app/services/profile_service.py`

### Reading and creation

- [Book routes](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/books.py): `backend/app/api/v1/books.py`
- [Book catalog](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/book_service.py): `backend/app/services/book_service.py`
- [Chapter and reading routes](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/reading.py): `backend/app/api/v1/reading.py`
- [Author routes](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/author.py): `backend/app/api/v1/author.py`
- [Work and chapter editing](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/author_service.py): `backend/app/services/author_service.py`
- [Image uploads](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/upload_service.py): `backend/app/services/upload_service.py`

### Community and governance

- [Comment routes](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/api/v1/comments.py): `backend/app/api/v1/comments.py`
- [Comment management](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/comment_service.py): `backend/app/services/comment_service.py`
- [Admin routes](https://github.com/bigxingyun/yuyue-novel-platform/tree/main/backend/app/api/v1/admin): `backend/app/api/v1/admin`
- [Platform governance](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/services/admin_service.py): `backend/app/services/admin_service.py`

### Persistence

- [Domain models](https://github.com/bigxingyun/yuyue-novel-platform/tree/main/backend/app/models): `backend/app/models`
- [SQLite database](https://github.com/bigxingyun/yuyue-novel-platform/blob/main/backend/app/database.py): `backend/app/database.py`

### Other components

- **Reader**

## Connections

- Reader → Vue application: uses (evidence: `README.md`)
- Vue application → Browse books: routes to (evidence: `README.md`)
- Vue application → Reading experience: routes to (evidence: `README.md`)
- Vue application → API client: calls
- Browse books → API client: requests books
- Reading experience → API client: requests chapters
- Author workspace → API client: submits work
- Admin console → API client: governs content
- API client → API router: HTTP requests (evidence: `README.md`)
- API router → Auth endpoints: dispatches (evidence: `backend/app/api/v1/router.py`)
- API router → Book routes: dispatches (evidence: `backend/app/api/v1/router.py`)
- API router → Chapter and reading routes: dispatches (evidence: `backend/app/api/v1/router.py`)
- API router → Author routes: dispatches (evidence: `backend/app/api/v1/router.py`)
- API router → Comment routes: dispatches (evidence: `backend/app/api/v1/router.py`)
- API router → Admin routes: dispatches (evidence: `backend/app/api/v1/router.py`)
- Auth endpoints → Authentication: calls (evidence: `backend/app/api/v1/auth.py`)
- User and profile routes → Profiles and experience: calls
- Book routes → Book catalog: calls (evidence: `backend/app/api/v1/books.py`)
- Author routes → Work and chapter editing: calls (evidence: `backend/app/api/v1/author.py`)
- Comment routes → Comment management: calls
- Admin routes → Platform governance: reviews applications (evidence: `backend/app/api/v1/admin/applications.py`)
- Work and chapter editing → Domain models: reads and writes (evidence: `backend/app/services/author_service.py`)
- Authentication → Domain models: reads and writes (evidence: `backend/app/services/auth_service.py`)
- Comment management → Domain models: reads and writes (evidence: `backend/app/services/comment_service.py`)
- Platform governance → Domain models: reads and writes (evidence: `backend/app/services/admin_service.py`)
- SQLite database → Domain models: maps models
- Reading experience → Reading experience: syncs settings (evidence: `README.md`)
- Reading experience → Reading experience: saves progress (evidence: `README.md`)
