# arelius-d/mov-showcase architecture

> Architecture diagram of the GitHub repository arelius-d/mov-showcase, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-08-27). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arelius-d/mov-showcase
- Repository: https://github.com/arelius-d/mov-showcase

## Overview

#### Purpose and Delivery Model
`mov-showcase` is a static, framework-free interactive explainer for the `mov` CLI/TUI. It runs directly from `index.html` over `file://`: no build, package manager, runtime network calls, or module loader. The page exposes three hash-routed views: map (`#map`), scripted CLI (`#cli`), and scripted TUI (`#tui`).

Paths: `index.html`, `src/tabs.js`, `src/styles.css`.

#### Bootstrapping and View Routing
`index.html` supplies the shell and loads classic scripts. `src/tabs.js` owns tab selection and hash routing, activating one of the three independently rendered experiences. This isolates failures in content scripts: the shell/masthead can remain available when a view’s data script fails.

Paths: `index.html`, `src/tabs.js`, `src/map.js`.

#### Map as the Primary Content Model
The map is data-driven: zones, groups, objects, explanatory content, and their relationships/arcs are declared centrally. Adding a map object is intended to be a data entry rather than a DOM implementation change. The model is validated for referential integrity: arcs must resolve to existing objects, and objects must belong to valid nonempty groups/zones.

Paths: `src/map.js`, `verify/check.py`.

#### Map Rendering and Geometry
`src/render.js` transforms map data into the stage DOM. `src/arcs.js` then derives connector paths from actual rendered object positions rather than fixed coordinates. Arc routing chooses the dominant spatial axis and allocates exit slots so multiple connectors from one object do not overlap; this makes layout resilient to resizing, font loading, and model growth.

Paths: `src/render.js`, `src/arcs.js`, `src/map.js`.

#### Map Interaction Layer
`src/interact.js` manages map behavior: hover connection highlighting, object selection and detail panels, theme selection, zoom, and filtering. Filtering combines field substring matching with name subsequence matching, and retains connected objects for contextual graph visibility. Zoom is applied to a single scaled element while inverse-scale layout preserves rendered dimensions and prevents overflow.

Paths: `src/interact.js`, `src/render.js`, `src/styles.css`.

#### Scripted CLI Playback
The CLI tab is a deterministic end-to-end `mov` session: profile creation, planning, and deployment decisions. `src/cli.js` contains the session content; `src/terminal.js` renders timed typing, scrolling, and terminal-loop behavior. It is a simulation driven by source-owned data, not a recording or live CLI integration.

Paths: `src/cli.js`, `src/terminal.js`.

#### Scripted TUI Playback and Content Assurance
The TUI tab presents `mov`’s full-screen picker as sequential frames, including search, selection dependencies, required answers, naming, and file review. `src/tui.js` supplies frame content while `src/screens.js` draws panes, footers, and typing. The Python verifier constrains visitor-visible CLI/TUI strings to known `mov` output formats and source mappings in the checked string catalog, preventing copy drift.

Paths: `src/tui.js`, `src/screens.js`, `verify/check.py`, `verify/mov-strings.json`.

