# xiaohuzi-design/htblog architecture

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

- Interactive diagram: https://gitdiagram.com/xiaohuzi-design/htblog
- Repository: https://github.com/xiaohuzi-design/htblog

## Overview

This is a static personal blog and hobby site. Visitors browse the homepage and blog, search and read posts, and use separate pages for notes, a résumé, and small interactive features. The author can create, edit, and delete posts through the browser-based management page, which uses GitHub as its post store; readers can comment through Gitalk. The README documents these capabilities, while sampled source confirms parts of the blog, homepage, and notes behavior. Other listed feature modules are included, but their runtime wiring was not sampled.

Main entry points: [`index.html`](https://github.com/xiaohuzi-design/htblog/blob/main/index.html) (Homepage), [`anime-blog.html`](https://github.com/xiaohuzi-design/htblog/blob/main/anime-blog.html) (Blog Reader), [`login.html`](https://github.com/xiaohuzi-design/htblog/blob/main/login.html) (Login Page), [`js/main.js`](https://github.com/xiaohuzi-design/htblog/blob/main/js/main.js) (Site Shell)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site Experience"]
  node_homepage["Homepage<br/>[index.html]"]
  node_home_interactions["Home Interactions<br/>[welcome.js]"]
  node_site_shell["Site Shell<br/>[main.js]"]
end

subgraph group_publishing["Blog Publishing"]
  node_blog_reader["Blog Reader<br/>[anime-blog.html]"]
  node_blog_logic["Blog Logic<br/>[blog.js]"]
  node_post_store[("Post Files")]
  node_blog_admin["Blog Manager<br/>[blog.html]"]
  node_admin_logic["Publishing Logic<br/>[blog.js]"]
end

subgraph group_personal["Personal Tools"]
  node_notes_page["Notes Page<br/>[notes.html]"]
  node_notes_logic["Notes Manager<br/>[notes.js]"]
  node_browser_storage[("Browser Storage")]
  node_resume["Résumé<br/>[about.html]"]
  node_resume_logic["Résumé Effects<br/>[about.js]"]
  node_achievements["Achievement Wall"]
  node_achievement_logic["Achievement Logic"]
  node_achievement_data["Achievement Data"]
  node_diary["Growth Diary<br/>[lobster-diary.html]"]
  node_diary_logic["Diary Logic<br/>[diary-enhanced.js]"]
  node_diary_data["Diary Data<br/>[diary-data.js]"]
end

subgraph group_extras["Interactive Features"]
  node_game["Gomoku Game<br/>[game.html]"]
  node_game_logic["Game Logic<br/>[game.js]"]
  node_login["Login Page<br/>[login.html]"]
  node_login_logic["Login Logic<br/>[login.js]"]
  node_auth_guard["Auth Guard<br/>[auth-guard.js]"]
  node_cards["Quote Cards<br/>[index.html]"]
  node_cards_logic["Card Interaction<br/>[script.js]"]
end

node_visitor(("Visitor"))
node_author(("Author"))
node_github{{"GitHub API"}}
node_comments{{"Gitalk Comments"}}

node_visitor -->|"opens"| node_homepage
node_homepage -.->|"loads interactions"| node_home_interactions
node_homepage -.->|"loads site script"| node_site_shell
node_site_shell -->|"fetches post stats"| node_github
node_visitor -->|"browses posts"| node_blog_reader
node_blog_reader -->|"uses blog features"| node_blog_logic
node_blog_logic -->|"fetches posts"| node_github
node_blog_reader -->|"hosts comments"| node_comments
node_author -->|"manages posts"| node_blog_admin
node_blog_admin -->|"uses publishing logic"| node_admin_logic
node_admin_logic -->|"writes posts"| node_github
node_visitor -->|"manages notes"| node_notes_page
node_notes_page -->|"uses note manager"| node_notes_logic
node_notes_logic -->|"saves notes"| node_browser_storage
node_visitor -->|"views résumé"| node_resume
node_resume -.->|"uses page effects"| node_resume_logic
node_visitor -.->|"views achievements"| node_achievements
node_achievements -.->|"uses wall logic"| node_achievement_logic
node_achievement_logic -.->|"uses achievement data"| node_achievement_data
node_visitor -.->|"views diary"| node_diary
node_diary -.->|"uses diary logic"| node_diary_logic
node_diary_logic -.->|"uses diary data"| node_diary_data
node_visitor -->|"plays game"| node_game
node_game -.->|"runs game logic"| node_game_logic
node_visitor -->|"opens login"| node_login
node_login -.->|"uses login logic"| node_login_logic
node_login_logic -.->|"stores auth state"| node_browser_storage
node_auth_guard -->|"redirects unauthenticated"| node_login
node_visitor -->|"views cards"| node_cards
node_cards -.->|"initializes card slider"| node_cards_logic

click node_homepage "https://github.com/xiaohuzi-design/htblog/blob/main/index.html"
click node_home_interactions "https://github.com/xiaohuzi-design/htblog/blob/main/welcome.js"
click node_site_shell "https://github.com/xiaohuzi-design/htblog/blob/main/js/main.js"
click node_blog_reader "https://github.com/xiaohuzi-design/htblog/blob/main/anime-blog.html"
click node_blog_logic "https://github.com/xiaohuzi-design/htblog/blob/main/js/blog.js"
click node_post_store "https://github.com/xiaohuzi-design/htblog/tree/main/posts"
click node_blog_admin "https://github.com/xiaohuzi-design/htblog/blob/main/blogs/blog.html"
click node_admin_logic "https://github.com/xiaohuzi-design/htblog/blob/main/blogs/blog.js"
click node_notes_page "https://github.com/xiaohuzi-design/htblog/blob/main/notes/notes.html"
click node_notes_logic "https://github.com/xiaohuzi-design/htblog/blob/main/notes/notes.js"
click node_resume "https://github.com/xiaohuzi-design/htblog/blob/main/abouts/about.html"
click node_resume_logic "https://github.com/xiaohuzi-design/htblog/blob/main/abouts/about.js"
click node_achievements "https://github.com/xiaohuzi-design/htblog/blob/main/achievement-wall.html"
click node_achievement_logic "https://github.com/xiaohuzi-design/htblog/blob/main/js/achievement-wall.js"
click node_achievement_data "https://github.com/xiaohuzi-design/htblog/blob/main/js/achievement-data.js"
click node_diary "https://github.com/xiaohuzi-design/htblog/blob/main/lobster-diary.html"
click node_diary_logic "https://github.com/xiaohuzi-design/htblog/blob/main/js/diary-enhanced.js"
click node_diary_data "https://github.com/xiaohuzi-design/htblog/blob/main/js/diary-data.js"
click node_game "https://github.com/xiaohuzi-design/htblog/blob/main/game.html"
click node_game_logic "https://github.com/xiaohuzi-design/htblog/blob/main/game.js"
click node_login "https://github.com/xiaohuzi-design/htblog/blob/main/login.html"
click node_login_logic "https://github.com/xiaohuzi-design/htblog/blob/main/js/login.js"
click node_auth_guard "https://github.com/xiaohuzi-design/htblog/blob/main/js/auth-guard.js"
click node_cards "https://github.com/xiaohuzi-design/htblog/blob/main/cards/index.html"
click node_cards_logic "https://github.com/xiaohuzi-design/htblog/blob/main/cards/script.js"

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_homepage,node_home_interactions,node_site_shell toneBlue
class node_blog_reader,node_blog_logic,node_post_store,node_blog_admin,node_admin_logic toneAmber
class node_notes_page,node_notes_logic,node_browser_storage,node_resume,node_resume_logic,node_achievements,node_achievement_logic,node_achievement_data,node_diary,node_diary_logic,node_diary_data,node_github toneMint
class node_game,node_game_logic,node_login,node_login_logic,node_auth_guard,node_cards,node_cards_logic toneRose
class node_visitor,node_author,node_comments toneIndigo
```

## Components

### Site Experience

- [Homepage](https://github.com/xiaohuzi-design/htblog/blob/main/index.html): `index.html`
- [Home Interactions](https://github.com/xiaohuzi-design/htblog/blob/main/welcome.js): `welcome.js`
- [Site Shell](https://github.com/xiaohuzi-design/htblog/blob/main/js/main.js): `js/main.js`

### Blog Publishing

- [Blog Reader](https://github.com/xiaohuzi-design/htblog/blob/main/anime-blog.html): `anime-blog.html`
- [Blog Logic](https://github.com/xiaohuzi-design/htblog/blob/main/js/blog.js): `js/blog.js`
- [Post Files](https://github.com/xiaohuzi-design/htblog/tree/main/posts): `posts`
- [Blog Manager](https://github.com/xiaohuzi-design/htblog/blob/main/blogs/blog.html): `blogs/blog.html`
- [Publishing Logic](https://github.com/xiaohuzi-design/htblog/blob/main/blogs/blog.js): `blogs/blog.js`

### Personal Tools

- [Notes Page](https://github.com/xiaohuzi-design/htblog/blob/main/notes/notes.html): `notes/notes.html`
- [Notes Manager](https://github.com/xiaohuzi-design/htblog/blob/main/notes/notes.js): `notes/notes.js`
- **Browser Storage**
- [Résumé](https://github.com/xiaohuzi-design/htblog/blob/main/abouts/about.html): `abouts/about.html`
- [Résumé Effects](https://github.com/xiaohuzi-design/htblog/blob/main/abouts/about.js): `abouts/about.js`
- [Achievement Wall](https://github.com/xiaohuzi-design/htblog/blob/main/achievement-wall.html): `achievement-wall.html`
- [Achievement Logic](https://github.com/xiaohuzi-design/htblog/blob/main/js/achievement-wall.js): `js/achievement-wall.js`
- [Achievement Data](https://github.com/xiaohuzi-design/htblog/blob/main/js/achievement-data.js): `js/achievement-data.js`
- [Growth Diary](https://github.com/xiaohuzi-design/htblog/blob/main/lobster-diary.html): `lobster-diary.html`
- [Diary Logic](https://github.com/xiaohuzi-design/htblog/blob/main/js/diary-enhanced.js): `js/diary-enhanced.js`
- [Diary Data](https://github.com/xiaohuzi-design/htblog/blob/main/js/diary-data.js): `js/diary-data.js`

### Interactive Features

- [Gomoku Game](https://github.com/xiaohuzi-design/htblog/blob/main/game.html): `game.html`
- [Game Logic](https://github.com/xiaohuzi-design/htblog/blob/main/game.js): `game.js`
- [Login Page](https://github.com/xiaohuzi-design/htblog/blob/main/login.html): `login.html`
- [Login Logic](https://github.com/xiaohuzi-design/htblog/blob/main/js/login.js): `js/login.js`
- [Auth Guard](https://github.com/xiaohuzi-design/htblog/blob/main/js/auth-guard.js): `js/auth-guard.js`
- [Quote Cards](https://github.com/xiaohuzi-design/htblog/blob/main/cards/index.html): `cards/index.html`
- [Card Interaction](https://github.com/xiaohuzi-design/htblog/blob/main/cards/script.js): `cards/script.js`

### Other components

- **Visitor**
- **Author**
- **GitHub API**
- **Gitalk Comments**

## Connections

- Visitor → Homepage: opens (evidence: `README.md`)
- Homepage → Home Interactions: loads interactions
- Homepage → Site Shell: loads site script
- Site Shell → GitHub API: fetches post stats (evidence: `js/main.js`)
- Visitor → Blog Reader: browses posts (evidence: `README.md`)
- Blog Reader → Blog Logic: uses blog features (evidence: `README.md`)
- Blog Logic → GitHub API: fetches posts (evidence: `js/blog.js`)
- Blog Reader → Gitalk Comments: hosts comments (evidence: `README.md`)
- Author → Blog Manager: manages posts (evidence: `README.md`)
- Blog Manager → Publishing Logic: uses publishing logic (evidence: `blogs/blog.js`)
- Publishing Logic → GitHub API: writes posts (evidence: `blogs/blog.js`)
- Visitor → Notes Page: manages notes (evidence: `README.md`)
- Notes Page → Notes Manager: uses note manager (evidence: `README.md`)
- Notes Manager → Browser Storage: saves notes (evidence: `notes/notes.js`)
- Visitor → Résumé: views résumé (evidence: `README.md`)
- Résumé → Résumé Effects: uses page effects
- Visitor → Achievement Wall: views achievements
- Achievement Wall → Achievement Logic: uses wall logic
- Achievement Logic → Achievement Data: uses achievement data
- Visitor → Growth Diary: views diary
- Growth Diary → Diary Logic: uses diary logic
- Diary Logic → Diary Data: uses diary data
- Visitor → Gomoku Game: plays game (evidence: `README.md`)
- Gomoku Game → Game Logic: runs game logic
- Visitor → Login Page: opens login (evidence: `README.md`)
- Login Page → Login Logic: uses login logic
- Login Logic → Browser Storage: stores auth state
- Auth Guard → Login Page: redirects unauthenticated (evidence: `js/auth-guard.js`)
- Visitor → Quote Cards: views cards (evidence: `README.md`)
- Quote Cards → Card Interaction: initializes card slider
