# kushagra751/portfolio architecture

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

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

## Overview

This is a playable 3D portfolio: visitors start the scene, move a robot through five zones, interact to open portfolio panels, and can collect stars or fast-travel. The graph separates world rendering, gameplay state and controls, presentation, and portfolio content. The README documents contact-form modes, resume downloads, and the WebGL fallback; some internal wiring is supported only by the source index, so unsampled details are not expanded.

Main entry points: [`src/App.jsx`](https://github.com/kushagra751/portfolio/blob/main/src/App.jsx) (App Shell), [`src/store.js`](https://github.com/kushagra751/portfolio/blob/main/src/store.js) (Game UI State), [`src/world/Scene.jsx`](https://github.com/kushagra751/portfolio/blob/main/src/world/Scene.jsx) (Scene Renderer), [`src/world/layout.js`](https://github.com/kushagra751/portfolio/blob/main/src/world/layout.js) (World Layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_world["3D World"]
  node_scene["Scene Renderer<br/>[Scene.jsx]"]
  node_environment["Island Environment<br/>[Environment.jsx]"]
  node_structures["Zone Structures<br/>[Structures.jsx]"]
  node_layout["World Layout<br/>[layout.js]"]
  node_player["Player Movement<br/>[Player.jsx]"]
  node_collectibles["Star Pickups<br/>[Collectibles.jsx]"]
end

subgraph group_gameplay["Controls And State"]
  node_input["Input Handling<br/>[input.js]"]
  node_store["Game UI State<br/>[store.js]"]
  node_audio["Procedural Audio<br/>[audio.js]"]
end

subgraph group_presentation["Portfolio Interface"]
  node_app["App Shell<br/>[App.jsx]"]
  node_intro["Intro Screen<br/>[Intro.jsx]"]
  node_hud["HUD And Travel<br/>[HUD.jsx]"]
  node_touch["Touch Controls<br/>[Touch.jsx]"]
  node_panel["Panel Router<br/>[Panel.jsx]"]
  node_panelcontent["Zone Panels<br/>[panels.jsx]"]
  node_toast["Toast Notices<br/>[Toast.jsx]"]
  node_fallback["WebGL Fallback<br/>[Fallback.jsx]"]
end

subgraph group_content["Portfolio Content"]
  node_data["Portfolio Data<br/>[data.js]"]
  node_resume["Resume PDF"]
end

node_visitor(("Visitor"))
node_contactservice["Contact Destinations"]

node_visitor -->|"opens portfolio"| node_app
node_app -->|"renders"| node_scene
node_app -->|"renders"| node_intro
node_app -->|"renders"| node_hud
node_app -->|"renders"| node_touch
node_app -->|"renders"| node_panel
node_app -->|"renders"| node_toast
node_app -->|"selects without WebGL"| node_fallback
node_app -->|"sets up"| node_input
node_scene -->|"renders"| node_environment
node_scene -->|"renders"| node_structures
node_scene -->|"renders"| node_player
node_scene -->|"renders"| node_collectibles
node_scene -->|"reads zones"| node_layout
node_environment -->|"reads world data"| node_layout
node_structures -->|"reads zone data"| node_layout
node_player -->|"reads movement"| node_input
node_player -->|"updates gameplay"| node_store
node_player -->|"reads world state"| node_layout
node_player -->|"plays effects"| node_audio
node_collectibles -->|"records collection"| node_store
node_collectibles -->|"reads star spots"| node_layout
node_input -->|"dispatches actions"| node_store
node_store -->|"triggers sounds"| node_audio
node_intro -->|"starts game"| node_store
node_hud -->|"reads and updates"| node_store
node_hud -->|"reads travel zones"| node_layout
node_hud -->|"reads profile"| node_data
node_touch -->|"sets joystick input"| node_input
node_touch -->|"reads state"| node_store
node_panel -->|"selects zone content"| node_panelcontent
node_panel -->|"reads panel state"| node_store
node_panelcontent -->|"renders portfolio content"| node_data
node_panelcontent -.->|"submits form optionally"| node_contactservice
node_panelcontent -->|"opens email app by default"| node_contactservice
node_hud -.->|"offers download"| node_resume
node_panelcontent -.->|"offers download"| node_resume
node_toast -->|"reads notices"| node_store
node_fallback -->|"renders portfolio content"| node_data

click node_app "https://github.com/kushagra751/portfolio/blob/main/src/App.jsx"
click node_scene "https://github.com/kushagra751/portfolio/blob/main/src/world/Scene.jsx"
click node_environment "https://github.com/kushagra751/portfolio/blob/main/src/world/Environment.jsx"
click node_structures "https://github.com/kushagra751/portfolio/blob/main/src/world/Structures.jsx"
click node_layout "https://github.com/kushagra751/portfolio/blob/main/src/world/layout.js"
click node_player "https://github.com/kushagra751/portfolio/blob/main/src/world/Player.jsx"
click node_collectibles "https://github.com/kushagra751/portfolio/blob/main/src/world/Collectibles.jsx"
click node_input "https://github.com/kushagra751/portfolio/blob/main/src/input.js"
click node_store "https://github.com/kushagra751/portfolio/blob/main/src/store.js"
click node_audio "https://github.com/kushagra751/portfolio/blob/main/src/audio.js"
click node_intro "https://github.com/kushagra751/portfolio/blob/main/src/ui/Intro.jsx"
click node_hud "https://github.com/kushagra751/portfolio/blob/main/src/ui/HUD.jsx"
click node_touch "https://github.com/kushagra751/portfolio/blob/main/src/ui/Touch.jsx"
click node_panel "https://github.com/kushagra751/portfolio/blob/main/src/ui/Panel.jsx"
click node_panelcontent "https://github.com/kushagra751/portfolio/blob/main/src/ui/panels.jsx"
click node_toast "https://github.com/kushagra751/portfolio/blob/main/src/ui/Toast.jsx"
click node_fallback "https://github.com/kushagra751/portfolio/blob/main/src/ui/Fallback.jsx"
click node_data "https://github.com/kushagra751/portfolio/blob/main/src/data.js"
click node_resume "https://github.com/kushagra751/portfolio/blob/main/public/Kushagra_Patidar_Resume.pdf"

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_scene,node_environment,node_structures,node_layout,node_player,node_collectibles toneBlue
class node_input,node_store,node_audio toneAmber
class node_app,node_intro,node_hud,node_touch,node_panel,node_panelcontent,node_toast,node_fallback toneMint
class node_data,node_resume toneRose
class node_visitor,node_contactservice toneIndigo
```

## Components

### 3D World

- [Scene Renderer](https://github.com/kushagra751/portfolio/blob/main/src/world/Scene.jsx): `src/world/Scene.jsx`
- [Island Environment](https://github.com/kushagra751/portfolio/blob/main/src/world/Environment.jsx): `src/world/Environment.jsx`
- [Zone Structures](https://github.com/kushagra751/portfolio/blob/main/src/world/Structures.jsx): `src/world/Structures.jsx`
- [World Layout](https://github.com/kushagra751/portfolio/blob/main/src/world/layout.js): `src/world/layout.js`
- [Player Movement](https://github.com/kushagra751/portfolio/blob/main/src/world/Player.jsx): `src/world/Player.jsx`
- [Star Pickups](https://github.com/kushagra751/portfolio/blob/main/src/world/Collectibles.jsx): `src/world/Collectibles.jsx`

### Controls And State

- [Input Handling](https://github.com/kushagra751/portfolio/blob/main/src/input.js): `src/input.js`
- [Game UI State](https://github.com/kushagra751/portfolio/blob/main/src/store.js): `src/store.js`
- [Procedural Audio](https://github.com/kushagra751/portfolio/blob/main/src/audio.js): `src/audio.js`

### Portfolio Interface

- [App Shell](https://github.com/kushagra751/portfolio/blob/main/src/App.jsx): `src/App.jsx`
- [Intro Screen](https://github.com/kushagra751/portfolio/blob/main/src/ui/Intro.jsx): `src/ui/Intro.jsx`
- [HUD And Travel](https://github.com/kushagra751/portfolio/blob/main/src/ui/HUD.jsx): `src/ui/HUD.jsx`
- [Touch Controls](https://github.com/kushagra751/portfolio/blob/main/src/ui/Touch.jsx): `src/ui/Touch.jsx`
- [Panel Router](https://github.com/kushagra751/portfolio/blob/main/src/ui/Panel.jsx): `src/ui/Panel.jsx`
- [Zone Panels](https://github.com/kushagra751/portfolio/blob/main/src/ui/panels.jsx): `src/ui/panels.jsx`
- [Toast Notices](https://github.com/kushagra751/portfolio/blob/main/src/ui/Toast.jsx): `src/ui/Toast.jsx`
- [WebGL Fallback](https://github.com/kushagra751/portfolio/blob/main/src/ui/Fallback.jsx): `src/ui/Fallback.jsx`

### Portfolio Content

- [Portfolio Data](https://github.com/kushagra751/portfolio/blob/main/src/data.js): `src/data.js`
- [Resume PDF](https://github.com/kushagra751/portfolio/blob/main/public/Kushagra_Patidar_Resume.pdf): `public/Kushagra_Patidar_Resume.pdf`

### Other components

- **Visitor**
- **Contact Destinations**

## Connections

- Visitor → App Shell: opens portfolio (evidence: `README.md`)
- App Shell → Scene Renderer: renders (evidence: `src/App.jsx`)
- App Shell → Intro Screen: renders (evidence: `src/App.jsx`)
- App Shell → HUD And Travel: renders (evidence: `src/App.jsx`)
- App Shell → Touch Controls: renders (evidence: `src/App.jsx`)
- App Shell → Panel Router: renders (evidence: `src/App.jsx`)
- App Shell → Toast Notices: renders (evidence: `src/App.jsx`)
- App Shell → WebGL Fallback: selects without WebGL (evidence: `src/App.jsx`)
- App Shell → Input Handling: sets up (evidence: `src/App.jsx`)
- Scene Renderer → Island Environment: renders (evidence: `src/world/Scene.jsx`)
- Scene Renderer → Zone Structures: renders (evidence: `src/world/Scene.jsx`)
- Scene Renderer → Player Movement: renders (evidence: `src/world/Scene.jsx`)
- Scene Renderer → Star Pickups: renders (evidence: `src/world/Scene.jsx`)
- Scene Renderer → World Layout: reads zones (evidence: `src/world/Scene.jsx`)
- Island Environment → World Layout: reads world data (evidence: `src/world/Environment.jsx`)
- Zone Structures → World Layout: reads zone data (evidence: `src/world/Structures.jsx`)
- Player Movement → Input Handling: reads movement (evidence: `src/world/Player.jsx`)
- Player Movement → Game UI State: updates gameplay (evidence: `src/world/Player.jsx`)
- Player Movement → World Layout: reads world state (evidence: `src/world/Player.jsx`)
- Player Movement → Procedural Audio: plays effects (evidence: `src/world/Player.jsx`)
- Star Pickups → Game UI State: records collection (evidence: `src/world/Collectibles.jsx`)
- Star Pickups → World Layout: reads star spots (evidence: `src/world/Collectibles.jsx`)
- Input Handling → Game UI State: dispatches actions (evidence: `src/input.js`)
- Game UI State → Procedural Audio: triggers sounds (evidence: `src/store.js`)
- Intro Screen → Game UI State: starts game (evidence: `src/ui/Intro.jsx`)
- HUD And Travel → Game UI State: reads and updates (evidence: `src/ui/HUD.jsx`)
- HUD And Travel → World Layout: reads travel zones (evidence: `src/ui/HUD.jsx`)
- HUD And Travel → Portfolio Data: reads profile (evidence: `src/ui/HUD.jsx`)
- Touch Controls → Input Handling: sets joystick input (evidence: `src/ui/Touch.jsx`)
- Touch Controls → Game UI State: reads state (evidence: `src/ui/Touch.jsx`)
- Panel Router → Zone Panels: selects zone content (evidence: `src/ui/Panel.jsx`)
- Panel Router → Game UI State: reads panel state (evidence: `src/ui/Panel.jsx`)
- Zone Panels → Portfolio Data: renders portfolio content (evidence: `src/ui/panels.jsx`)
- Zone Panels → Contact Destinations: submits form optionally (evidence: `README.md`)
- Zone Panels → Contact Destinations: opens email app by default (evidence: `README.md`)
- HUD And Travel → Resume PDF: offers download (evidence: `README.md`)
- Zone Panels → Resume PDF: offers download (evidence: `README.md`)
- Toast Notices → Game UI State: reads notices (evidence: `src/ui/Toast.jsx`)
- WebGL Fallback → Portfolio Data: renders portfolio content (evidence: `src/ui/Fallback.jsx`)
