# wujue0115/blog architecture

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

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

## Overview

##### Project type and purpose
- This is a personal, content-driven static site (“Wujue’s blog”) built with VitePress (a Vue-based static site generator).
- Purpose: Author’s learning notes and articles, rendered from Markdown into a performant static website.

##### File structure
- Top-level:
- `.github/workflows/deploy.yml` – CI/CD pipeline for build & deploy
- `.vitepress/` – VitePress configuration, theme, components, styles
- `posts/` – Markdown content organized by topic/date
- `package.json`, `pnpm-lock.yaml` – project dependencies & scripts
- `tsconfig.json`, `uno.config.ts` – TypeScript & UnoCSS configs
- Patterns: Component hierarchy in theme (atoms → molecules → organisms), clear separation of content vs. presentation.

##### README
- Confirms: personal blog, static site, hosted at blog.wujue.dev
- No extra architectural notes, so we infer: static site generation → CI/CD → static hosting.

##### Detailed breakdown of components
- posts/*.md
- assets (if any)
- .vitepress/config.mts
- theme/components (atoms → molecules → organisms)
- configOptions/*.ts
- package.json scripts (`dev`, `build`)
- .github/workflows/deploy.yml
- pnpm
- Output: dist/ (static files)
- CDN/GitHub Pages
- Browser fetches HTML/CSS/JS
- Executes Vue runtime for interactivity (if any)

## Diagram (Mermaid)

```mermaid
graph TD
    %% Content Layer
    subgraph "Content Layer"
        direction TB
        posts["posts/ (Markdown files)"]:::content
    end

    %% Generator Layer
    subgraph "Generator (VitePress + Theme)"
        direction TB
        configMts[".vitepress/config.mts"]:::generator
        configOptions["configOptions/"]:::generator
        themeComps["theme/components/ (atoms→molecules→organisms)"]:::generator
        layouts["theme/layouts/"]:::generator
        pages["theme/pages/"]:::generator
        postsData["posts.data.ts"]:::generator
        styles["styles/style.css"]:::generator
        enums["enums/index.ts"]:::generator
        types["types/index.ts"]:::generator
        composables["composables/"]:::generator
    end

    %% CI/CD Layer
    subgraph "Build & CI/CD"
        direction TB
        package["package.json (scripts)"]:::cicd
        lock["pnpm-lock.yaml"]:::cicd
        workflow[".github/workflows/deploy.yml"]:::cicd
        tsconfig["tsconfig.json"]:::cicd
        uno["uno.config.ts"]:::cicd
    end

    %% Hosting Layer
    subgraph "Hosting & Delivery"
        direction TB
        staticFiles(("dist/ (Static Files)")):::hosting
        cdn["CDN / GitHub Pages"]:::hosting
    end

    %% Client Layer
    subgraph "Client"
        direction TB
        browser["Browser / Search Engine"]:::client
    end

    %% Git Push Trigger
    gitpush["Git Push to main"]:::cicd

    %% Connections - Build Flow
    posts -->|"feeds into"| configMts
    configMts --> configOptions
    configOptions --> themeComps
    themeComps --> layouts
    layouts --> pages
    pages --> postsData
    postsData --> styles
    styles --> enums
    enums --> types
    types --> composables

    package -->|"dev & build scripts"| configMts
    tsconfig --> configMts
    uno --> configMts

    %% CI/CD Pipeline
    gitpush --> workflow
    workflow -->|"runs build"| package
    workflow -->|"outputs"| staticFiles

    %% Hosting Flow
    staticFiles --> cdn
    cdn --> browser

    %% Click Events
    click posts "https://github.com/wujue0115/blog/tree/main/posts/"
    click configMts "https://github.com/wujue0115/blog/blob/main/.vitepress/config.mts"
    click configOptions "https://github.com/wujue0115/blog/tree/main/.vitepress/configOptions/"
    click themeComps "https://github.com/wujue0115/blog/tree/main/.vitepress/theme/components/"
    click layouts "https://github.com/wujue0115/blog/tree/main/.vitepress/theme/layouts/"
    click pages "https://github.com/wujue0115/blog/tree/main/.vitepress/theme/pages/"
    click postsData "https://github.com/wujue0115/blog/blob/main/.vitepress/theme/posts.data.ts"
    click styles "https://github.com/wujue0115/blog/blob/main/.vitepress/theme/styles/style.css"
    click enums "https://github.com/wujue0115/blog/blob/main/.vitepress/theme/enums/index.ts"
    click types "https://github.com/wujue0115/blog/blob/main/.vitepress/theme/types/index.ts"
    click composables "https://github.com/wujue0115/blog/tree/main/.vitepress/theme/composables/"
    click package "https://github.com/wujue0115/blog/blob/main/package.json"
    click lock "https://github.com/wujue0115/blog/blob/main/pnpm-lock.yaml"
    click workflow "https://github.com/wujue0115/blog/blob/main/.github/workflows/deploy.yml"
    click tsconfig "https://github.com/wujue0115/blog/blob/main/tsconfig.json"
    click uno "https://github.com/wujue0115/blog/blob/main/uno.config.ts"

    %% Styles
    classDef content fill:#DCEEFB,stroke:#3B82F6,color:#1E3A8A
    classDef generator fill:#E6FCF5,stroke:#10B981,color:#065F46
    classDef cicd fill:#F3E8FF,stroke:#8B5CF6,color:#4C1D95
    classDef hosting fill:#FFF4E6,stroke:#F97316,color:#9A3412
    classDef client fill:#F0F0F0,stroke:#6B7280,color:#374151
```
