# lunar-gala/2025-elysium architecture

> Architecture diagram of the GitHub repository lunar-gala/2025-elysium, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-07-09). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/lunar-gala/2025-elysium
- Repository: https://github.com/lunar-gala/2025-elysium

## Overview

1. **Overall shape**
   - This is a **Next.js App Router** application with a mostly frontend, experience-driven architecture.
   - The source of truth for the app is under `src/app`, with route segments for `about`, `archive`, `lines`, `merch`, `tickets`, and `talent`, plus the root landing page.

2. **Route and page boundary**
   - Each top-level route is implemented as a page module in `src/app/*/page.tsx`.
   - `src/app/layout.tsx` and `src/app/globals.css` provide the shared shell and global styling.
   - The app is structured so route files compose shared components rather than owning all logic themselves.

3. **Main user-facing subsystems**
   - The site appears to be a **visual, interactive brand/portfolio experience** rather than a conventional data app.
   - Shared UI includes `src/components/navigation` for the navbar/logo, `src/components/home` for landing-page content, and `src/components/MainContent.tsx` plus `src/components/ThreeCanvas.jsx` for the high-impact visual layer.

4. **GPU / animation-heavy rendering layer**
   - A large part of the repo is dedicated to **canvas, Three.js, and shader-driven visuals**.
   - This is organized into multiple act-specific component sets: `ActOneParticles`, `ActTwoParticles`, `ActThreeParticles`, `ActFourParticles`, plus corresponding `src/components/glslAct*` directories.
   - The act folders suggest separate visual scenes or chapters that are swapped in different parts of the experience.

5. **Shader pipeline**
   - The rendering stack uses custom GLSL in `shader/*.glsl` files, including fragment, vertex, particle, and simulation shaders.
   - Similar shader sets are duplicated under the `glslActOne/Two/Three/Three-two/Four` directories, indicating multiple self-contained visual systems rather than one shared shader graph.
   - `src/templates/Shader` and `src/templates/hooks/usePostprocess.jsx` provide reusable shader/postprocessing abstractions.

6. **3D asset loading and browser runtime support**
   - The repo includes a substantial WebGL support layer: `gltfloader.js`, `draco.js`, DRACO WASM binaries, `getPixels.js`, `promisify.js`, and touch-detection helpers.
   - This indicates the app loads optimized 3D or mesh assets in the browser and relies on DRACO-compressed geometry decoding.
   - These libs are duplicated across several act folders, suggesting each visual module is intended to be independently runnable.

7. **Talent section as structured content**
   - `src/app/talent` is a more data-driven section than the visual routes.
   - It uses `teams/*.json` files for content, plus `components/grid.jsx`, `components/sidebar.jsx`, and `utils/intersecting.js` for presentation and scroll/visibility behavior.
   - This is the clearest example of a content model flowing from JSON data into UI components.

8. **Shared utilities and lower-level helpers**
   - `src/helpers` contains reusable building blocks like `helpers/components/Three.jsx` and `helpers/global.js`.
   - `src/components/lib` and the matching `lib` folders inside act modules contain common browser/runtime helpers for async handling, asset loading, and detection logic.
   - These helpers form the boundary between the React/Next layer and the lower-level graphics/runtime code.

9. **Assets and presentation**
   - `public/` holds static runtime assets such as `preloader.mp4` and `headshots/`.
   - Custom fonts are stored in `src/app/fonts`, which reinforces that typography is part of the authored design system rather than relying on defaults.
   - Styling is split between global CSS and per-route/component styles.

10. **Legacy or embedded browser code**
   - There are also JS entrypoints under `src/app/js` and `src/app/app.js`, which suggests some older or lower-level browser logic coexists with the React app.
   - This likely supports visual runtime behavior that is not purely React-driven.

11. **Prototype and example space**
   - The `examples/` tree is a separate sandbox area containing p5.js sketches, shader experiments, music-backed demos, and a Three.js/Vite example.
   - These examples are not part of the main Next.js route graph, but they show the project’s visual-development lineage and likely inform the production components.

12. **Operational boundary**
   - The project is fundamentally a **client-heavy Next.js frontend** with static asset delivery and browser-executed graphics code.
   - The important architectural split is between:
     - route/page composition in Next.js, and
     - client-side rendering engines for canvas/WebGL/Three.js scenes.

