# mahadihasan9/my_web architecture

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

- Interactive diagram: https://gitdiagram.com/mahadihasan9/my_web
- Repository: https://github.com/mahadihasan9/my_web

## Overview

This repository is a personal portfolio website with interactive browser behavior and a GitHub statistics feature. Visitors view the portfolio; its JavaScript handles navigation, reveals, skill bars, copy controls, and statistics. Statistics are loaded from a same-origin snapshot first, with live and fallback API sources available, and cached in browser storage. A separate updater fetches statistics and refreshes the snapshot. The README is empty, and the HTML and CSS were not sampled, so their specific wiring and page sections cannot be verified.

Main entry points: [`script.js`](https://github.com/mahadihasan9/my_web/blob/main/script.js) (Page Interactions), [`scripts/update-github-stats.mjs`](https://github.com/mahadihasan9/my_web/blob/main/scripts/update-github-stats.mjs) (Snapshot Updater), [`github-stats.json`](https://github.com/mahadihasan9/my_web/blob/main/github-stats.json) (Stats Snapshot), [`index.html`](https://github.com/mahadihasan9/my_web/blob/main/index.html) (Portfolio Page)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Portfolio Site"]
  node_page["Portfolio Page<br/>[index.html]"]
  node_styles["Page Styles<br/>[style.css]"]
end

subgraph group_browser["Browser Behavior"]
  node_interactions["Page Interactions<br/>[script.js]"]
end

subgraph group_stats["GitHub Statistics"]
  node_stats_ui["Stats Display<br/>[script.js]"]
  node_browser_cache[("Browser Cache")]
  node_snapshot["Stats Snapshot<br/>[github-stats.json]"]
  node_stats_updater["Snapshot Updater"]
end

node_visitor(("Visitor"))
node_github_api["GitHub API"]
node_fallback_apis["Fallback APIs"]

node_visitor -.->|"views"| node_page
node_interactions -->|"renders"| node_stats_ui
node_interactions -->|"caches"| node_browser_cache
node_interactions -->|"fetches"| node_snapshot
node_interactions -->|"fetches"| node_github_api
node_interactions -->|"fetches"| node_fallback_apis
node_stats_updater -->|"fetches"| node_github_api
node_stats_updater -->|"fetches"| node_fallback_apis
node_stats_updater -->|"reads and writes"| node_snapshot

click node_page "https://github.com/mahadihasan9/my_web/blob/main/index.html"
click node_styles "https://github.com/mahadihasan9/my_web/blob/main/style.css"
click node_interactions "https://github.com/mahadihasan9/my_web/blob/main/script.js"
click node_stats_ui "https://github.com/mahadihasan9/my_web/blob/main/script.js"
click node_snapshot "https://github.com/mahadihasan9/my_web/blob/main/github-stats.json"
click node_stats_updater "https://github.com/mahadihasan9/my_web/blob/main/scripts/update-github-stats.mjs"

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_page,node_styles toneBlue
class node_interactions toneAmber
class node_stats_ui,node_browser_cache,node_snapshot,node_stats_updater,node_github_api,node_fallback_apis toneMint
class node_visitor toneIndigo
```

## Components

### Portfolio Site

- [Portfolio Page](https://github.com/mahadihasan9/my_web/blob/main/index.html): `index.html`
- [Page Styles](https://github.com/mahadihasan9/my_web/blob/main/style.css): `style.css`

### Browser Behavior

- [Page Interactions](https://github.com/mahadihasan9/my_web/blob/main/script.js): `script.js`

### GitHub Statistics

- [Stats Display](https://github.com/mahadihasan9/my_web/blob/main/script.js): `script.js`
- **Browser Cache**
- [Stats Snapshot](https://github.com/mahadihasan9/my_web/blob/main/github-stats.json): `github-stats.json`
- [Snapshot Updater](https://github.com/mahadihasan9/my_web/blob/main/scripts/update-github-stats.mjs): `scripts/update-github-stats.mjs`

### Other components

- **Visitor**
- **GitHub API**
- **Fallback APIs**

## Connections

- Visitor → Portfolio Page: views
- Page Interactions → Stats Display: renders (evidence: `script.js`)
- Page Interactions → Browser Cache: caches (evidence: `script.js`)
- Page Interactions → Stats Snapshot: fetches (evidence: `script.js`)
- Page Interactions → GitHub API: fetches (evidence: `script.js`)
- Page Interactions → Fallback APIs: fetches (evidence: `script.js`)
- Snapshot Updater → GitHub API: fetches (evidence: `scripts/update-github-stats.mjs`)
- Snapshot Updater → Fallback APIs: fetches (evidence: `scripts/update-github-stats.mjs`)
- Snapshot Updater → Stats Snapshot: reads and writes (evidence: `scripts/update-github-stats.mjs`)
