# ywu0211/portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/ywu0211/portfolio
- Repository: https://github.com/ywu0211/portfolio

## Overview

This is a static Astro portfolio: visitors browse a homepage, case-study pages, and an about page. Shared presentation includes responsive and print styling; the layout also supports a browser-persisted theme preference. The README documents these capabilities, but the sampled source does not show page imports or runtime calls, so those connections are omitted rather than inferred.

Main entry points: [`src/layouts/Layout.astro`](https://github.com/ywu0211/portfolio/blob/main/src/layouts/Layout.astro) (Site layout), [`src/pages/about.astro`](https://github.com/ywu0211/portfolio/blob/main/src/pages/about.astro) (About page), [`src/pages/index.astro`](https://github.com/ywu0211/portfolio/blob/main/src/pages/index.astro) (Homepage), [`src/pages/work/elements.astro`](https://github.com/ywu0211/portfolio/blob/main/src/pages/work/elements.astro) (Elements study)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_pages["Portfolio pages"]
  node_home["Homepage<br/>[index.astro]"]
  node_about["About page<br/>[about.astro]"]
  node_elements["Elements study<br/>[elements.astro]"]
  node_chatbot["Chatbot study<br/>[ai-chatbot.astro]"]
  node_notfound["Not found<br/>[404.astro]"]
end

subgraph group_presentation["Shared presentation"]
  node_layout["Site layout<br/>[Layout.astro]"]
  node_styles["Global styles<br/>[global.css]"]
  node_profile["Profile data<br/>[profile.ts]"]
end

subgraph group_preferences["Theme preferences"]
  node_theme_store[("Browser storage")]
end

node_visitor(("Visitor"))
node_appearance["System appearance"]
node_google_fonts["Google Fonts"]

node_visitor -->|"opens"| node_home
node_visitor -->|"views"| node_about
node_visitor -->|"views"| node_elements
node_visitor -->|"views"| node_chatbot
node_visitor -.->|"may reach"| node_notfound
node_visitor -->|"sets preference"| node_theme_store
node_layout -->|"reads and writes"| node_theme_store
node_appearance -->|"updates theme"| node_layout
node_layout -->|"loads fonts"| node_google_fonts
node_visitor -->|"prints"| node_about

click node_home "https://github.com/ywu0211/portfolio/blob/main/src/pages/index.astro"
click node_about "https://github.com/ywu0211/portfolio/blob/main/src/pages/about.astro"
click node_elements "https://github.com/ywu0211/portfolio/blob/main/src/pages/work/elements.astro"
click node_chatbot "https://github.com/ywu0211/portfolio/blob/main/src/pages/work/ai-chatbot.astro"
click node_notfound "https://github.com/ywu0211/portfolio/blob/main/src/pages/404.astro"
click node_layout "https://github.com/ywu0211/portfolio/blob/main/src/layouts/Layout.astro"
click node_styles "https://github.com/ywu0211/portfolio/blob/main/src/styles/global.css"
click node_profile "https://github.com/ywu0211/portfolio/blob/main/src/data/profile.ts"

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_about,node_elements,node_chatbot,node_notfound toneBlue
class node_layout,node_styles,node_profile toneAmber
class node_theme_store toneMint
class node_visitor,node_appearance,node_google_fonts toneIndigo
```

## Components

### Portfolio pages

- [Homepage](https://github.com/ywu0211/portfolio/blob/main/src/pages/index.astro): `src/pages/index.astro`
- [About page](https://github.com/ywu0211/portfolio/blob/main/src/pages/about.astro): `src/pages/about.astro`
- [Elements study](https://github.com/ywu0211/portfolio/blob/main/src/pages/work/elements.astro): `src/pages/work/elements.astro`
- [Chatbot study](https://github.com/ywu0211/portfolio/blob/main/src/pages/work/ai-chatbot.astro): `src/pages/work/ai-chatbot.astro`
- [Not found](https://github.com/ywu0211/portfolio/blob/main/src/pages/404.astro): `src/pages/404.astro`

### Shared presentation

- [Site layout](https://github.com/ywu0211/portfolio/blob/main/src/layouts/Layout.astro): `src/layouts/Layout.astro`
- [Global styles](https://github.com/ywu0211/portfolio/blob/main/src/styles/global.css): `src/styles/global.css`
- [Profile data](https://github.com/ywu0211/portfolio/blob/main/src/data/profile.ts): `src/data/profile.ts`

### Theme preferences

- **Browser storage**

### Other components

- **Visitor**
- **System appearance**
- **Google Fonts**

## Connections

- Visitor → Homepage: opens (evidence: `README.md`)
- Visitor → About page: views (evidence: `README.md`)
- Visitor → Elements study: views (evidence: `README.md`)
- Visitor → Chatbot study: views (evidence: `README.md`)
- Visitor → Not found: may reach
- Visitor → Browser storage: sets preference (evidence: `README.md`)
- Site layout → Browser storage: reads and writes (evidence: `README.md`)
- System appearance → Site layout: updates theme (evidence: `README.md`)
- Site layout → Google Fonts: loads fonts (evidence: `README.md`)
- Visitor → About page: prints (evidence: `README.md`)
