# zt3xdv/zt3xdv.github.io architecture

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

- Interactive diagram: https://gitdiagram.com/zt3xdv/zt3xdv.github.io
- Repository: https://github.com/zt3xdv/zt3xdv.github.io

## Overview

This is a personal webpage that fetches the author's GitHub profile and repository README, then presents both as a profile sidebar and rendered Markdown. The browser entry mounts the viewer; the viewer checks local cache first, otherwise fetches both resources, caches the results, and manages loading and error states. README images receive special handling for relative paths. The README describes this as forwarding the profile repository's README; sampled source supports the fetch, rendering, and cache flow. Details of styling and the unsampled HTML shell are not expanded.

Main entry points: [`src/ReadmeViewer.tsx`](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/ReadmeViewer.tsx) (README viewer), [`src/index.ts`](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/index.ts) (Browser page), [`src/main.tsx`](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/main.tsx) (React mount), [`src/components/ReadmeContent.tsx`](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/ReadmeContent.tsx) (Markdown renderer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_runtime["Web runtime"]
  node_browser["Browser page<br/>[index.ts]"]
  node_mount["React mount<br/>[main.tsx]"]
  node_viewer["README viewer<br/>[ReadmeViewer.tsx]"]
end

subgraph group_content["README presentation"]
  node_markdown["Markdown renderer<br/>[ReadmeContent.tsx]"]
  node_image["README image renderer<br/>[Image.tsx]"]
  node_sidebar["Profile sidebar<br/>[ProfileSidebar.tsx]"]
  node_spinner["Loading indicator<br/>[Spinner.tsx]"]
  node_footer["Page footer<br/>[Footer.tsx]"]
end

subgraph group_state["Fetch and cache"]
  node_cache[("Local cache<br/>[constants.ts]")]
end

node_visitor(("Visitor"))
node_readme_source["Repository README"]
node_profile_api["GitHub profile API"]
node_raw_assets["GitHub raw assets"]

node_visitor -->|"opens page"| node_browser
node_browser -->|"serves app"| node_mount
node_mount -->|"renders"| node_viewer
node_viewer -->|"checks and writes"| node_cache
node_viewer -->|"fetches README"| node_readme_source
node_viewer -->|"fetches profile"| node_profile_api
node_viewer -->|"passes content"| node_markdown
node_viewer -->|"passes profile"| node_sidebar
node_viewer -->|"shows while loading"| node_spinner
node_viewer -->|"renders"| node_footer
node_markdown -->|"renders images"| node_image
node_image -->|"resolves relative paths"| node_raw_assets

click node_browser "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/index.ts"
click node_mount "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/main.tsx"
click node_viewer "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/ReadmeViewer.tsx"
click node_cache "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/constants.ts"
click node_markdown "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/ReadmeContent.tsx"
click node_image "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/Image.tsx"
click node_sidebar "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/ProfileSidebar.tsx"
click node_spinner "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/Spinner.tsx"
click node_footer "https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/Footer.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_browser,node_mount,node_viewer toneBlue
class node_markdown,node_image,node_sidebar,node_spinner,node_footer toneAmber
class node_cache,node_profile_api toneMint
class node_visitor,node_readme_source,node_raw_assets toneIndigo
```

## Components

### Web runtime

- [Browser page](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/index.ts): `src/index.ts`
- [React mount](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/main.tsx): `src/main.tsx`
- [README viewer](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/ReadmeViewer.tsx): `src/ReadmeViewer.tsx`

### README presentation

- [Markdown renderer](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/ReadmeContent.tsx): `src/components/ReadmeContent.tsx`
- [README image renderer](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/Image.tsx): `src/components/Image.tsx`
- [Profile sidebar](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/ProfileSidebar.tsx): `src/components/ProfileSidebar.tsx`
- [Loading indicator](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/Spinner.tsx): `src/components/Spinner.tsx`
- [Page footer](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/components/Footer.tsx): `src/components/Footer.tsx`

### Fetch and cache

- [Local cache](https://github.com/zt3xdv/zt3xdv.github.io/blob/main/src/constants.ts): `src/constants.ts`

### Other components

- **Visitor**
- **Repository README**
- **GitHub profile API**
- **GitHub raw assets**

## Connections

- Visitor → Browser page: opens page (evidence: `README.md`)
- Browser page → React mount: serves app (evidence: `src/index.ts`)
- React mount → README viewer: renders (evidence: `src/main.tsx`)
- README viewer → Local cache: checks and writes (evidence: `src/ReadmeViewer.tsx`)
- README viewer → Repository README: fetches README (evidence: `src/ReadmeViewer.tsx`)
- README viewer → GitHub profile API: fetches profile (evidence: `src/ReadmeViewer.tsx`)
- README viewer → Markdown renderer: passes content (evidence: `src/ReadmeViewer.tsx`)
- README viewer → Profile sidebar: passes profile (evidence: `src/ReadmeViewer.tsx`)
- README viewer → Loading indicator: shows while loading (evidence: `src/ReadmeViewer.tsx`)
- README viewer → Page footer: renders (evidence: `src/ReadmeViewer.tsx`)
- Markdown renderer → README image renderer: renders images (evidence: `src/components/ReadmeContent.tsx`)
- README image renderer → GitHub raw assets: resolves relative paths (evidence: `src/components/Image.tsx`)
