# shorteditor/nge_portfolio architecture

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

- Interactive diagram: https://gitdiagram.com/shorteditor/nge_portfolio
- Repository: https://github.com/shorteditor/nge_portfolio

## Overview

NGE is a cinematic portfolio: visitors scroll through a layered hero, then explore work, skills, creative credits, the NGE Layer Method and contact links. The hero shares one scroll-driven timeline across WebGL and DOM rendering; the lower portfolio adds project filtering and disclosures, while music rows provide playback. The repository also contains an assistant client and API, although the README describes the assistant as reserved and the section as empty. The graph includes those files but treats the assistant as optional; unsampled page wiring is not inferred.

Main entry points: [`src/main.js`](https://github.com/shorteditor/nge_portfolio/blob/main/src/main.js) (Hero interaction), [`api/ask.js`](https://github.com/shorteditor/nge_portfolio/blob/main/api/ask.js) (Assistant endpoint), [`src/music-player.js`](https://github.com/shorteditor/nge_portfolio/blob/main/src/music-player.js) (Music playback), [`index.html`](https://github.com/shorteditor/nge_portfolio/blob/main/index.html) (Portfolio sections)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hero["Cinematic hero"]
  node_hero["Hero interaction<br/>[main.js]"]
  node_timeline["Scene timeline<br/>[timeline.js]"]
  node_renderer["WebGL renderer<br/>[renderer.js]"]
  node_scene_art["Scene artwork"]
end

subgraph group_portfolio["Portfolio content"]
  node_page_content["Portfolio sections<br/>[index.html]"]
  node_sections["Section interactions<br/>[sections.js]"]
  node_project_data["Project records<br/>[projects.json]"]
  node_project_markup["Project markup<br/>[content.mjs]"]
  node_skills_credits["Skills and credits<br/>[index.html]"]
  node_contact["Contact links<br/>[index.html]"]
end

subgraph group_creative["Creative features"]
  node_headline["Headline effects"]
  node_music["Music playback<br/>[music-player.js]"]
  node_music_files["Track audio"]
  node_layer_method["Layer Method<br/>[index.html]"]
end

subgraph group_assistant["Assistant code"]
  node_assistant_ui["Assistant client<br/>[ask-ai.js]"]
  node_assistant_api["Assistant endpoint<br/>[ask.js]"]
  node_knowledge["Curated knowledge<br/>[_kb.js]"]
end

node_visitor(("Visitor"))
node_groq["Groq API"]

node_visitor -->|"scrolls"| node_hero
node_hero -->|"samples"| node_timeline
node_hero -->|"renders"| node_renderer
node_hero -->|"loads layers"| node_scene_art
node_visitor -->|"explores"| node_page_content
node_sections -.->|"filters projects"| node_project_data
node_project_markup -->|"renders records"| node_project_data
node_visitor -->|"browses"| node_skills_credits
node_visitor -->|"follows links"| node_contact
node_headline -.->|"decorates headlines"| node_page_content
node_visitor -.->|"selects tracks"| node_music
node_music -->|"plays audio"| node_music_files
node_visitor -->|"explores"| node_layer_method
node_assistant_ui -->|"posts questions"| node_assistant_api
node_assistant_api -->|"retrieves context"| node_knowledge
node_assistant_api -->|"requests completion"| node_groq

click node_hero "https://github.com/shorteditor/nge_portfolio/blob/main/src/main.js"
click node_timeline "https://github.com/shorteditor/nge_portfolio/blob/main/src/timeline.js"
click node_renderer "https://github.com/shorteditor/nge_portfolio/blob/main/src/renderer.js"
click node_scene_art "https://github.com/shorteditor/nge_portfolio/tree/main/public/assets"
click node_page_content "https://github.com/shorteditor/nge_portfolio/blob/main/index.html"
click node_sections "https://github.com/shorteditor/nge_portfolio/blob/main/src/sections.js"
click node_project_data "https://github.com/shorteditor/nge_portfolio/blob/main/src/data/projects.json"
click node_project_markup "https://github.com/shorteditor/nge_portfolio/blob/main/scripts/content.mjs"
click node_skills_credits "https://github.com/shorteditor/nge_portfolio/blob/main/index.html"
click node_contact "https://github.com/shorteditor/nge_portfolio/blob/main/index.html"
click node_headline "https://github.com/shorteditor/nge_portfolio/blob/main/src/headline-letters.js"
click node_music "https://github.com/shorteditor/nge_portfolio/blob/main/src/music-player.js"
click node_music_files "https://github.com/shorteditor/nge_portfolio/tree/main/public/music"
click node_layer_method "https://github.com/shorteditor/nge_portfolio/blob/main/index.html"
click node_assistant_ui "https://github.com/shorteditor/nge_portfolio/blob/main/src/ask-ai.js"
click node_assistant_api "https://github.com/shorteditor/nge_portfolio/blob/main/api/ask.js"
click node_knowledge "https://github.com/shorteditor/nge_portfolio/blob/main/api/_kb.js"

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_hero,node_timeline,node_renderer,node_scene_art toneBlue
class node_page_content,node_sections,node_project_data,node_project_markup,node_skills_credits,node_contact toneAmber
class node_headline,node_music,node_music_files,node_layer_method,node_groq toneMint
class node_assistant_ui,node_assistant_api,node_knowledge toneRose
class node_visitor toneIndigo
```

## Components

### Cinematic hero

- [Hero interaction](https://github.com/shorteditor/nge_portfolio/blob/main/src/main.js): `src/main.js`
- [Scene timeline](https://github.com/shorteditor/nge_portfolio/blob/main/src/timeline.js): `src/timeline.js`
- [WebGL renderer](https://github.com/shorteditor/nge_portfolio/blob/main/src/renderer.js): `src/renderer.js`
- [Scene artwork](https://github.com/shorteditor/nge_portfolio/tree/main/public/assets): `public/assets`

### Portfolio content

- [Portfolio sections](https://github.com/shorteditor/nge_portfolio/blob/main/index.html): `index.html`
- [Section interactions](https://github.com/shorteditor/nge_portfolio/blob/main/src/sections.js): `src/sections.js`
- [Project records](https://github.com/shorteditor/nge_portfolio/blob/main/src/data/projects.json): `src/data/projects.json`
- [Project markup](https://github.com/shorteditor/nge_portfolio/blob/main/scripts/content.mjs): `scripts/content.mjs`
- [Skills and credits](https://github.com/shorteditor/nge_portfolio/blob/main/index.html): `index.html`
- [Contact links](https://github.com/shorteditor/nge_portfolio/blob/main/index.html): `index.html`

### Creative features

- [Headline effects](https://github.com/shorteditor/nge_portfolio/blob/main/src/headline-letters.js): `src/headline-letters.js`
- [Music playback](https://github.com/shorteditor/nge_portfolio/blob/main/src/music-player.js): `src/music-player.js`
- [Track audio](https://github.com/shorteditor/nge_portfolio/tree/main/public/music): `public/music`
- [Layer Method](https://github.com/shorteditor/nge_portfolio/blob/main/index.html): `index.html`

### Assistant code

- [Assistant client](https://github.com/shorteditor/nge_portfolio/blob/main/src/ask-ai.js): `src/ask-ai.js`
- [Assistant endpoint](https://github.com/shorteditor/nge_portfolio/blob/main/api/ask.js): `api/ask.js`
- [Curated knowledge](https://github.com/shorteditor/nge_portfolio/blob/main/api/_kb.js): `api/_kb.js`

### Other components

- **Visitor**
- **Groq API**

## Connections

- Visitor → Hero interaction: scrolls (evidence: `README.md`)
- Hero interaction → Scene timeline: samples (evidence: `src/main.js`)
- Hero interaction → WebGL renderer: renders (evidence: `src/main.js`)
- Hero interaction → Scene artwork: loads layers (evidence: `README.md`)
- Visitor → Portfolio sections: explores (evidence: `README.md`)
- Section interactions → Project records: filters projects
- Project markup → Project records: renders records (evidence: `scripts/content.mjs`)
- Visitor → Skills and credits: browses (evidence: `README.md`)
- Visitor → Contact links: follows links (evidence: `README.md`)
- Headline effects → Portfolio sections: decorates headlines
- Visitor → Music playback: selects tracks
- Music playback → Track audio: plays audio (evidence: `src/music-player.js`)
- Visitor → Layer Method: explores (evidence: `README.md`)
- Assistant client → Assistant endpoint: posts questions (evidence: `src/ask-ai.js`)
- Assistant endpoint → Curated knowledge: retrieves context (evidence: `api/ask.js`)
- Assistant endpoint → Groq API: requests completion (evidence: `api/ask.js`)
