# plasma4/magix-fix architecture

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

- Interactive diagram: https://gitdiagram.com/plasma4/magix-fix
- Repository: https://github.com/plasma4/magix-fix

## Overview

Magix is a NeverEnding Legacy content mod, with a downloadable offline play page and a separate technology-tree viewer. The main player workflow is to load the mod into the game, play through its expanded content and mechanics, and optionally manage saves through the offline page. The graph also preserves the mod wiki and tree-viewer capabilities. Several offline-page and game-loading connections are documented in the README; unsampled runtime wiring is not assumed.

Main entry points: [`tech-tree/main.js`](https://github.com/plasma4/magix-fix/blob/main/tech-tree/main.js) (Tree Viewer App), [`main.js`](https://github.com/plasma4/magix-fix/blob/main/main.js) (NeverEnding Legacy), [`index.html`](https://github.com/plasma4/magix-fix/blob/main/index.html) (Offline Game Page), [`magixUtils.js`](https://github.com/plasma4/magix-fix/blob/main/magixUtils.js) (Magix Mod Runtime)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_game["Game and Mod"]
  node_nel["NeverEnding Legacy<br/>[main.js]"]
  node_base_content["Base Game Data<br/>[data.js]"]
  node_mod_runtime["Magix Mod Runtime<br/>[magixUtils.js]"]
  node_mod_content["Magix Content Data<br/>[MagixData.js]"]
  node_mod_config["Mod Configuration"]
end

subgraph group_offline["Offline Play"]
  node_offline_page["Offline Game Page<br/>[index.html]"]
  node_offline_logic["Offline Support<br/>[main.js]"]
  node_save_data[("Browser Save Storage")]
end

subgraph group_reference["Mod Reference"]
  node_mod_wiki["Mod Wiki<br/>[magix-wiki.html]"]
end

subgraph group_tree["Technology Tree"]
  node_tree_page["Tree Viewer Page<br/>[index.html]"]
  node_tree_app["Tree Viewer App<br/>[main.js]"]
  node_tree_data["Tree Node Builder<br/>[nodes.js]"]
  node_tree_menu["Node Details Menu<br/>[nodeMenu.js]"]
  node_tree_theme["Magix Tree Theme<br/>[magixTheme.js]"]
end

node_player(("Player"))
node_tree_library["Tree Viewer Library"]

node_player -->|"plays"| node_nel
node_nel -.->|"loads content"| node_base_content
node_player -->|"loads mod"| node_mod_runtime
node_mod_runtime -.->|"extends gameplay"| node_nel
node_mod_config -.->|"configures"| node_mod_runtime
node_player -->|"opens page"| node_offline_page
node_offline_page -.->|"runs"| node_offline_logic
node_offline_logic -->|"stores saves"| node_save_data
node_offline_page -->|"provides game"| node_nel
node_player -->|"browses content"| node_mod_wiki
node_player -.->|"opens viewer"| node_tree_page
node_tree_page -.->|"starts"| node_tree_app
node_tree_app -->|"builds graph"| node_tree_data
node_tree_app -->|"renders details"| node_tree_menu
node_tree_app -->|"loads theme"| node_tree_theme
node_tree_app -->|"uses viewer"| node_tree_library
node_tree_data -->|"reads game data"| node_mod_content

click node_nel "https://github.com/plasma4/magix-fix/blob/main/main.js"
click node_base_content "https://github.com/plasma4/magix-fix/blob/main/data.js"
click node_mod_runtime "https://github.com/plasma4/magix-fix/blob/main/magixUtils.js"
click node_mod_content "https://github.com/plasma4/magix-fix/blob/main/MagixData.js"
click node_mod_config "https://github.com/plasma4/magix-fix/blob/main/localDevelopment.js"
click node_offline_page "https://github.com/plasma4/magix-fix/blob/main/index.html"
click node_offline_logic "https://github.com/plasma4/magix-fix/blob/main/main.js"
click node_mod_wiki "https://github.com/plasma4/magix-fix/blob/main/magix-wiki.html"
click node_tree_page "https://github.com/plasma4/magix-fix/blob/main/tech-tree/index.html"
click node_tree_app "https://github.com/plasma4/magix-fix/blob/main/tech-tree/main.js"
click node_tree_data "https://github.com/plasma4/magix-fix/blob/main/tech-tree/nodes.js"
click node_tree_menu "https://github.com/plasma4/magix-fix/blob/main/tech-tree/nodeMenu.js"
click node_tree_theme "https://github.com/plasma4/magix-fix/blob/main/tech-tree/magixTheme.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_nel,node_base_content,node_mod_runtime,node_mod_content,node_mod_config,node_tree_library toneBlue
class node_offline_page,node_offline_logic,node_save_data toneAmber
class node_mod_wiki toneMint
class node_tree_page,node_tree_app,node_tree_data,node_tree_menu,node_tree_theme toneRose
class node_player toneIndigo
```

## Components

### Game and Mod

- [NeverEnding Legacy](https://github.com/plasma4/magix-fix/blob/main/main.js): `main.js`
- [Base Game Data](https://github.com/plasma4/magix-fix/blob/main/data.js): `data.js`
- [Magix Mod Runtime](https://github.com/plasma4/magix-fix/blob/main/magixUtils.js): `magixUtils.js`
- [Magix Content Data](https://github.com/plasma4/magix-fix/blob/main/MagixData.js): `MagixData.js`
- [Mod Configuration](https://github.com/plasma4/magix-fix/blob/main/localDevelopment.js): `localDevelopment.js`

### Offline Play

- [Offline Game Page](https://github.com/plasma4/magix-fix/blob/main/index.html): `index.html`
- [Offline Support](https://github.com/plasma4/magix-fix/blob/main/main.js): `main.js`
- **Browser Save Storage**

### Mod Reference

- [Mod Wiki](https://github.com/plasma4/magix-fix/blob/main/magix-wiki.html): `magix-wiki.html`

### Technology Tree

- [Tree Viewer Page](https://github.com/plasma4/magix-fix/blob/main/tech-tree/index.html): `tech-tree/index.html`
- [Tree Viewer App](https://github.com/plasma4/magix-fix/blob/main/tech-tree/main.js): `tech-tree/main.js`
- [Tree Node Builder](https://github.com/plasma4/magix-fix/blob/main/tech-tree/nodes.js): `tech-tree/nodes.js`
- [Node Details Menu](https://github.com/plasma4/magix-fix/blob/main/tech-tree/nodeMenu.js): `tech-tree/nodeMenu.js`
- [Magix Tree Theme](https://github.com/plasma4/magix-fix/blob/main/tech-tree/magixTheme.js): `tech-tree/magixTheme.js`

### Other components

- **Player**
- **Tree Viewer Library**

## Connections

- Player → NeverEnding Legacy: plays (evidence: `README.md`)
- NeverEnding Legacy → Base Game Data: loads content
- Player → Magix Mod Runtime: loads mod (evidence: `README.md`)
- Magix Mod Runtime → NeverEnding Legacy: extends gameplay
- Mod Configuration → Magix Mod Runtime: configures
- Player → Offline Game Page: opens page (evidence: `README.md`)
- Offline Game Page → Offline Support: runs
- Offline Support → Browser Save Storage: stores saves (evidence: `README.md`)
- Offline Game Page → NeverEnding Legacy: provides game (evidence: `README.md`)
- Player → Mod Wiki: browses content (evidence: `README.md`)
- Player → Tree Viewer Page: opens viewer
- Tree Viewer Page → Tree Viewer App: starts
- Tree Viewer App → Tree Node Builder: builds graph (evidence: `tech-tree/main.js`)
- Tree Viewer App → Node Details Menu: renders details (evidence: `tech-tree/main.js`)
- Tree Viewer App → Magix Tree Theme: loads theme (evidence: `tech-tree/main.js`)
- Tree Viewer App → Tree Viewer Library: uses viewer (evidence: `tech-tree/main.js`)
- Tree Node Builder → Magix Content Data: reads game data (evidence: `tech-tree/nodes.js`)
