# deity6/softlab architecture

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

- Interactive diagram: https://gitdiagram.com/deity6/softlab
- Repository: https://github.com/deity6/softlab

## Overview

SOFT LAB is a static, interactive showcase for visual effects and front-end experiments. Visitors enter through the home catalogue, open an experiment or button demo, and interact with live-rendered effects; the Super Mona game also offers score submission and a leaderboard when its separately hosted backend is available. The graph preserves the documented experiment, button, site-content, and theme capabilities. Some component wiring is supported only by the SOURCE INDEX or README; unverified optional wiring is dashed.

Main entry points: [`src/App.tsx`](https://github.com/deity6/softlab/blob/main/src/App.tsx) (Route App), [`src/experiments/registry.ts`](https://github.com/deity6/softlab/blob/main/src/experiments/registry.ts) (Experiment Catalogue), [`src/home`](https://github.com/deity6/softlab/tree/main/src/home) (Home Panels), [`src/shell`](https://github.com/deity6/softlab/tree/main/src/shell) (Header and Footer)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_site["Site Shell"]
  node_app["Route App<br/>[App.tsx]"]
  node_router["Hash Router<br/>[useHashRoute.ts]"]
  node_home["Home Panels"]
  node_shell["Header and Footer"]
  node_sitecontent["Sections and History<br/>[sections.ts]"]
  node_language["Language Dictionary<br/>[i18n.ts]"]
  node_theme["Theme Tokens<br/>[theme.ts]"]
end

subgraph group_catalog["Catalogue and Buttons"]
  node_experiments["Experiment Catalogue<br/>[registry.ts]"]
  node_wip["Work-in-Progress Notice<br/>[WorkInProgress.tsx]"]
  node_buttonpage["Button Page<br/>[ButtonPage.tsx]"]
  node_buttoncatalog["Button Registry<br/>[registry.ts]"]
  node_buttondemo["Button Effects<br/>[MotionButton.tsx]"]
  node_motion["Motion Tokens and Effects<br/>[motion.buttons.js]"]
end

subgraph group_labs["Interactive Experiments"]
  node_softmatter["Soft Matter Lab<br/>[SoftMatter.tsx]"]
  node_softengine["Soft-body Renderer<br/>[engine.ts]"]
  node_canvaslab["Canvas Lab<br/>[CanvasLab.tsx]"]
  node_canvaseffects["Text Effects"]
  node_cloudtrain["Cloud Train Lab<br/>[CloudTrain.tsx]"]
  node_cloudengine["Cloud Renderer<br/>[engine.ts]"]
  node_palettes["Cloud Palettes<br/>[palettes.ts]"]
  node_catlab["Soft Cat WIP<br/>[CatLab.tsx]"]
end

subgraph group_mona["Super Mona Game"]
  node_superlab["Super Mona Lab<br/>[SuperMonaLab.tsx]"]
  node_monaui["Game Interface<br/>[SuperMona.jsx]"]
  node_engine["Game Engine<br/>[Engine.js]"]
  node_game["Game Simulation<br/>[Game.js]"]
  node_rules["Game Rules<br/>[rules.js]"]
  node_sfx["Game Sound<br/>[Sfx.js]"]
  node_pixelword["Pixel Typography<br/>[PixelWord.jsx]"]
  node_scoreboard["Scoreboard<br/>[ScoreBoard.jsx]"]
end

node_visitor(("Visitor"))
node_leaderboard["Scores API"]
node_destroygame(("Destroy Game"))

node_visitor -->|"opens site"| node_app
node_app -->|"reads route"| node_router
node_app -->|"looks up experiment"| node_experiments
node_app -->|"looks up button"| node_buttoncatalog
node_app -->|"renders home"| node_home
node_app -->|"renders button page"| node_buttonpage
node_app -->|"shows WIP"| node_wip
node_app -->|"renders shell"| node_shell
node_home -->|"reads catalogue"| node_experiments
node_home -->|"reads buttons"| node_buttoncatalog
node_home -->|"reads sections"| node_sitecontent
node_home -->|"renders hero"| node_shell
node_buttonpage -->|"renders entries"| node_buttoncatalog
node_buttonpage -->|"renders effects"| node_buttondemo
node_buttondemo -->|"uses motion effects"| node_motion
node_buttoncatalog -->|"uses duration tokens"| node_motion
node_experiments -->|"registers experiment"| node_softmatter
node_experiments -->|"registers experiment"| node_canvaslab
node_experiments -->|"registers experiment"| node_cloudtrain
node_experiments -->|"registers experiment"| node_superlab
node_experiments -->|"registers WIP"| node_catlab
node_softmatter -->|"drives simulation"| node_softengine
node_softengine -->|"reads theme"| node_theme
node_canvaslab -->|"runs selected effect"| node_canvaseffects
node_cloudtrain -->|"drives renderer"| node_cloudengine
node_cloudtrain -->|"selects palette"| node_palettes
node_superlab -->|"mounts game UI"| node_monaui
node_monaui -->|"creates engine"| node_engine
node_monaui -->|"renders scores"| node_scoreboard
node_monaui -->|"renders text"| node_pixelword
node_engine -->|"starts game"| node_game
node_game -->|"uses rules"| node_rules
node_game -->|"triggers sound"| node_sfx
node_scoreboard -.->|"submits and reads scores"| node_leaderboard
node_home -->|"links to game"| node_destroygame
node_shell -.->|"uses translations"| node_language
node_shell -->|"uses theme"| node_theme
node_shell -->|"reads history"| node_sitecontent

click node_app "https://github.com/deity6/softlab/blob/main/src/App.tsx"
click node_router "https://github.com/deity6/softlab/blob/main/src/lib/useHashRoute.ts"
click node_home "https://github.com/deity6/softlab/tree/main/src/home"
click node_shell "https://github.com/deity6/softlab/tree/main/src/shell"
click node_sitecontent "https://github.com/deity6/softlab/blob/main/src/lib/sections.ts"
click node_language "https://github.com/deity6/softlab/blob/main/src/lib/i18n.ts"
click node_theme "https://github.com/deity6/softlab/blob/main/src/lib/theme.ts"
click node_experiments "https://github.com/deity6/softlab/blob/main/src/experiments/registry.ts"
click node_wip "https://github.com/deity6/softlab/blob/main/src/experiments/WorkInProgress.tsx"
click node_buttonpage "https://github.com/deity6/softlab/blob/main/src/home/ButtonPage.tsx"
click node_buttoncatalog "https://github.com/deity6/softlab/blob/main/src/buttons/registry.ts"
click node_buttondemo "https://github.com/deity6/softlab/blob/main/src/buttons/MotionButton.tsx"
click node_motion "https://github.com/deity6/softlab/blob/main/src/motion/motion.buttons.js"
click node_softmatter "https://github.com/deity6/softlab/blob/main/src/experiments/soft-matter/SoftMatter.tsx"
click node_softengine "https://github.com/deity6/softlab/blob/main/src/experiments/soft-matter/engine.ts"
click node_canvaslab "https://github.com/deity6/softlab/blob/main/src/experiments/canvas-lab/CanvasLab.tsx"
click node_canvaseffects "https://github.com/deity6/softlab/tree/main/src/experiments/canvas-lab/effects"
click node_cloudtrain "https://github.com/deity6/softlab/blob/main/src/experiments/cloud-train/CloudTrain.tsx"
click node_cloudengine "https://github.com/deity6/softlab/blob/main/src/experiments/cloud-train/engine.ts"
click node_palettes "https://github.com/deity6/softlab/blob/main/src/experiments/cloud-train/palettes.ts"
click node_catlab "https://github.com/deity6/softlab/blob/main/src/experiments/soft-cat/CatLab.tsx"
click node_superlab "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/SuperMonaLab.tsx"
click node_monaui "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/SuperMona.jsx"
click node_engine "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/Engine.js"
click node_game "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/Game.js"
click node_rules "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/rules.js"
click node_sfx "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/Sfx.js"
click node_pixelword "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/PixelWord.jsx"
click node_scoreboard "https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/ScoreBoard.jsx"

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,node_router,node_home,node_shell,node_sitecontent,node_language,node_theme toneBlue
class node_experiments,node_wip,node_buttonpage,node_buttoncatalog,node_buttondemo,node_motion toneAmber
class node_softmatter,node_softengine,node_canvaslab,node_canvaseffects,node_cloudtrain,node_cloudengine,node_palettes,node_catlab,node_leaderboard toneMint
class node_superlab,node_monaui,node_engine,node_game,node_rules,node_sfx,node_pixelword,node_scoreboard toneRose
class node_visitor,node_destroygame toneIndigo
```

## Components

### Site Shell

- [Route App](https://github.com/deity6/softlab/blob/main/src/App.tsx): `src/App.tsx`
- [Hash Router](https://github.com/deity6/softlab/blob/main/src/lib/useHashRoute.ts): `src/lib/useHashRoute.ts`
- [Home Panels](https://github.com/deity6/softlab/tree/main/src/home): `src/home`
- [Header and Footer](https://github.com/deity6/softlab/tree/main/src/shell): `src/shell`
- [Sections and History](https://github.com/deity6/softlab/blob/main/src/lib/sections.ts): `src/lib/sections.ts`
- [Language Dictionary](https://github.com/deity6/softlab/blob/main/src/lib/i18n.ts): `src/lib/i18n.ts`
- [Theme Tokens](https://github.com/deity6/softlab/blob/main/src/lib/theme.ts): `src/lib/theme.ts`

### Catalogue and Buttons

- [Experiment Catalogue](https://github.com/deity6/softlab/blob/main/src/experiments/registry.ts): `src/experiments/registry.ts`
- [Work-in-Progress Notice](https://github.com/deity6/softlab/blob/main/src/experiments/WorkInProgress.tsx): `src/experiments/WorkInProgress.tsx`
- [Button Page](https://github.com/deity6/softlab/blob/main/src/home/ButtonPage.tsx): `src/home/ButtonPage.tsx`
- [Button Registry](https://github.com/deity6/softlab/blob/main/src/buttons/registry.ts): `src/buttons/registry.ts`
- [Button Effects](https://github.com/deity6/softlab/blob/main/src/buttons/MotionButton.tsx): `src/buttons/MotionButton.tsx`
- [Motion Tokens and Effects](https://github.com/deity6/softlab/blob/main/src/motion/motion.buttons.js): `src/motion/motion.buttons.js`

### Interactive Experiments

- [Soft Matter Lab](https://github.com/deity6/softlab/blob/main/src/experiments/soft-matter/SoftMatter.tsx): `src/experiments/soft-matter/SoftMatter.tsx`
- [Soft-body Renderer](https://github.com/deity6/softlab/blob/main/src/experiments/soft-matter/engine.ts): `src/experiments/soft-matter/engine.ts`
- [Canvas Lab](https://github.com/deity6/softlab/blob/main/src/experiments/canvas-lab/CanvasLab.tsx): `src/experiments/canvas-lab/CanvasLab.tsx`
- [Text Effects](https://github.com/deity6/softlab/tree/main/src/experiments/canvas-lab/effects): `src/experiments/canvas-lab/effects`
- [Cloud Train Lab](https://github.com/deity6/softlab/blob/main/src/experiments/cloud-train/CloudTrain.tsx): `src/experiments/cloud-train/CloudTrain.tsx`
- [Cloud Renderer](https://github.com/deity6/softlab/blob/main/src/experiments/cloud-train/engine.ts): `src/experiments/cloud-train/engine.ts`
- [Cloud Palettes](https://github.com/deity6/softlab/blob/main/src/experiments/cloud-train/palettes.ts): `src/experiments/cloud-train/palettes.ts`
- [Soft Cat WIP](https://github.com/deity6/softlab/blob/main/src/experiments/soft-cat/CatLab.tsx): `src/experiments/soft-cat/CatLab.tsx`

### Super Mona Game

- [Super Mona Lab](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/SuperMonaLab.tsx): `src/experiments/super-mona/SuperMonaLab.tsx`
- [Game Interface](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/SuperMona.jsx): `src/experiments/super-mona/SuperMona.jsx`
- [Game Engine](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/Engine.js): `src/experiments/super-mona/game/Engine.js`
- [Game Simulation](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/Game.js): `src/experiments/super-mona/game/Game.js`
- [Game Rules](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/rules.js): `src/experiments/super-mona/game/rules.js`
- [Game Sound](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/game/Sfx.js): `src/experiments/super-mona/game/Sfx.js`
- [Pixel Typography](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/PixelWord.jsx): `src/experiments/super-mona/PixelWord.jsx`
- [Scoreboard](https://github.com/deity6/softlab/blob/main/src/experiments/super-mona/ScoreBoard.jsx): `src/experiments/super-mona/ScoreBoard.jsx`

### Other components

- **Visitor**
- **Scores API**
- **Destroy Game**

## Connections

- Visitor → Route App: opens site (evidence: `README.md`)
- Route App → Hash Router: reads route (evidence: `src/App.tsx`)
- Route App → Experiment Catalogue: looks up experiment (evidence: `src/App.tsx`)
- Route App → Button Registry: looks up button (evidence: `src/App.tsx`)
- Route App → Home Panels: renders home (evidence: `src/App.tsx`)
- Route App → Button Page: renders button page (evidence: `src/App.tsx`)
- Route App → Work-in-Progress Notice: shows WIP (evidence: `src/App.tsx`)
- Route App → Header and Footer: renders shell (evidence: `src/App.tsx`)
- Home Panels → Experiment Catalogue: reads catalogue (evidence: `src/home/Home.tsx`)
- Home Panels → Button Registry: reads buttons (evidence: `src/home/Home.tsx`)
- Home Panels → Sections and History: reads sections (evidence: `src/home/Home.tsx`)
- Home Panels → Header and Footer: renders hero (evidence: `src/home/Home.tsx`)
- Button Page → Button Registry: renders entries (evidence: `src/home/ButtonPage.tsx`)
- Button Page → Button Effects: renders effects (evidence: `src/home/ButtonPage.tsx`)
- Button Effects → Motion Tokens and Effects: uses motion effects (evidence: `src/buttons/MotionButton.tsx`)
- Button Registry → Motion Tokens and Effects: uses duration tokens (evidence: `src/buttons/registry.ts`)
- Experiment Catalogue → Soft Matter Lab: registers experiment (evidence: `src/experiments/registry.ts`)
- Experiment Catalogue → Canvas Lab: registers experiment (evidence: `src/experiments/registry.ts`)
- Experiment Catalogue → Cloud Train Lab: registers experiment (evidence: `src/experiments/registry.ts`)
- Experiment Catalogue → Super Mona Lab: registers experiment (evidence: `src/experiments/registry.ts`)
- Experiment Catalogue → Soft Cat WIP: registers WIP (evidence: `src/experiments/registry.ts`)
- Soft Matter Lab → Soft-body Renderer: drives simulation (evidence: `src/experiments/soft-matter/SoftMatter.tsx`)
- Soft-body Renderer → Theme Tokens: reads theme (evidence: `src/experiments/soft-matter/engine.ts`)
- Canvas Lab → Text Effects: runs selected effect (evidence: `src/experiments/canvas-lab/CanvasLab.tsx`)
- Cloud Train Lab → Cloud Renderer: drives renderer (evidence: `src/experiments/cloud-train/CloudTrain.tsx`)
- Cloud Train Lab → Cloud Palettes: selects palette (evidence: `src/experiments/cloud-train/CloudTrain.tsx`)
- Super Mona Lab → Game Interface: mounts game UI
- Game Interface → Game Engine: creates engine (evidence: `src/experiments/super-mona/SuperMona.jsx`)
- Game Interface → Scoreboard: renders scores (evidence: `src/experiments/super-mona/SuperMona.jsx`)
- Game Interface → Pixel Typography: renders text (evidence: `src/experiments/super-mona/SuperMona.jsx`)
- Game Engine → Game Simulation: starts game (evidence: `src/experiments/super-mona/game/Engine.js`)
- Game Simulation → Game Rules: uses rules (evidence: `src/experiments/super-mona/game/Game.js`)
- Game Simulation → Game Sound: triggers sound (evidence: `src/experiments/super-mona/game/Game.js`)
- Scoreboard → Scores API: submits and reads scores (evidence: `README.md`)
- Home Panels → Destroy Game: links to game (evidence: `README.md`)
- Header and Footer → Language Dictionary: uses translations (evidence: `src/shell/SiteHeader.tsx`)
- Header and Footer → Theme Tokens: uses theme (evidence: `src/shell/SiteHeader.tsx`)
- Header and Footer → Sections and History: reads history (evidence: `src/shell/SiteFooter.tsx`)
