# toosign00/my-blog architecture

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

- Interactive diagram: https://gitdiagram.com/toosign00/my-blog
- Repository: https://github.com/toosign00/my-blog

## Overview

This is a Next.js personal blog and portfolio. Visitors browse the home page, explore posts by category or tag, read individual articles, and view projects or the author profile. Content utilities load and shape post and project data; page routes present it, while RSS and sitemap routes publish it for other consumers. Separate features provide link previews, visit counts, and a GitHub contribution heatmap. The source index and excerpts support several connections; unsampled route behavior is represented cautiously, and no README was provided.

Main entry points: [`src/app/(default)/page.tsx`](https://github.com/toosign00/my-blog/blob/main/src/app/(default)/page.tsx) (Home page), [`src/utils/post-util.ts`](https://github.com/toosign00/my-blog/blob/main/src/utils/post-util.ts) (Post content), [`src/utils/project-util.ts`](https://github.com/toosign00/my-blog/blob/main/src/utils/project-util.ts) (Project content), [`src/app/(default)/categories/page.tsx`](https://github.com/toosign00/my-blog/blob/main/src/app/(default)/categories/page.tsx) (Category and tag pages)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site experience"]
  node_home["Home page<br/>[page.tsx]"]
  node_layout["Site layout<br/>[Root.tsx]"]
end

subgraph group_content["Content discovery"]
  node_posts["Post pages<br/>[page.tsx]"]
  node_postdata["Post content<br/>[post-util.ts]"]
  node_taxonomy["Category and tag pages<br/>[page.tsx]"]
  node_postlist["Post lists<br/>[postGrid.tsx]"]
  node_mdx["MDX components<br/>[mdxComponent.tsx]"]
end

subgraph group_portfolio["Portfolio profile"]
  node_projects["Project pages<br/>[page.tsx]"]
  node_projectdata["Project content<br/>[project-util.ts]"]
  node_projectbrowse["Project browsing<br/>[ProjectSection.tsx]"]
  node_about["About page<br/>[page.tsx]"]
  node_aboutcontent["Profile and experience<br/>[about.constants.ts]"]
  node_heatmap["Contribution heatmap<br/>[index.tsx]"]
end

subgraph group_services["APIs and metrics"]
  node_viewswidget["Visit widget<br/>[index.tsx]"]
  node_viewhook["Views client<br/>[useViews.ts]"]
  node_viewsapi["Views API<br/>[route.ts]"]
  node_viewlogic["View counting<br/>[views-util.ts]"]
  node_database[("D1 database<br/>[d1-util.ts]")]
  node_previewapi["Link preview API<br/>[route.ts]"]
  node_previewlogic["Preview fetching and parsing"]
  node_previewrequest["Pinned URL request"]
end

subgraph group_publishing["Search and feeds"]
  node_rss["RSS feed<br/>[route.ts]"]
  node_sitemap["Sitemap<br/>[route.ts]"]
  node_metadata["Metadata generation<br/>[metadata-util.ts]"]
end

node_visitor(("Visitor"))
node_github(("GitHub"))

node_visitor -->|"opens"| node_home
node_visitor -->|"reads"| node_posts
node_visitor -->|"browses"| node_taxonomy
node_visitor -->|"views"| node_projects
node_visitor -->|"views"| node_about
node_home -->|"loads posts"| node_postdata
node_home -->|"renders"| node_postlist
node_home -->|"renders"| node_heatmap
node_taxonomy -->|"loads posts"| node_postdata
node_taxonomy -.->|"renders"| node_postlist
node_posts -.->|"renders"| node_mdx
node_projects -.->|"loads projects"| node_projectdata
node_projectbrowse -->|"sorts projects"| node_projectdata
node_about -->|"displays profile"| node_aboutcontent
node_about -->|"generates metadata"| node_metadata
node_layout -.->|"frames pages"| node_home
node_viewswidget -->|"uses"| node_viewhook
node_viewhook -->|"requests counts"| node_viewsapi
node_viewsapi -->|"reads and records"| node_viewlogic
node_viewlogic -->|"persists counts"| node_database
node_previewapi -->|"fetches preview"| node_previewlogic
node_previewlogic -->|"requests URL"| node_previewrequest
node_rss -->|"loads posts"| node_postdata
node_rss -->|"loads projects"| node_projectdata
node_sitemap -->|"loads posts"| node_postdata
node_sitemap -->|"loads projects"| node_projectdata
node_heatmap -.->|"loads contributions"| node_github

click node_home "https://github.com/toosign00/my-blog/blob/main/src/app/(default)/page.tsx"
click node_layout "https://github.com/toosign00/my-blog/blob/main/src/components/layout/Root.tsx"
click node_posts "https://github.com/toosign00/my-blog/blob/main/src/app/(default)/posts/%5Bslug%5D/page.tsx"
click node_postdata "https://github.com/toosign00/my-blog/blob/main/src/utils/post-util.ts"
click node_taxonomy "https://github.com/toosign00/my-blog/blob/main/src/app/(default)/categories/page.tsx"
click node_postlist "https://github.com/toosign00/my-blog/blob/main/src/components/ui/postGrid.tsx"
click node_mdx "https://github.com/toosign00/my-blog/blob/main/src/components/ui/mdx/mdxComponent.tsx"
click node_projects "https://github.com/toosign00/my-blog/blob/main/src/app/(wide)/projects/%5Bslug%5D/page.tsx"
click node_projectdata "https://github.com/toosign00/my-blog/blob/main/src/utils/project-util.ts"
click node_projectbrowse "https://github.com/toosign00/my-blog/blob/main/src/components/project/ProjectSection.tsx"
click node_about "https://github.com/toosign00/my-blog/blob/main/src/app/(default)/about/page.tsx"
click node_aboutcontent "https://github.com/toosign00/my-blog/blob/main/src/constants/about.constants.ts"
click node_viewswidget "https://github.com/toosign00/my-blog/blob/main/src/components/ViewsWidget/index.tsx"
click node_viewhook "https://github.com/toosign00/my-blog/blob/main/src/hooks/useViews.ts"
click node_viewsapi "https://github.com/toosign00/my-blog/blob/main/src/app/api/views/route.ts"
click node_viewlogic "https://github.com/toosign00/my-blog/blob/main/src/utils/views-util.ts"
click node_database "https://github.com/toosign00/my-blog/blob/main/src/utils/d1-util.ts"
click node_previewapi "https://github.com/toosign00/my-blog/blob/main/src/app/api/link-preview/route.ts"
click node_previewlogic "https://github.com/toosign00/my-blog/blob/main/src/utils/link-preview-util.ts"
click node_previewrequest "https://github.com/toosign00/my-blog/blob/main/src/utils/link-preview-request-util.ts"
click node_rss "https://github.com/toosign00/my-blog/blob/main/src/app/rss.xml/route.ts"
click node_sitemap "https://github.com/toosign00/my-blog/blob/main/src/app/sitemap.xml/route.ts"
click node_metadata "https://github.com/toosign00/my-blog/blob/main/src/utils/metadata-util.ts"
click node_heatmap "https://github.com/toosign00/my-blog/blob/main/src/components/ActivityHeatmap/index.tsx"

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_home,node_layout toneBlue
class node_posts,node_postdata,node_taxonomy,node_postlist,node_mdx toneAmber
class node_projects,node_projectdata,node_projectbrowse,node_about,node_aboutcontent,node_heatmap toneMint
class node_viewswidget,node_viewhook,node_viewsapi,node_viewlogic,node_database,node_previewapi,node_previewlogic,node_previewrequest toneRose
class node_rss,node_sitemap,node_metadata,node_visitor,node_github toneIndigo
```

## Components

### Site experience

- [Home page](https://github.com/toosign00/my-blog/blob/main/src/app/(default)/page.tsx): `src/app/(default)/page.tsx`
- [Site layout](https://github.com/toosign00/my-blog/blob/main/src/components/layout/Root.tsx): `src/components/layout/Root.tsx`

### Content discovery

- [Post pages](https://github.com/toosign00/my-blog/blob/main/src/app/(default)/posts/%5Bslug%5D/page.tsx): `src/app/(default)/posts/[slug]/page.tsx`
- [Post content](https://github.com/toosign00/my-blog/blob/main/src/utils/post-util.ts): `src/utils/post-util.ts`
- [Category and tag pages](https://github.com/toosign00/my-blog/blob/main/src/app/(default)/categories/page.tsx): `src/app/(default)/categories/page.tsx`
- [Post lists](https://github.com/toosign00/my-blog/blob/main/src/components/ui/postGrid.tsx): `src/components/ui/postGrid.tsx`
- [MDX components](https://github.com/toosign00/my-blog/blob/main/src/components/ui/mdx/mdxComponent.tsx): `src/components/ui/mdx/mdxComponent.tsx`

### Portfolio profile

- [Project pages](https://github.com/toosign00/my-blog/blob/main/src/app/(wide)/projects/%5Bslug%5D/page.tsx): `src/app/(wide)/projects/[slug]/page.tsx`
- [Project content](https://github.com/toosign00/my-blog/blob/main/src/utils/project-util.ts): `src/utils/project-util.ts`
- [Project browsing](https://github.com/toosign00/my-blog/blob/main/src/components/project/ProjectSection.tsx): `src/components/project/ProjectSection.tsx`
- [About page](https://github.com/toosign00/my-blog/blob/main/src/app/(default)/about/page.tsx): `src/app/(default)/about/page.tsx`
- [Profile and experience](https://github.com/toosign00/my-blog/blob/main/src/constants/about.constants.ts): `src/constants/about.constants.ts`
- [Contribution heatmap](https://github.com/toosign00/my-blog/blob/main/src/components/ActivityHeatmap/index.tsx): `src/components/ActivityHeatmap/index.tsx`

### APIs and metrics

- [Visit widget](https://github.com/toosign00/my-blog/blob/main/src/components/ViewsWidget/index.tsx): `src/components/ViewsWidget/index.tsx`
- [Views client](https://github.com/toosign00/my-blog/blob/main/src/hooks/useViews.ts): `src/hooks/useViews.ts`
- [Views API](https://github.com/toosign00/my-blog/blob/main/src/app/api/views/route.ts): `src/app/api/views/route.ts`
- [View counting](https://github.com/toosign00/my-blog/blob/main/src/utils/views-util.ts): `src/utils/views-util.ts`
- [D1 database](https://github.com/toosign00/my-blog/blob/main/src/utils/d1-util.ts): `src/utils/d1-util.ts`
- [Link preview API](https://github.com/toosign00/my-blog/blob/main/src/app/api/link-preview/route.ts): `src/app/api/link-preview/route.ts`
- [Preview fetching and parsing](https://github.com/toosign00/my-blog/blob/main/src/utils/link-preview-util.ts): `src/utils/link-preview-util.ts`
- [Pinned URL request](https://github.com/toosign00/my-blog/blob/main/src/utils/link-preview-request-util.ts): `src/utils/link-preview-request-util.ts`

### Search and feeds

- [RSS feed](https://github.com/toosign00/my-blog/blob/main/src/app/rss.xml/route.ts): `src/app/rss.xml/route.ts`
- [Sitemap](https://github.com/toosign00/my-blog/blob/main/src/app/sitemap.xml/route.ts): `src/app/sitemap.xml/route.ts`
- [Metadata generation](https://github.com/toosign00/my-blog/blob/main/src/utils/metadata-util.ts): `src/utils/metadata-util.ts`

### Other components

- **Visitor**
- **GitHub**

## Connections

- Visitor → Home page: opens
- Visitor → Post pages: reads
- Visitor → Category and tag pages: browses
- Visitor → Project pages: views
- Visitor → About page: views
- Home page → Post content: loads posts (evidence: `src/app/(default)/page.tsx`)
- Home page → Post lists: renders (evidence: `src/app/(default)/page.tsx`)
- Home page → Contribution heatmap: renders (evidence: `src/app/(default)/page.tsx`)
- Category and tag pages → Post content: loads posts (evidence: `src/app/(default)/categories/page.tsx`)
- Category and tag pages → Post lists: renders
- Post pages → MDX components: renders
- Project pages → Project content: loads projects
- Project browsing → Project content: sorts projects (evidence: `src/components/project/ProjectSection.tsx`)
- About page → Profile and experience: displays profile (evidence: `src/app/(default)/about/page.tsx`)
- About page → Metadata generation: generates metadata (evidence: `src/app/(default)/about/page.tsx`)
- Site layout → Home page: frames pages
- Visit widget → Views client: uses
- Views client → Views API: requests counts (evidence: `src/hooks/useViews.ts`)
- Views API → View counting: reads and records (evidence: `src/app/api/views/route.ts`)
- View counting → D1 database: persists counts (evidence: `src/utils/views-util.ts`)
- Link preview API → Preview fetching and parsing: fetches preview (evidence: `src/app/api/link-preview/route.ts`)
- Preview fetching and parsing → Pinned URL request: requests URL (evidence: `src/utils/link-preview-util.ts`)
- RSS feed → Post content: loads posts (evidence: `src/app/rss.xml/route.ts`)
- RSS feed → Project content: loads projects (evidence: `src/app/rss.xml/route.ts`)
- Sitemap → Post content: loads posts (evidence: `src/app/sitemap.xml/route.ts`)
- Sitemap → Project content: loads projects (evidence: `src/app/sitemap.xml/route.ts`)
- Contribution heatmap → GitHub: loads contributions
