# minhdzvodich/web-novel-system architecture

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

- Interactive diagram: https://gitdiagram.com/minhdzvodich/web-novel-system
- Repository: https://github.com/minhdzvodich/web-novel-system

## Overview

Web Novel System is a web platform for discovering and reading novels, with authoring and publication workflows plus member and administrative features. A reader-facing path runs from web pages through catalog discovery to chapter reading; authors can create works and manage chapter drafts, publication, and schedules. The repository also includes identity, community, libraries, rankings, policies, and media verification. The README describes the application stack but not feature-level wiring, so several frontend-to-backend links are left unasserted; unsampled subsystems are represented at their existing directory paths.

Main entry points: [`backend/src/core/storage/s3-media-storage.ts`](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/core/storage/s3-media-storage.ts) (Media storage), [`frontend/shared/api/client.ts`](https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/shared/api/client.ts) (API client), [`backend/src/features/reading/reading-review.controller.ts`](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/reading/reading-review.controller.ts) (Reading review), [`backend/lambdas/image-verifier/handler.ts`](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/lambdas/image-verifier/handler.ts) (Image verifier)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web experience"]
  node_reader["Reader pages<br/>[reader.tsx]"]
  node_work_pages["Work discovery<br/>[book-detail.tsx]"]
  node_author_ui["Author studio<br/>[author-store.tsx]"]
  node_member_ui["Member pages<br/>[pages.tsx]"]
  node_web_api["API client<br/>[client.ts]"]
end

subgraph group_identity["Identity and users"]
  node_auth_api["Authentication"]
  node_session_guard["Session guard<br/>[session.guard.ts]"]
  node_user_features["User profiles"]
end

subgraph group_content["Catalog and publishing"]
  node_catalog_api["Catalog routes"]
  node_catalog_service["Catalog and discovery<br/>[catalog.service.ts]"]
  node_chapter_api["Chapter routes"]
  node_chapter_services["Drafts and publication"]
  node_imports["Chapter imports"]
end

subgraph group_engagement["Reading and community"]
  node_reading["Reading activity"]
  node_reading_review["Reading review"]
  node_library["Library and history"]
  node_community["Community and lists"]
  node_rankings["Rankings"]
end

subgraph group_platform["Media and platform"]
  node_database[("PostgreSQL access")]
  node_media_api["Media handling"]
  node_media_storage["Media storage"]
  node_verifier["Image verifier<br/>[handler.ts]"]
end

node_visitor(("Reader or author"))
node_object_store[("S3 object store")]
node_result_queue["Media result queue"]
node_google(("Google OAuth"))

node_visitor -.->|"uses"| node_reader
node_visitor -.->|"uses"| node_author_ui
node_work_pages -.->|"requests data"| node_web_api
node_reader -.->|"requests chapters"| node_web_api
node_author_ui -.->|"submits changes"| node_web_api
node_catalog_api -->|"delegates"| node_catalog_service
node_chapter_api -->|"delegates"| node_chapter_services
node_reading_review -->|"calls review service"| node_reading
node_reading_review -->|"requires session"| node_session_guard
node_session_guard -->|"authenticates"| node_auth_api
node_reading -.->|"stores activity"| node_database
node_auth_api -->|"verifies identity"| node_google
node_media_storage -->|"reads and writes"| node_object_store
node_media_storage -->|"sends verification event"| node_result_queue
node_verifier -->|"writes verified image"| node_media_storage
node_verifier -.->|"emits result"| node_result_queue