Main entry points: [`src/map.js`](https://github.com/arelius-d/mov-showcase/blob/main/src/map.js) (Map model), [`src/tabs.js`](https://github.com/arelius-d/mov-showcase/blob/main/src/tabs.js) (Hash router), [`verify/check.py`](https://github.com/arelius-d/mov-showcase/blob/main/verify/check.py) (Content verifier), [`src/interact.js`](https://github.com/arelius-d/mov-showcase/blob/main/src/interact.js) (Map interactions)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_shell["Static shell"]
  node_index["Page shell<br/>HTML entry<br/>[index.html]"]
  node_tabs["Hash router<br/>classic script<br/>[tabs.js]"]
  node_styles["Shared styling<br/>CSS<br/>[styles.css]"]
end

subgraph group_map["Interactive map"]
  node_map_model["Map model<br/>content model<br/>[map.js]"]
  node_map_render["Map renderer<br/>DOM renderer<br/>[render.js]"]
  node_arcs["Arc geometry<br/>connector router<br/>[arcs.js]"]
  node_map_interact["Map interactions<br/>interaction controller<br/>[interact.js]"]
end

subgraph group_cli["CLI playback"]
  node_cli_content["CLI session<br/>scripted content<br/>[cli.js]"]
  node_terminal["Terminal player<br/>playback renderer<br/>[terminal.js]"]
end

subgraph group_tui["TUI playback"]
  node_tui_content["TUI frames<br/>scripted content<br/>[tui.js]"]
  node_screens["Screen renderer<br/>playback renderer<br/>[screens.js]"]
end

subgraph group_assurance["Content assurance"]
  node_verifier{{"Content verifier<br/>Python checker<br/>[check.py]"}}
  node_string_catalog["mov string catalog<br/>checked catalog<br/>[mov-strings.json]"]
end

node_index -->|"loads"| node_tabs
node_index -->|"loads"| node_styles
node_tabs -->|"activates map view"| node_map_model
node_tabs -->|"activates CLI view"| node_cli_content
node_tabs -->|"activates TUI view"| node_tui_content
node_map_model -->|"drives DOM rendering"| node_map_render
node_map_render -->|"provides object positions"| node_arcs
node_map_model -->|"supplies relationships"| node_arcs
node_map_model -->|"supplies objects and content"| node_map_interact
node_map_render -->|"provides stage"| node_map_interact
node_map_interact -->|"updates layout on interaction"| node_arcs
node_styles -->|"supports scaled layout"| node_map_interact
node_cli_content -->|"drives playback"| node_terminal
node_tui_content -->|"drives frame rendering"| node_screens
node_verifier -.->|"validates references"| node_map_model
node_verifier -.->|"checks visible strings"| node_cli_content
node_verifier -.->|"checks visible strings"| node_tui_content
node_string_catalog -->|"defines approved formats"| node_verifier

click node_index "https://github.com/arelius-d/mov-showcase/blob/main/index.html"
click node_tabs "https://github.com/arelius-d/mov-showcase/blob/main/src/tabs.js"
click node_styles "https://github.com/arelius-d/mov-showcase/blob/main/src/styles.css"
click node_map_model "https://github.com/arelius-d/mov-showcase/blob/main/src/map.js"
click node_map_render "https://github.com/arelius-d/mov-showcase/blob/main/src/render.js"
click node_arcs "https://github.com/arelius-d/mov-showcase/blob/main/src/arcs.js"
click node_map_interact "https://github.com/arelius-d/mov-showcase/blob/main/src/interact.js"
click node_cli_content "https://github.com/arelius-d/mov-showcase/blob/main/src/cli.js"
click node_terminal "https://github.com/arelius-d/mov-showcase/blob/main/src/terminal.js"
click node_tui_content "https://github.com/arelius-d/mov-showcase/blob/main/src/tui.js"
click node_screens "https://github.com/arelius-d/mov-showcase/blob/main/src/screens.js"
click node_verifier "https://github.com/arelius-d/mov-showcase/blob/main/verify/check.py"
click node_string_catalog "https://github.com/arelius-d/mov-showcase/blob/main/verify/mov-strings.json"

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_index,node_tabs,node_styles toneBlue
class node_map_model,node_map_render,node_arcs,node_map_interact toneAmber
class node_cli_content,node_terminal toneMint
class node_tui_content,node_screens toneRose
class node_verifier,node_string_catalog toneIndigo
```

## Components

### Static shell

Runs directly from local files.

- [Page shell](https://github.com/arelius-d/mov-showcase/blob/main/index.html): HTML entry · Hosts the masthead and hash-routed views. · `index.html`
- [Hash router](https://github.com/arelius-d/mov-showcase/blob/main/src/tabs.js): classic script · Selects and activates the map, CLI, or TUI view. · `src/tabs.js`
- [Shared styling](https://github.com/arelius-d/mov-showcase/blob/main/src/styles.css): CSS · Supports map layout, interaction states, and scaling. · `src/styles.css`

### Interactive map

Primary data-driven explainer.

- [Map model](https://github.com/arelius-d/mov-showcase/blob/main/src/map.js): content model · Declares zones, groups, objects, content, and arcs. · `src/map.js`
- [Map renderer](https://github.com/arelius-d/mov-showcase/blob/main/src/render.js): DOM renderer · Builds the map stage from model data. · `src/render.js`
- [Arc geometry](https://github.com/arelius-d/mov-showcase/blob/main/src/arcs.js): connector router · Derives non-overlapping paths from rendered positions. · `src/arcs.js`
- [Map interactions](https://github.com/arelius-d/mov-showcase/blob/main/src/interact.js): interaction controller · Provides selection, filtering, theme, hover, and zoom. · `src/interact.js`

### CLI playback

Deterministic terminal simulation.

- [CLI session](https://github.com/arelius-d/mov-showcase/blob/main/src/cli.js): scripted content · Defines the simulated profile, planning, and deployment session. · `src/cli.js`
- [Terminal player](https://github.com/arelius-d/mov-showcase/blob/main/src/terminal.js): playback renderer · Renders timed typing, scrolling, and terminal-loop behavior. · `src/terminal.js`

### TUI playback

Sequential full-screen picker simulation.

- [TUI frames](https://github.com/arelius-d/mov-showcase/blob/main/src/tui.js): scripted content · Defines picker frames and decision states. · `src/tui.js`
- [Screen renderer](https://github.com/arelius-d/mov-showcase/blob/main/src/screens.js): playback renderer · Draws panes, footers, and typing. · `src/screens.js`

### Content assurance

Validates map integrity and visible copy.

- [Content verifier](https://github.com/arelius-d/mov-showcase/blob/main/verify/check.py): Python checker · Checks map references and visitor-visible CLI/TUI copy. · `verify/check.py`
- [mov string catalog](https://github.com/arelius-d/mov-showcase/blob/main/verify/mov-strings.json): checked catalog · Known output formats and source mappings. · `verify/mov-strings.json`

## Connections

- Page shell → Hash router: loads
- Page shell → Shared styling: loads
- Hash router → Map model: activates map view
- Hash router → CLI session: activates CLI view
- Hash router → TUI frames: activates TUI view
- Map model → Map renderer: drives DOM rendering
- Map renderer → Arc geometry: provides object positions
- Map model → Arc geometry: supplies relationships
- Map model → Map interactions: supplies objects and content
- Map renderer → Map interactions: provides stage
- Map interactions → Arc geometry: updates layout on interaction
- Shared styling → Map interactions: supports scaled layout
- CLI session → Terminal player: drives playback
- TUI frames → Screen renderer: drives frame rendering
- Content verifier → Map model: validates references
- Content verifier → CLI session: checks visible strings
- Content verifier → TUI frames: checks visible strings
- mov string catalog → Content verifier: defines approved formats
