# tsutoringo/blog architecture

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

## Overview

This is an EmDash-powered Cloudflare blog template. Visitors browse and search published posts, follow category/tag archives, read static pages, and receive an RSS feed; site editors manage content through EmDash. The graph preserves the README’s listed capabilities, while the sampled files chiefly verify the Worker entry, CMS configuration, and RSS implementation. Most page internals were not sampled, so route and feature relationships rely on README documentation rather than inferred calls.

Main entry points: [`astro.config.mjs`](https://github.com/tsutoringo/blog/blob/main/astro.config.mjs) (EmDash CMS), [`src/pages/index.astro`](https://github.com/tsutoringo/blog/blob/main/src/pages/index.astro) (Homepage), [`src/pages/posts/[slug].astro`](https://github.com/tsutoringo/blog/blob/main/src/pages/posts/%5Bslug%5D.astro) (Post detail), [`src/pages/rss.xml.ts`](https://github.com/tsutoringo/blog/blob/main/src/pages/rss.xml.ts) (RSS feed)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Runtime and CMS"]
  node_worker["Worker entry<br/>[worker.ts]"]
  node_emdash["EmDash CMS<br/>[astro.config.mjs]"]
  node_d1[("D1 database")]
  node_r2[("R2 media")]
  node_forms["Forms plugin<br/>[astro.config.mjs]"]
  node_webhooks["Webhook notifier<br/>[astro.config.mjs]"]
end

subgraph group_content["Blog browsing"]
  node_home["Homepage<br/>[index.astro]"]
  node_postlist["Post archive<br/>[index.astro]"]
  node_postdetail["Post detail<br/>[&#91;slug&#93;.astro]"]
  node_category["Category archive<br/>[&#91;slug&#93;.astro]"]
  node_tag["Tag archive<br/>[&#91;slug&#93;.astro]"]
  node_search["Full-text search<br/>[search.astro]"]
  node_staticpages["Static pages<br/>[&#91;slug&#93;.astro]"]
  node_rss["RSS feed<br/>[rss.xml.ts]"]
  node_notfound["Not found<br/>[404.astro]"]
end

subgraph group_presentation["Shared presentation"]
  node_identity["Site identity<br/>[site-identity.ts]"]
  node_readingtime["Reading time<br/>[reading-time.ts]"]
  node_cards["Post cards<br/>[PostCard.astro]"]
  node_tags["Tag list<br/>[TagList.astro]"]
  node_layout["Base layout<br/>[Base.astro]"]
  node_theme["Theme styles<br/>[theme.css]"]
end

node_visitor(("Visitor"))

node_visitor -->|"requests"| node_worker
node_worker -->|"serves routes"| node_home
node_visitor -->|"opens archive"| node_postlist
node_visitor -->|"opens post"| node_postdetail
node_visitor -->|"browses category"| node_category
node_visitor -->|"browses tag"| node_tag
node_visitor -->|"searches posts"| node_search
node_visitor -->|"opens page"| node_staticpages
node_visitor -->|"requests feed"| node_rss
node_visitor -->|"requests unknown route"| node_notfound
node_emdash -->|"configures database"| node_d1
node_emdash -->|"configures storage"| node_r2
node_emdash -->|"registers plugin"| node_forms
node_emdash -->|"sandboxes plugin"| node_webhooks
node_rss -->|"resolves identity"| node_identity
node_postdetail -.->|"estimates duration"| node_readingtime
node_home -.->|"features posts"| node_cards
node_postlist -.->|"lists posts"| node_cards
node_home -.->|"renders through"| node_layout
node_search -.->|"queries content"| node_emdash
node_postdetail -.->|"loads post"| node_emdash
node_category -.->|"loads archive"| node_emdash
node_tag -.->|"loads archive"| node_emdash
node_staticpages -.->|"loads page"| node_emdash
node_rss -->|"reads posts"| node_emdash

click node_worker "https://github.com/tsutoringo/blog/blob/main/src/worker.ts"
click node_emdash "https://github.com/tsutoringo/blog/blob/main/astro.config.mjs"
click node_forms "https://github.com/tsutoringo/blog/blob/main/astro.config.mjs"
click node_webhooks "https://github.com/tsutoringo/blog/blob/main/astro.config.mjs"
click node_home "https://github.com/tsutoringo/blog/blob/main/src/pages/index.astro"
click node_postlist "https://github.com/tsutoringo/blog/blob/main/src/pages/posts/index.astro"
click node_postdetail "https://github.com/tsutoringo/blog/blob/main/src/pages/posts/%5Bslug%5D.astro"
click node_category "https://github.com/tsutoringo/blog/blob/main/src/pages/category/%5Bslug%5D.astro"
click node_tag "https://github.com/tsutoringo/blog/blob/main/src/pages/tag/%5Bslug%5D.astro"
click node_search "https://github.com/tsutoringo/blog/blob/main/src/pages/search.astro"
click node_staticpages "https://github.com/tsutoringo/blog/blob/main/src/pages/pages/%5Bslug%5D.astro"
click node_rss "https://github.com/tsutoringo/blog/blob/main/src/pages/rss.xml.ts"
click node_notfound "https://github.com/tsutoringo/blog/blob/main/src/pages/404.astro"
click node_identity "https://github.com/tsutoringo/blog/blob/main/src/utils/site-identity.ts"
click node_readingtime "https://github.com/tsutoringo/blog/blob/main/src/utils/reading-time.ts"
click node_cards "https://github.com/tsutoringo/blog/blob/main/src/components/PostCard.astro"
click node_tags "https://github.com/tsutoringo/blog/blob/main/src/components/TagList.astro"
click node_layout "https://github.com/tsutoringo/blog/blob/main/src/layouts/Base.astro"
click node_theme "https://github.com/tsutoringo/blog/blob/main/src/styles/theme.css"

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_worker,node_emdash,node_d1,node_r2,node_forms,node_webhooks toneBlue
class node_home,node_postlist,node_postdetail,node_category,node_tag,node_search,node_staticpages,node_rss,node_notfound toneAmber
class node_identity,node_readingtime,node_cards,node_tags,node_layout,node_theme toneMint
class node_visitor toneIndigo
```

## Components

### Runtime and CMS

- [Worker entry](https://github.com/tsutoringo/blog/blob/main/src/worker.ts): `src/worker.ts`
- [EmDash CMS](https://github.com/tsutoringo/blog/blob/main/astro.config.mjs): `astro.config.mjs`
- **D1 database**
- **R2 media**
- [Forms plugin](https://github.com/tsutoringo/blog/blob/main/astro.config.mjs): `astro.config.mjs`
- [Webhook notifier](https://github.com/tsutoringo/blog/blob/main/astro.config.mjs): `astro.config.mjs`

### Blog browsing

- [Homepage](https://github.com/tsutoringo/blog/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [Post archive](https://github.com/tsutoringo/blog/blob/main/src/pages/posts/index.astro): `src/pages/posts/index.astro`
- [Post detail](https://github.com/tsutoringo/blog/blob/main/src/pages/posts/%5Bslug%5D.astro): `src/pages/posts/[slug].astro`
- [Category archive](https://github.com/tsutoringo/blog/blob/main/src/pages/category/%5Bslug%5D.astro): `src/pages/category/[slug].astro`
- [Tag archive](https://github.com/tsutoringo/blog/blob/main/src/pages/tag/%5Bslug%5D.astro): `src/pages/tag/[slug].astro`
- [Full-text search](https://github.com/tsutoringo/blog/blob/main/src/pages/search.astro): `src/pages/search.astro`
- [Static pages](https://github.com/tsutoringo/blog/blob/main/src/pages/pages/%5Bslug%5D.astro): `src/pages/pages/[slug].astro`
- [RSS feed](https://github.com/tsutoringo/blog/blob/main/src/pages/rss.xml.ts): `src/pages/rss.xml.ts`
- [Not found](https://github.com/tsutoringo/blog/blob/main/src/pages/404.astro): `src/pages/404.astro`

### Shared presentation

- [Site identity](https://github.com/tsutoringo/blog/blob/main/src/utils/site-identity.ts): `src/utils/site-identity.ts`
- [Reading time](https://github.com/tsutoringo/blog/blob/main/src/utils/reading-time.ts): `src/utils/reading-time.ts`
- [Post cards](https://github.com/tsutoringo/blog/blob/main/src/components/PostCard.astro): `src/components/PostCard.astro`
- [Tag list](https://github.com/tsutoringo/blog/blob/main/src/components/TagList.astro): `src/components/TagList.astro`
- [Base layout](https://github.com/tsutoringo/blog/blob/main/src/layouts/Base.astro): `src/layouts/Base.astro`
- [Theme styles](https://github.com/tsutoringo/blog/blob/main/src/styles/theme.css): `src/styles/theme.css`

### Other components

- **Visitor**

## Connections

- Visitor → Worker entry: requests (evidence: `README.md`)
- Worker entry → Homepage: serves routes (evidence: `src/worker.ts`)
- Visitor → Post archive: opens archive (evidence: `README.md`)
- Visitor → Post detail: opens post (evidence: `README.md`)
- Visitor → Category archive: browses category (evidence: `README.md`)
- Visitor → Tag archive: browses tag (evidence: `README.md`)
- Visitor → Full-text search: searches posts (evidence: `README.md`)
- Visitor → Static pages: opens page (evidence: `README.md`)
- Visitor → RSS feed: requests feed (evidence: `README.md`)
- Visitor → Not found: requests unknown route (evidence: `README.md`)
- EmDash CMS → D1 database: configures database (evidence: `astro.config.mjs`)
- EmDash CMS → R2 media: configures storage (evidence: `astro.config.mjs`)
- EmDash CMS → Forms plugin: registers plugin (evidence: `astro.config.mjs`)
- EmDash CMS → Webhook notifier: sandboxes plugin (evidence: `astro.config.mjs`)
- RSS feed → Site identity: resolves identity (evidence: `src/pages/rss.xml.ts`)
- Post detail → Reading time: estimates duration (evidence: `README.md`)
- Homepage → Post cards: features posts (evidence: `README.md`)
- Post archive → Post cards: lists posts (evidence: `README.md`)
- Homepage → Base layout: renders through (evidence: `README.md`)
- Full-text search → EmDash CMS: queries content
- Post detail → EmDash CMS: loads post
- Category archive → EmDash CMS: loads archive
- Tag archive → EmDash CMS: loads archive
- Static pages → EmDash CMS: loads page
- RSS feed → EmDash CMS: reads posts (evidence: `src/pages/rss.xml.ts`)
