# scadoshi/portfolio architecture

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

## Overview

This is a Dioxus portfolio site: visitors browse the home page, project and side-quest listings, then detail pages with project narratives, media, code, and measurements; separate routes support contribution and not-found handling. Shared data feeds these views, while stats enrich the home page with live-or-baked repository metrics and contribution charts. The graph follows only relationships visible in excerpts or documented in the README; several component and route implementations are unsampled, so their internal wiring is omitted.

Main entry points: [`src/main.rs`](https://github.com/scadoshi/portfolio/blob/main/src/main.rs) (Router and app shell), [`src/stats.rs`](https://github.com/scadoshi/portfolio/blob/main/src/stats.rs) (Metrics snapshot), [`src/pages/detail.rs`](https://github.com/scadoshi/portfolio/blob/main/src/pages/detail.rs) (Project detail pages), [`src/pages/home.rs`](https://github.com/scadoshi/portfolio/blob/main/src/pages/home.rs) (Home page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site shell"]
  node_app["Router and app shell<br/>[main.rs]"]
  node_route_pages["Route page modules"]
  node_notfound["Not-found page<br/>[not_found.rs]"]
  node_theme_store["Theme preference<br/>[theme_store.rs]"]
end

subgraph group_content["Portfolio content"]
  node_home["Home page<br/>[home.rs]"]
  node_detail["Project detail pages<br/>[detail.rs]"]
  node_sidequests["Side-quest listing<br/>[side_quests.rs]"]
  node_contribute["Contribution page<br/>[contribute.rs]"]
  node_portfolio_data["Project content<br/>[data.rs]"]
end

subgraph group_metrics["Repository metrics"]
  node_live_metrics["Live metrics fetch<br/>[stats.rs]"]
  node_metrics_data["Metrics snapshot<br/>[stats.rs]"]
  node_heatmap["Contribution heatmap<br/>[heatmap.rs]"]
  node_commit_chart["Commit chart<br/>[commits.rs]"]
  node_fleet["Repository fleet<br/>[fleet.rs]"]
  node_measured["Measured stats<br/>[measured.rs]"]
end

subgraph group_presentation["Shared presentation"]
  node_gallery["Project gallery<br/>[gallery.rs]"]
  node_project_card["Project cards<br/>[project_card.rs]"]
  node_page_meta["Page metadata<br/>[page_meta.rs]"]
  node_navbar["Navigation<br/>[navbar.rs]"]
  node_footer["Footer<br/>[footer.rs]"]
  node_detail_components["Detail visualizations<br/>[detail.rs]"]
  node_page_meta_shared["Shared metadata UI<br/>[page_meta.rs]"]
end

node_visitor(("Visitor"))
node_heron["Heron stats API"]
node_browser_storage[("Browser local storage")]
node_support_services["Support providers"]

node_visitor -->|"opens routes"| node_app
node_app -->|"routes to"| node_route_pages
node_app -->|"loads preference"| node_theme_store
node_theme_store -.->|"reads and writes"| node_browser_storage
node_app -->|"fetches metrics"| node_live_metrics
node_live_metrics -->|"requests stats"| node_heron
node_live_metrics -->|"updates snapshot"| node_metrics_data
node_home -->|"loads featured projects"| node_portfolio_data
node_detail -->|"looks up project"| node_portfolio_data
node_home -.->|"renders cards"| node_project_card
node_detail -->|"renders media"| node_gallery
node_detail -->|"renders sections"| node_detail_components
node_home -->|"renders chart"| node_heatmap
node_metrics_data -.->|"provides calendar data"| node_heatmap
node_metrics_data -->|"provides weekly commits"| node_commit_chart
node_metrics_data -.->|"provides repository stats"| node_fleet
node_metrics_data -.->|"provides measurements"| node_measured
node_detail -->|"sets page metadata"| node_page_meta
node_contribute -->|"sets page metadata"| node_page_meta
node_page_meta -->|"wraps shared component"| node_page_meta_shared
node_contribute -->|"links support options"| node_support_services
node_app -.->|"renders navigation"| node_navbar
node_app -->|"renders footer"| node_footer
node_route_pages -.->|"handles unmatched routes"| node_notfound

click node_app "https://github.com/scadoshi/portfolio/blob/main/src/main.rs"
click node_route_pages "https://github.com/scadoshi/portfolio/tree/main/src/pages"
click node_home "https://github.com/scadoshi/portfolio/blob/main/src/pages/home.rs"
click node_detail "https://github.com/scadoshi/portfolio/blob/main/src/pages/detail.rs"
click node_sidequests "https://github.com/scadoshi/portfolio/blob/main/src/pages/side_quests.rs"
click node_contribute "https://github.com/scadoshi/portfolio/blob/main/src/pages/contribute.rs"
click node_notfound "https://github.com/scadoshi/portfolio/blob/main/src/pages/not_found.rs"
click node_portfolio_data "https://github.com/scadoshi/portfolio/blob/main/src/data.rs"
click node_gallery "https://github.com/scadoshi/portfolio/blob/main/src/components/gallery.rs"
click node_project_card "https://github.com/scadoshi/portfolio/blob/main/src/components/project_card.rs"
click node_page_meta "https://github.com/scadoshi/portfolio/blob/main/src/components/page_meta.rs"
click node_navbar "https://github.com/scadoshi/portfolio/blob/main/src/components/navbar.rs"
click node_footer "https://github.com/scadoshi/portfolio/blob/main/src/components/footer.rs"
click node_detail_components "https://github.com/scadoshi/portfolio/blob/main/src/pages/detail.rs"
click node_live_metrics "https://github.com/scadoshi/portfolio/blob/main/src/stats.rs"
click node_metrics_data "https://github.com/scadoshi/portfolio/blob/main/src/stats.rs"
click node_heatmap "https://github.com/scadoshi/portfolio/blob/main/src/components/heatmap.rs"
click node_commit_chart "https://github.com/scadoshi/portfolio/blob/main/src/components/commits.rs"
click node_fleet "https://github.com/scadoshi/portfolio/blob/main/src/components/fleet.rs"
click node_measured "https://github.com/scadoshi/portfolio/blob/main/src/components/measured.rs"
click node_theme_store "https://github.com/scadoshi/portfolio/blob/main/src/theme_store.rs"
click node_page_meta_shared "https://github.com/scadoshi/portfolio/blob/main/src/components/page_meta.rs"

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_app,node_route_pages,node_notfound,node_theme_store toneBlue
class node_home,node_detail,node_sidequests,node_contribute,node_portfolio_data,node_browser_storage toneAmber
class node_live_metrics,node_metrics_data,node_heatmap,node_commit_chart,node_fleet,node_measured,node_heron toneMint
class node_gallery,node_project_card,node_page_meta,node_navbar,node_footer,node_detail_components,node_page_meta_shared toneRose
class node_visitor,node_support_services toneIndigo
```

## Components

### Site shell

- [Router and app shell](https://github.com/scadoshi/portfolio/blob/main/src/main.rs): `src/main.rs`
- [Route page modules](https://github.com/scadoshi/portfolio/tree/main/src/pages): `src/pages`
- [Not-found page](https://github.com/scadoshi/portfolio/blob/main/src/pages/not_found.rs): `src/pages/not_found.rs`
- [Theme preference](https://github.com/scadoshi/portfolio/blob/main/src/theme_store.rs): `src/theme_store.rs`

### Portfolio content

- [Home page](https://github.com/scadoshi/portfolio/blob/main/src/pages/home.rs): `src/pages/home.rs`
- [Project detail pages](https://github.com/scadoshi/portfolio/blob/main/src/pages/detail.rs): `src/pages/detail.rs`
- [Side-quest listing](https://github.com/scadoshi/portfolio/blob/main/src/pages/side_quests.rs): `src/pages/side_quests.rs`
- [Contribution page](https://github.com/scadoshi/portfolio/blob/main/src/pages/contribute.rs): `src/pages/contribute.rs`
- [Project content](https://github.com/scadoshi/portfolio/blob/main/src/data.rs): `src/data.rs`

### Repository metrics

- [Live metrics fetch](https://github.com/scadoshi/portfolio/blob/main/src/stats.rs): `src/stats.rs`
- [Metrics snapshot](https://github.com/scadoshi/portfolio/blob/main/src/stats.rs): `src/stats.rs`
- [Contribution heatmap](https://github.com/scadoshi/portfolio/blob/main/src/components/heatmap.rs): `src/components/heatmap.rs`
- [Commit chart](https://github.com/scadoshi/portfolio/blob/main/src/components/commits.rs): `src/components/commits.rs`
- [Repository fleet](https://github.com/scadoshi/portfolio/blob/main/src/components/fleet.rs): `src/components/fleet.rs`
- [Measured stats](https://github.com/scadoshi/portfolio/blob/main/src/components/measured.rs): `src/components/measured.rs`

### Shared presentation

- [Project gallery](https://github.com/scadoshi/portfolio/blob/main/src/components/gallery.rs): `src/components/gallery.rs`
- [Project cards](https://github.com/scadoshi/portfolio/blob/main/src/components/project_card.rs): `src/components/project_card.rs`
- [Page metadata](https://github.com/scadoshi/portfolio/blob/main/src/components/page_meta.rs): `src/components/page_meta.rs`
- [Navigation](https://github.com/scadoshi/portfolio/blob/main/src/components/navbar.rs): `src/components/navbar.rs`
- [Footer](https://github.com/scadoshi/portfolio/blob/main/src/components/footer.rs): `src/components/footer.rs`
- [Detail visualizations](https://github.com/scadoshi/portfolio/blob/main/src/pages/detail.rs): `src/pages/detail.rs`
- [Shared metadata UI](https://github.com/scadoshi/portfolio/blob/main/src/components/page_meta.rs): `src/components/page_meta.rs`

### Other components

- **Visitor**
- **Heron stats API**
- **Browser local storage**
- **Support providers**

## Connections

- Visitor → Router and app shell: opens routes (evidence: `src/main.rs`)
- Router and app shell → Route page modules: routes to (evidence: `src/main.rs`)
- Router and app shell → Theme preference: loads preference (evidence: `src/main.rs`)
- Theme preference → Browser local storage: reads and writes
- Router and app shell → Live metrics fetch: fetches metrics (evidence: `src/main.rs`)
- Live metrics fetch → Heron stats API: requests stats (evidence: `src/stats.rs`)
- Live metrics fetch → Metrics snapshot: updates snapshot (evidence: `src/main.rs`)
- Home page → Project content: loads featured projects (evidence: `src/pages/home.rs`)
- Project detail pages → Project content: looks up project (evidence: `src/pages/detail.rs`)
- Home page → Project cards: renders cards
- Project detail pages → Project gallery: renders media (evidence: `src/pages/detail.rs`)
- Project detail pages → Detail visualizations: renders sections (evidence: `src/pages/detail.rs`)
- Home page → Contribution heatmap: renders chart (evidence: `src/pages/home.rs`)
- Metrics snapshot → Contribution heatmap: provides calendar data
- Metrics snapshot → Commit chart: provides weekly commits (evidence: `src/components/commits.rs`)
- Metrics snapshot → Repository fleet: provides repository stats (evidence: `src/components/fleet.rs`)
- Metrics snapshot → Measured stats: provides measurements (evidence: `src/components/measured.rs`)
- Project detail pages → Page metadata: sets page metadata (evidence: `src/pages/detail.rs`)
- Contribution page → Page metadata: sets page metadata (evidence: `src/pages/contribute.rs`)
- Page metadata → Shared metadata UI: wraps shared component (evidence: `src/components/page_meta.rs`)
- Contribution page → Support providers: links support options (evidence: `src/pages/contribute.rs`)
- Router and app shell → Navigation: renders navigation
- Router and app shell → Footer: renders footer (evidence: `src/main.rs`)
- Route page modules → Not-found page: handles unmatched routes (evidence: `src/pages/mod.rs`)