Main entry points: [`src/components`](https://github.com/lunar-gala/2025-elysium/tree/main/src/components) (Act scenes), [`src/app`](https://github.com/lunar-gala/2025-elysium/tree/main/src/app) (Section pages), [`src/app/page.tsx`](https://github.com/lunar-gala/2025-elysium/blob/main/src/app/page.tsx) (Landing), [`src/app/talent`](https://github.com/lunar-gala/2025-elysium/tree/main/src/app/talent) (Talent section)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_group_app["Next app"]
  node_node_root["Landing<br/>route page<br/>[page.tsx]"]
  node_node_layout["App shell<br/>layout shell<br/>[layout.tsx]"]
  node_node_routes["Section pages<br/>route set"]
end

subgraph group_group_visual["Visual engine"]
  node_node_nav["Navigation<br/>shared nav"]
  node_node_home["Home UI<br/>landing components"]
  node_node_maincontent["Main content<br/>experience container<br/>[MainContent.tsx]"]
  node_node_canvas["Three canvas<br/>webgl canvas<br/>[ThreeCanvas.jsx]"]
  node_node_acts["Act scenes<br/>scene set"]
  node_node_shader_shared["Shared shaders<br/>glsl bundle"]
end

subgraph group_group_content["Content sections"]
  node_node_talent["Talent section<br/>content route"]
end

subgraph group_group_support["Support layers"]
  node_node_globals["Global styles<br/>css<br/>[globals.css]"]
  node_node_appjs["Legacy app js<br/>browser runtime"]
  node_node_helpers["Helpers"]
  node_node_templates["Templates<br/>abstractions"]
  node_node_public[("Static assets<br/>asset bucket")]
  node_node_examples["Examples<br/>sandbox tree"]
end

node_node_layout -->|"wraps"| node_node_root
node_node_layout -->|"serves"| node_node_routes
node_node_routes -->|"composes"| node_node_nav
node_node_root -->|"renders"| node_node_home
node_node_root -->|"embeds"| node_node_maincontent
node_node_maincontent -->|"drives"| node_node_canvas
node_node_canvas -->|"switches scenes"| node_node_acts
node_node_acts -->|"uses"| node_node_shader_shared
node_node_acts -->|"loads assets"| node_node_helpers
node_node_shader_shared -->|"extends"| node_node_templates
node_node_talent -->|"uses"| node_node_helpers
node_node_talent -->|"uses assets"| node_node_public
node_node_routes -->|"includes"| node_node_talent
node_node_appjs -.->|"supports"| node_node_acts
node_node_examples -.->|"informs"| node_node_acts
node_node_globals -->|"styles"| node_node_routes

click node_node_root "https://github.com/lunar-gala/2025-elysium/blob/main/src/app/page.tsx"
click node_node_layout "https://github.com/lunar-gala/2025-elysium/blob/main/src/app/layout.tsx"
click node_node_routes "https://github.com/lunar-gala/2025-elysium/tree/main/src/app"
click node_node_nav "https://github.com/lunar-gala/2025-elysium/tree/main/src/components/navigation"
click node_node_home "https://github.com/lunar-gala/2025-elysium/tree/main/src/components/home"
click node_node_maincontent "https://github.com/lunar-gala/2025-elysium/blob/main/src/components/MainContent.tsx"
click node_node_canvas "https://github.com/lunar-gala/2025-elysium/blob/main/src/components/ThreeCanvas.jsx"
click node_node_acts "https://github.com/lunar-gala/2025-elysium/tree/main/src/components"
click node_node_shader_shared "https://github.com/lunar-gala/2025-elysium/tree/main/src/components/shader"
click node_node_talent "https://github.com/lunar-gala/2025-elysium/tree/main/src/app/talent"
click node_node_globals "https://github.com/lunar-gala/2025-elysium/blob/main/src/app/globals.css"
click node_node_appjs "https://github.com/lunar-gala/2025-elysium/tree/main/src/app/js"
click node_node_helpers "https://github.com/lunar-gala/2025-elysium/tree/main/src/helpers"
click node_node_templates "https://github.com/lunar-gala/2025-elysium/tree/main/src/templates"
click node_node_public "https://github.com/lunar-gala/2025-elysium/tree/main/public"
click node_node_examples "https://github.com/lunar-gala/2025-elysium/tree/main/examples"

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_node_root,node_node_layout,node_node_routes toneBlue
class node_node_nav,node_node_home,node_node_maincontent,node_node_canvas,node_node_acts,node_node_shader_shared toneAmber
class node_node_talent toneMint
class node_node_globals,node_node_appjs,node_node_helpers,node_node_templates,node_node_public,node_node_examples toneRose
```

## Components

### Next app

App Router routes, shell, and page composition.

- [Landing](https://github.com/lunar-gala/2025-elysium/blob/main/src/app/page.tsx): route page · Root Next.js landing page that composes the main experience. · `src/app/page.tsx`
- [App shell](https://github.com/lunar-gala/2025-elysium/blob/main/src/app/layout.tsx): layout shell · Shared Next.js layout and global styles for the application. · `src/app/layout.tsx`
- [Section pages](https://github.com/lunar-gala/2025-elysium/tree/main/src/app): route set · Top-level route pages for about, archive, lines, merch, tickets, and talent. · `src/app`

### Visual engine

Canvas, Three.js, shader, and act-based rendering modules.

- [Navigation](https://github.com/lunar-gala/2025-elysium/tree/main/src/components/navigation): shared nav · Logo and navbar used across the site. · `src/components/navigation`
- [Home UI](https://github.com/lunar-gala/2025-elysium/tree/main/src/components/home): landing components · Landing-page content and supporting home components. · `src/components/home`
- [Main content](https://github.com/lunar-gala/2025-elysium/blob/main/src/components/MainContent.tsx): experience container · Primary client-side composition for the high-impact visual experience. · `src/components/MainContent.tsx`
- [Three canvas](https://github.com/lunar-gala/2025-elysium/blob/main/src/components/ThreeCanvas.jsx): webgl canvas · Canvas and scene/view wrappers for the interactive 3D layer. · `src/components/ThreeCanvas.jsx`
- [Act scenes](https://github.com/lunar-gala/2025-elysium/tree/main/src/components): scene set · Act-specific particle and sketch systems for separate visual chapters. · `src/components`
- [Shared shaders](https://github.com/lunar-gala/2025-elysium/tree/main/src/components/shader): glsl bundle · Reusable shader sources for the shared graphics stack. · `src/components/shader`

### Content sections

Data-driven or section-specific UI and content models.

- [Talent section](https://github.com/lunar-gala/2025-elysium/tree/main/src/app/talent): content route · Data-driven talent page with team JSON, grid, sidebar, and visibility logic. · `src/app/talent`

### Support layers

Shared helpers, runtime glue, static assets, and examples.

- [Global styles](https://github.com/lunar-gala/2025-elysium/blob/main/src/app/globals.css): css · Application-wide styling baseline. · `src/app/globals.css`
- [Legacy app js](https://github.com/lunar-gala/2025-elysium/tree/main/src/app/js): browser runtime · Older browser-side entrypoint and supporting JS runtime code. · `src/app/js`
- [Helpers](https://github.com/lunar-gala/2025-elysium/tree/main/src/helpers): runtime helpers · Shared lower-level helpers bridging React with graphics/runtime code. · `src/helpers`
- [Templates](https://github.com/lunar-gala/2025-elysium/tree/main/src/templates): abstractions · Reusable shader and scroll/postprocess templates. · `src/templates`
- [Static assets](https://github.com/lunar-gala/2025-elysium/tree/main/public): asset bucket · Runtime assets such as the preloader video and headshots. · `public`
- [Examples](https://github.com/lunar-gala/2025-elysium/tree/main/examples): sandbox tree · Separate experimental sketches and demos that inform the main visual style. · `examples`

## Connections

- App shell → Landing: wraps · The shared layout frames the landing page.
- App shell → Section pages: serves · Layout applies across all route segments.
- Section pages → Navigation: composes · Route pages reuse shared navigation.
- Landing → Home UI: renders · The landing page pulls in home-specific UI.
- Landing → Main content: embeds · Landing experience centers on the main interactive content.
- Main content → Three canvas: drives · Main content coordinates the canvas-based 3D layer.
- Three canvas → Act scenes: switches scenes · Canvas experience is backed by act-specific visual systems.
- Act scenes → Shared shaders: uses · Act scenes consume shader programs and particle simulation code.
- Act scenes → Helpers: loads assets · Act scenes rely on shared runtime helpers for GLTF/DRACO and browser utilities.
- Shared shaders → Templates: extends · Shared shader code is complemented by reusable shader templates.
- Talent section → Helpers: uses · Talent UI uses intersection and presentation helpers.
- Talent section → Static assets: uses assets · Section content is supported by static media assets.
- Section pages → Talent section: includes · Talent is one of the main route sections.
- Legacy app js → Act scenes: supports · Legacy browser code appears to back the graphics runtime.
- Examples → Act scenes: informs · Example sketches mirror the visual and shader-driven approach used in production.
- Global styles → Section pages: styles · Global CSS underpins the route pages and shared shell.