click node_reader "https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/public/reader.tsx"
click node_work_pages "https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/public/book-detail.tsx"
click node_author_ui "https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/author/author-store.tsx"
click node_member_ui "https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/member/pages.tsx"
click node_web_api "https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/shared/api/client.ts"
click node_auth_api "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/auth"
click node_session_guard "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/shared/guards/session.guard.ts"
click node_user_features "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/users"
click node_catalog_api "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/catalog/catalog.controller.ts"
click node_catalog_service "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/catalog/catalog.service.ts"
click node_chapter_api "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/chapters/chapters.controller.ts"
click node_chapter_services "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/chapters"
click node_imports "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/chapters/imports"
click node_reading "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/reading"
click node_reading_review "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/reading/reading-review.controller.ts"
click node_library "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/library"
click node_community "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/community"
click node_rankings "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/rankings"
click node_database "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/core/database/database.service.ts"
click node_media_api "https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/media"
click node_media_storage "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/core/storage/s3-media-storage.ts"
click node_verifier "https://github.com/minhdzvodich/web-novel-system/blob/main/backend/lambdas/image-verifier/handler.ts"

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_reader,node_work_pages,node_author_ui,node_member_ui,node_web_api toneBlue
class node_auth_api,node_session_guard,node_user_features,node_object_store toneAmber
class node_catalog_api,node_catalog_service,node_chapter_api,node_chapter_services,node_imports toneMint
class node_reading,node_reading_review,node_library,node_community,node_rankings,node_result_queue toneRose
class node_database,node_media_api,node_media_storage,node_verifier,node_visitor,node_google toneIndigo
```

## Components

### Web experience

- [Reader pages](https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/public/reader.tsx): `frontend/components/public/reader.tsx`
- [Work discovery](https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/public/book-detail.tsx): `frontend/components/public/book-detail.tsx`
- [Author studio](https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/author/author-store.tsx): `frontend/components/author/author-store.tsx`
- [Member pages](https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/components/member/pages.tsx): `frontend/components/member/pages.tsx`
- [API client](https://github.com/minhdzvodich/web-novel-system/blob/main/frontend/shared/api/client.ts): `frontend/shared/api/client.ts`

### Identity and users

- [Authentication](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/auth): `backend/src/features/auth`
- [Session guard](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/shared/guards/session.guard.ts): `backend/src/shared/guards/session.guard.ts`
- [User profiles](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/users): `backend/src/features/users`

### Catalog and publishing

- [Catalog routes](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/catalog/catalog.controller.ts): `backend/src/features/catalog/catalog.controller.ts`
- [Catalog and discovery](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/catalog/catalog.service.ts): `backend/src/features/catalog/catalog.service.ts`
- [Chapter routes](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/chapters/chapters.controller.ts): `backend/src/features/chapters/chapters.controller.ts`
- [Drafts and publication](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/chapters): `backend/src/features/chapters`
- [Chapter imports](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/chapters/imports): `backend/src/features/chapters/imports`

### Reading and community

- [Reading activity](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/reading): `backend/src/features/reading`
- [Reading review](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/features/reading/reading-review.controller.ts): `backend/src/features/reading/reading-review.controller.ts`
- [Library and history](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/library): `backend/src/features/library`
- [Community and lists](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/community): `backend/src/features/community`
- [Rankings](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/rankings): `backend/src/features/rankings`

### Media and platform

- [PostgreSQL access](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/core/database/database.service.ts): `backend/src/core/database/database.service.ts`
- [Media handling](https://github.com/minhdzvodich/web-novel-system/tree/main/backend/src/features/media): `backend/src/features/media`
- [Media storage](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/src/core/storage/s3-media-storage.ts): `backend/src/core/storage/s3-media-storage.ts`
- [Image verifier](https://github.com/minhdzvodich/web-novel-system/blob/main/backend/lambdas/image-verifier/handler.ts): `backend/lambdas/image-verifier/handler.ts`

### Other components

- **Reader or author**
- **S3 object store**
- **Media result queue**
- **Google OAuth**

## Connections

- Reader or author → Reader pages: uses
- Reader or author → Author studio: uses
- Work discovery → API client: requests data
- Reader pages → API client: requests chapters
- Author studio → API client: submits changes
- Catalog routes → Catalog and discovery: delegates (evidence: `backend/src/features/catalog/catalog.controller.ts`)
- Chapter routes → Drafts and publication: delegates (evidence: `backend/src/features/chapters/chapters.controller.ts`)
- Reading review → Reading activity: calls review service (evidence: `backend/src/features/reading/reading-review.controller.ts`)
- Reading review → Session guard: requires session (evidence: `backend/src/features/reading/reading-review.controller.ts`)
- Session guard → Authentication: authenticates (evidence: `backend/src/shared/guards/session.guard.ts`)
- Reading activity → PostgreSQL access: stores activity (evidence: `backend/src/features/reading/reading-review.service.ts`)
- Authentication → Google OAuth: verifies identity (evidence: `backend/src/features/auth/google-auth.controller.ts`)
- Media storage → S3 object store: reads and writes (evidence: `backend/src/core/storage/s3-media-storage.ts`)
- Media storage → Media result queue: sends verification event (evidence: `backend/src/core/storage/s3-media-storage.ts`)
- Image verifier → Media storage: writes verified image (evidence: `backend/lambdas/image-verifier/handler.ts`)
- Image verifier → Media result queue: emits result
