# opbsuthar/mybyte architecture

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

- Interactive diagram: https://gitdiagram.com/opbsuthar/mybyte
- Repository: https://github.com/opbsuthar/mybyte

## Overview

MyByte is a React portfolio SPA that presents the owner’s work and story through routed pages, project showcases, and interactive effects. The main visitor flow runs through the app shell to its home sections; project data is loaded by the app, shared with showcase components, and opened in a detail modal. README-documented capabilities include the Story and Resume routes, gamified secrets, and a Python-to-JSON project refresh pipeline. Several component implementations were not sampled, so those nodes use their supported source paths and only documented or indexed relationships are shown.

Main entry points: [`web/src/App.jsx`](https://github.com/opbsuthar/mybyte/blob/main/web/src/App.jsx) (App shell), [`web/src/lib/github.js`](https://github.com/opbsuthar/mybyte/blob/main/web/src/lib/github.js) (Project data loader), [`web/src/ProjectsContext.jsx`](https://github.com/opbsuthar/mybyte/blob/main/web/src/ProjectsContext.jsx) (Project context), [`tools/fetch_github.py`](https://github.com/opbsuthar/mybyte/blob/main/tools/fetch_github.py) (GitHub data generator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Portfolio app"]
  node_app_shell["App shell<br/>[App.jsx]"]
  node_hash_router["Hash router<br/>[router.jsx]"]
  node_effects["Visual effects<br/>[Background.jsx]"]
  node_secret_engine["Secrets and XP<br/>[SecretEngine.jsx]"]
  node_motion_hooks["Motion hooks<br/>[useLenis.js]"]
end

subgraph group_projects["Project showcase"]
  node_project_loader["Project data loader<br/>[github.js]"]
  node_project_store["Project context"]
  node_showcase["Project showcase<br/>[Showcase.jsx]"]
  node_work["Work listing<br/>[Work.jsx]"]
  node_project_detail["Project detail modal<br/>[Modal.jsx]"]
end

subgraph group_pages["Pages and content"]
  node_home_sections["Home sections<br/>[sections.jsx]"]
  node_hero_terminal["Hero and terminal<br/>[Hero.jsx]"]
  node_story_page["Story page<br/>[Story.jsx]"]
  node_story_book["Story book<br/>[AncientBook.jsx]"]
  node_resume["Resume view<br/>[ResumeModal.jsx]"]
end

subgraph group_data["Project data"]
  node_cache_data["Project JSON cache<br/>[projects.json]"]
  node_fetch_script["GitHub data generator<br/>[fetch_github.py]"]
  node_generated_data["Generated project data<br/>[projects.json]"]
end

node_visitor(("Visitor"))
node_github["GitHub API"]

node_visitor -->|"views portfolio"| node_app_shell
node_app_shell -->|"reads route"| node_hash_router
node_app_shell -->|"renders sections"| node_home_sections
node_app_shell -->|"renders home"| node_hero_terminal
node_app_shell -->|"renders story route"| node_story_page
node_story_page -->|"renders book"| node_story_book
node_app_shell -->|"renders resume route"| node_resume
node_app_shell -->|"loads projects"| node_project_loader
node_project_loader -->|"fetches repositories"| node_github
node_project_loader -->|"falls back to cache"| node_cache_data
node_app_shell -->|"provides project state"| node_project_store
node_app_shell -->|"renders showcase"| node_showcase
node_app_shell -->|"renders work"| node_work
node_showcase -->|"reads project list"| node_project_store
node_work -->|"reads project list"| node_project_store
node_app_shell -->|"renders active project"| node_project_detail
node_project_detail -->|"uses project helpers"| node_project_loader
node_app_shell -->|"renders background"| node_effects
node_app_shell -->|"uses secret state"| node_secret_engine
node_app_shell -->|"enables smooth scrolling"| node_motion_hooks
node_fetch_script -->|"generates JSON"| node_generated_data
node_generated_data -->|"copied for serving"| node_cache_data
node_fetch_script -->|"fetches repositories"| node_github

click node_app_shell "https://github.com/opbsuthar/mybyte/blob/main/web/src/App.jsx"
click node_hash_router "https://github.com/opbsuthar/mybyte/blob/main/web/src/router.jsx"
click node_home_sections "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/sections.jsx"
click node_hero_terminal "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Hero.jsx"
click node_story_page "https://github.com/opbsuthar/mybyte/blob/main/web/src/pages/Story.jsx"
click node_story_book "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/AncientBook.jsx"
click node_resume "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/ResumeModal.jsx"
click node_project_loader "https://github.com/opbsuthar/mybyte/blob/main/web/src/lib/github.js"
click node_project_store "https://github.com/opbsuthar/mybyte/blob/main/web/src/ProjectsContext.jsx"
click node_showcase "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Showcase.jsx"
click node_work "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Work.jsx"
click node_project_detail "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Modal.jsx"
click node_effects "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Background.jsx"
click node_secret_engine "https://github.com/opbsuthar/mybyte/blob/main/web/src/components/SecretEngine.jsx"
click node_motion_hooks "https://github.com/opbsuthar/mybyte/blob/main/web/src/hooks/useLenis.js"
click node_cache_data "https://github.com/opbsuthar/mybyte/blob/main/web/public/data/projects.json"
click node_fetch_script "https://github.com/opbsuthar/mybyte/blob/main/tools/fetch_github.py"
click node_generated_data "https://github.com/opbsuthar/mybyte/blob/main/data/projects.json"

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_shell,node_hash_router,node_effects,node_secret_engine,node_motion_hooks toneBlue
class node_project_loader,node_project_store,node_showcase,node_work,node_project_detail toneAmber
class node_home_sections,node_hero_terminal,node_story_page,node_story_book,node_resume,node_github toneMint
class node_cache_data,node_fetch_script,node_generated_data toneRose
class node_visitor toneIndigo
```

## Components

### Portfolio app

- [App shell](https://github.com/opbsuthar/mybyte/blob/main/web/src/App.jsx): `web/src/App.jsx`
- [Hash router](https://github.com/opbsuthar/mybyte/blob/main/web/src/router.jsx): `web/src/router.jsx`
- [Visual effects](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Background.jsx): `web/src/components/Background.jsx`
- [Secrets and XP](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/SecretEngine.jsx): `web/src/components/SecretEngine.jsx`
- [Motion hooks](https://github.com/opbsuthar/mybyte/blob/main/web/src/hooks/useLenis.js): `web/src/hooks/useLenis.js`

### Project showcase

- [Project data loader](https://github.com/opbsuthar/mybyte/blob/main/web/src/lib/github.js): `web/src/lib/github.js`
- [Project context](https://github.com/opbsuthar/mybyte/blob/main/web/src/ProjectsContext.jsx): `web/src/ProjectsContext.jsx`
- [Project showcase](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Showcase.jsx): `web/src/components/Showcase.jsx`
- [Work listing](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Work.jsx): `web/src/components/Work.jsx`
- [Project detail modal](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Modal.jsx): `web/src/components/Modal.jsx`

### Pages and content

- [Home sections](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/sections.jsx): `web/src/components/sections.jsx`
- [Hero and terminal](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/Hero.jsx): `web/src/components/Hero.jsx`
- [Story page](https://github.com/opbsuthar/mybyte/blob/main/web/src/pages/Story.jsx): `web/src/pages/Story.jsx`
- [Story book](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/AncientBook.jsx): `web/src/components/AncientBook.jsx`
- [Resume view](https://github.com/opbsuthar/mybyte/blob/main/web/src/components/ResumeModal.jsx): `web/src/components/ResumeModal.jsx`

### Project data

- [Project JSON cache](https://github.com/opbsuthar/mybyte/blob/main/web/public/data/projects.json): `web/public/data/projects.json`
- [GitHub data generator](https://github.com/opbsuthar/mybyte/blob/main/tools/fetch_github.py): `tools/fetch_github.py`
- [Generated project data](https://github.com/opbsuthar/mybyte/blob/main/data/projects.json): `data/projects.json`

### Other components

- **Visitor**
- **GitHub API**

## Connections

- Visitor → App shell: views portfolio (evidence: `README.md`)
- App shell → Hash router: reads route (evidence: `web/src/App.jsx`)
- App shell → Home sections: renders sections (evidence: `web/src/App.jsx`)
- App shell → Hero and terminal: renders home (evidence: `web/src/App.jsx`)
- App shell → Story page: renders story route (evidence: `web/src/App.jsx`)
- Story page → Story book: renders book (evidence: `web/src/pages/Story.jsx`)
- App shell → Resume view: renders resume route (evidence: `web/src/App.jsx`)
- App shell → Project data loader: loads projects (evidence: `web/src/App.jsx`)
- Project data loader → GitHub API: fetches repositories (evidence: `web/src/lib/github.js`)
- Project data loader → Project JSON cache: falls back to cache (evidence: `web/src/lib/github.js`)
- App shell → Project context: provides project state (evidence: `web/src/App.jsx`)
- App shell → Project showcase: renders showcase (evidence: `web/src/App.jsx`)
- App shell → Work listing: renders work (evidence: `web/src/App.jsx`)
- Project showcase → Project context: reads project list (evidence: `web/src/components/Showcase.jsx`)
- Work listing → Project context: reads project list (evidence: `web/src/components/Work.jsx`)
- App shell → Project detail modal: renders active project (evidence: `web/src/App.jsx`)
- Project detail modal → Project data loader: uses project helpers (evidence: `web/src/components/Modal.jsx`)
- App shell → Visual effects: renders background (evidence: `web/src/App.jsx`)
- App shell → Secrets and XP: uses secret state (evidence: `web/src/App.jsx`)
- App shell → Motion hooks: enables smooth scrolling (evidence: `web/src/App.jsx`)
- GitHub data generator → Generated project data: generates JSON (evidence: `README.md`)
- Generated project data → Project JSON cache: copied for serving (evidence: `README.md`)
- GitHub data generator → GitHub API: fetches repositories (evidence: `README.md`)
