# pak720/scalar_nuclear_console_test architecture

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

- Interactive diagram: https://gitdiagram.com/pak720/scalar_nuclear_console_test
- Repository: https://github.com/pak720/scalar_nuclear_console_test

## Overview

SCALAR COMPUTER is a local, dependency-free browser terminal with a fictional client-side reactor simulation. The main workflow is: start the local server, open the terminal, enter a command, and receive terminal output or operate the reactor controls. The README documents general terminal commands, reactor status and live monitoring, control adjustments, and confirmed emergency shutdown. The sampled app.js excerpt is partial, so links among internal reactor behaviors are limited to documented behavior and visible entry points.

Main entry points: [`app.js`](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js) (Command dispatch), [`index.html`](https://github.com/pak720/scalar_nuclear_console_test/blob/main/index.html) (Terminal page), [`start_server.py`](https://github.com/pak720/scalar_nuclear_console_test/blob/main/start_server.py) (Local HTTP server), [`styles.css`](https://github.com/pak720/scalar_nuclear_console_test/blob/main/styles.css) (Terminal styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_hosting["Local hosting"]
  node_server["Local HTTP server<br/>[start_server.py]"]
end

subgraph group_terminal["Terminal interface"]
  node_page["Terminal page<br/>[index.html]"]
  node_styles["Terminal styling<br/>[styles.css]"]
  node_terminal["Terminal interaction<br/>[app.js]"]
  node_dispatch["Command dispatch<br/>[app.js]"]
  node_commands["General commands<br/>[app.js]"]
  node_history["Command history<br/>[app.js]"]
end

subgraph group_reactor["Reactor simulation"]
  node_state["Reactor state<br/>[app.js]"]
  node_simulation["Reactor simulation<br/>[app.js]"]
  node_control["Reactor controls<br/>[app.js]"]
  node_monitor["Status and live monitor<br/>[app.js]"]
  node_shutdown["Emergency shutdown<br/>[app.js]"]
end

node_operator(("Operator"))
node_browser["Browser"]

node_operator -->|"uses"| node_browser
node_operator -->|"enters commands"| node_terminal
node_server -->|"serves app"| node_browser
node_browser -->|"loads"| node_page
node_page -->|"hosts"| node_terminal
node_page -->|"loads styles"| node_styles
node_terminal -->|"submits commands"| node_dispatch
node_dispatch -->|"dispatches"| node_commands
node_dispatch -->|"reads history"| node_history
node_dispatch -->|"dispatches"| node_control
node_dispatch -->|"dispatches"| node_monitor
node_control -->|"updates"| node_state
node_simulation -->|"updates"| node_state
node_control -->|"sets targets"| node_simulation
node_monitor -->|"reads"| node_state
node_control -->|"requests shutdown"| node_shutdown
node_shutdown -->|"sets safe state"| node_state

click node_server "https://github.com/pak720/scalar_nuclear_console_test/blob/main/start_server.py"
click node_page "https://github.com/pak720/scalar_nuclear_console_test/blob/main/index.html"
click node_styles "https://github.com/pak720/scalar_nuclear_console_test/blob/main/styles.css"
click node_terminal "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_dispatch "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_commands "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_history "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_state "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_simulation "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_control "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_monitor "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js"
click node_shutdown "https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.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_server,node_browser toneBlue
class node_page,node_styles,node_terminal,node_dispatch,node_commands,node_history toneAmber
class node_state,node_simulation,node_control,node_monitor,node_shutdown toneMint
class node_operator toneIndigo
```

## Components

### Local hosting

- [Local HTTP server](https://github.com/pak720/scalar_nuclear_console_test/blob/main/start_server.py): `start_server.py`

### Terminal interface

- [Terminal page](https://github.com/pak720/scalar_nuclear_console_test/blob/main/index.html): `index.html`
- [Terminal styling](https://github.com/pak720/scalar_nuclear_console_test/blob/main/styles.css): `styles.css`
- [Terminal interaction](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [Command dispatch](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [General commands](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [Command history](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`

### Reactor simulation

- [Reactor state](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [Reactor simulation](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [Reactor controls](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [Status and live monitor](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`
- [Emergency shutdown](https://github.com/pak720/scalar_nuclear_console_test/blob/main/app.js): `app.js`

### Other components

- **Operator**
- **Browser**

## Connections

- Operator → Browser: uses
- Operator → Terminal interaction: enters commands
- Local HTTP server → Browser: serves app
- Browser → Terminal page: loads
- Terminal page → Terminal interaction: hosts
- Terminal page → Terminal styling: loads styles
- Terminal interaction → Command dispatch: submits commands
- Command dispatch → General commands: dispatches
- Command dispatch → Command history: reads history
- Command dispatch → Reactor controls: dispatches
- Command dispatch → Status and live monitor: dispatches
- Reactor controls → Reactor state: updates
- Reactor simulation → Reactor state: updates
- Reactor controls → Reactor simulation: sets targets
- Status and live monitor → Reactor state: reads
- Reactor controls → Emergency shutdown: requests shutdown
- Emergency shutdown → Reactor state: sets safe state
