# jitkio/myblog architecture

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

- Interactive diagram: https://gitdiagram.com/jitkio/myblog
- Repository: https://github.com/jitkio/myblog

## Overview

myBlog is a public knowledge-base and blog site, with SiYuan used as a content editor and a separate Node.js/React site for publishing. Readers browse the home feed, article index and folder tree, search, and open stable article links; the frontend requests published content from the server, which indexes Markdown and serves article data. Administrators can trigger SiYuan synchronization, which exports Markdown and media into runtime data before the site refreshes. The README documents these capabilities; some server internals were not excerpted, so those subsystem links cite the README rather than implying unshown calls.

Main entry points: [`site/src/App.jsx`](https://github.com/jitkio/myblog/blob/main/site/src/App.jsx) (Application shell), [`site/server/index.js`](https://github.com/jitkio/myblog/blob/main/site/server/index.js) (HTTP application), [`site/src/lib/content.js`](https://github.com/jitkio/myblog/blob/main/site/src/lib/content.js) (Content requests), [`site/src/pages/DirectoryPage.jsx`](https://github.com/jitkio/myblog/blob/main/site/src/pages/DirectoryPage.jsx) (Directory browser)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Reader experience"]
  node_app["Application shell<br/>[App.jsx]"]
  node_header["Site header<br/>[SiteHeader.jsx]"]
  node_search["Search dialog<br/>[SearchDialog.jsx]"]
  node_home["Home feed<br/>[HomePage.jsx]"]
  node_articles["Article index<br/>[ArticlesPage.jsx]"]
  node_article["Article reader<br/>[ArticlePage.jsx]"]
  node_adminui["Management tools<br/>[ToolsPage.jsx]"]
end

subgraph group_content["Content navigation"]
  node_directory["Directory browser<br/>[DirectoryPage.jsx]"]
  node_tree["Directory tree<br/>[DirectoryTree.jsx]"]
  node_routes["URL routing<br/>[routes.js]"]
  node_navigation["Path navigation<br/>[navigation.js]"]
  node_markdown["Markdown renderer<br/>[markdown.js]"]
  node_contentutils["Content requests<br/>[content.js]"]
end

subgraph group_backend["Publishing services"]
  node_server["HTTP application<br/>[index.js]"]
  node_indexer["Published content index<br/>[index.js]"]
  node_navbuilder["Navigation builder<br/>[navigation.js]"]
end

subgraph group_sync["Content synchronization"]
  node_sync["SiYuan export and sync<br/>[index.js]"]
end

node_reader(("Reader"))
node_admin(("Site administrator"))
node_siyuan["SiYuan"]
node_runtime[("Content and runtime data")]

node_reader -->|"browses"| node_app
node_app -->|"renders"| node_header
node_app -->|"renders"| node_home
node_app -->|"renders"| node_articles
node_app -->|"renders"| node_article
node_app -->|"renders"| node_directory
node_app -->|"renders"| node_adminui
node_app -->|"parses URLs"| node_routes
node_routes -->|"decodes paths"| node_navigation
node_app -->|"fetches content"| node_contentutils
node_app -->|"opens search"| node_search
node_search -->|"requests results"| node_contentutils
node_directory -->|"renders tree"| node_tree
node_article -->|"renders Markdown"| node_markdown
node_directory -->|"loads overview"| node_contentutils
node_contentutils -->|"requests API"| node_server
node_server -->|"builds index"| node_indexer
node_indexer -->|"builds navigation"| node_navbuilder
node_server -->|"reads and writes"| node_runtime
node_admin -->|"manages content"| node_adminui
node_adminui -->|"requests sync"| node_server
node_siyuan -->|"exports Markdown"| node_sync
node_sync -->|"writes articles and media"| node_runtime
node_sync -->|"calls API"| node_siyuan

click node_app "https://github.com/jitkio/myblog/blob/main/site/src/App.jsx"
click node_header "https://github.com/jitkio/myblog/blob/main/site/src/components/SiteHeader.jsx"
click node_search "https://github.com/jitkio/myblog/blob/main/site/src/components/SearchDialog.jsx"
click node_home "https://github.com/jitkio/myblog/blob/main/site/src/pages/HomePage.jsx"
click node_articles "https://github.com/jitkio/myblog/blob/main/site/src/pages/ArticlesPage.jsx"
click node_article "https://github.com/jitkio/myblog/blob/main/site/src/pages/ArticlePage.jsx"
click node_directory "https://github.com/jitkio/myblog/blob/main/site/src/pages/DirectoryPage.jsx"
click node_tree "https://github.com/jitkio/myblog/blob/main/site/src/components/DirectoryTree.jsx"
click node_routes "https://github.com/jitkio/myblog/blob/main/site/shared/routes.js"
click node_navigation "https://github.com/jitkio/myblog/blob/main/site/shared/navigation.js"
click node_markdown "https://github.com/jitkio/myblog/blob/main/site/src/lib/markdown.js"
click node_contentutils "https://github.com/jitkio/myblog/blob/main/site/src/lib/content.js"
click node_server "https://github.com/jitkio/myblog/blob/main/site/server/index.js"
click node_indexer "https://github.com/jitkio/myblog/blob/main/site/server/index.js"
click node_navbuilder "https://github.com/jitkio/myblog/blob/main/site/server/navigation.js"
click node_adminui "https://github.com/jitkio/myblog/blob/main/site/src/pages/ToolsPage.jsx"
click node_sync "https://github.com/jitkio/myblog/blob/main/site/server/index.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_app,node_header,node_search,node_home,node_articles,node_article,node_adminui toneBlue
class node_directory,node_tree,node_routes,node_navigation,node_markdown,node_contentutils,node_runtime toneAmber
class node_server,node_indexer,node_navbuilder toneMint
class node_sync toneRose
class node_reader,node_admin,node_siyuan toneIndigo
```

## Components

### Reader experience

- [Application shell](https://github.com/jitkio/myblog/blob/main/site/src/App.jsx): `site/src/App.jsx`
- [Site header](https://github.com/jitkio/myblog/blob/main/site/src/components/SiteHeader.jsx): `site/src/components/SiteHeader.jsx`
- [Search dialog](https://github.com/jitkio/myblog/blob/main/site/src/components/SearchDialog.jsx): `site/src/components/SearchDialog.jsx`
- [Home feed](https://github.com/jitkio/myblog/blob/main/site/src/pages/HomePage.jsx): `site/src/pages/HomePage.jsx`
- [Article index](https://github.com/jitkio/myblog/blob/main/site/src/pages/ArticlesPage.jsx): `site/src/pages/ArticlesPage.jsx`
- [Article reader](https://github.com/jitkio/myblog/blob/main/site/src/pages/ArticlePage.jsx): `site/src/pages/ArticlePage.jsx`
- [Management tools](https://github.com/jitkio/myblog/blob/main/site/src/pages/ToolsPage.jsx): `site/src/pages/ToolsPage.jsx`

### Content navigation

- [Directory browser](https://github.com/jitkio/myblog/blob/main/site/src/pages/DirectoryPage.jsx): `site/src/pages/DirectoryPage.jsx`
- [Directory tree](https://github.com/jitkio/myblog/blob/main/site/src/components/DirectoryTree.jsx): `site/src/components/DirectoryTree.jsx`
- [URL routing](https://github.com/jitkio/myblog/blob/main/site/shared/routes.js): `site/shared/routes.js`
- [Path navigation](https://github.com/jitkio/myblog/blob/main/site/shared/navigation.js): `site/shared/navigation.js`
- [Markdown renderer](https://github.com/jitkio/myblog/blob/main/site/src/lib/markdown.js): `site/src/lib/markdown.js`
- [Content requests](https://github.com/jitkio/myblog/blob/main/site/src/lib/content.js): `site/src/lib/content.js`

### Publishing services

- [HTTP application](https://github.com/jitkio/myblog/blob/main/site/server/index.js): `site/server/index.js`
- [Published content index](https://github.com/jitkio/myblog/blob/main/site/server/index.js): `site/server/index.js`
- [Navigation builder](https://github.com/jitkio/myblog/blob/main/site/server/navigation.js): `site/server/navigation.js`

### Content synchronization

- [SiYuan export and sync](https://github.com/jitkio/myblog/blob/main/site/server/index.js): `site/server/index.js`

### Other components

- **Reader**
- **Site administrator**
- **SiYuan**
- **Content and runtime data**

## Connections

- Reader → Application shell: browses (evidence: `README.md`)
- Application shell → Site header: renders (evidence: `site/src/App.jsx`)
- Application shell → Home feed: renders (evidence: `site/src/App.jsx`)
- Application shell → Article index: renders (evidence: `site/src/App.jsx`)
- Application shell → Article reader: renders (evidence: `site/src/App.jsx`)
- Application shell → Directory browser: renders (evidence: `site/src/App.jsx`)
- Application shell → Management tools: renders (evidence: `site/src/App.jsx`)
- Application shell → URL routing: parses URLs (evidence: `site/src/App.jsx`)
- URL routing → Path navigation: decodes paths (evidence: `site/shared/routes.js`)
- Application shell → Content requests: fetches content (evidence: `site/src/App.jsx`)
- Application shell → Search dialog: opens search (evidence: `site/src/App.jsx`)
- Search dialog → Content requests: requests results (evidence: `site/src/components/SearchDialog.jsx`)
- Directory browser → Directory tree: renders tree (evidence: `site/src/pages/DirectoryPage.jsx`)
- Article reader → Markdown renderer: renders Markdown (evidence: `site/src/pages/ArticlePage.jsx`)
- Directory browser → Content requests: loads overview (evidence: `site/src/pages/DirectoryPage.jsx`)
- Content requests → HTTP application: requests API (evidence: `README.md`)
- HTTP application → Published content index: builds index (evidence: `site/server/index.js`)
- Published content index → Navigation builder: builds navigation (evidence: `site/server/index.js`)
- HTTP application → Content and runtime data: reads and writes (evidence: `README.md`)
- Site administrator → Management tools: manages content (evidence: `README.md`)
- Management tools → HTTP application: requests sync (evidence: `README.md`)
- SiYuan → SiYuan export and sync: exports Markdown (evidence: `README.md`)
- SiYuan export and sync → Content and runtime data: writes articles and media (evidence: `README.md`)
- SiYuan export and sync → SiYuan: calls API (evidence: `README.md`)
