How arelius-d/mov-showcase works
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: map.js Map model · tabs.js Hash router · check.py Content verifier · interact.js Map interactions
Components 13
Static shell
Runs directly from local files.
- Page shell · Hosts the masthead and hash-routed views.
index.html - Hash router · Selects and activates the map, CLI, or TUI view.
src/tabs.js - Shared styling · Supports map layout, interaction states, and scaling.
src/styles.css
Interactive map
Primary data-driven explainer.
- Map model · Declares zones, groups, objects, content, and arcs.
src/map.js - Map renderer · Builds the map stage from model data.
src/render.js - Arc geometry · Derives non-overlapping paths from rendered positions.
src/arcs.js - Map interactions · Provides selection, filtering, theme, hover, and zoom.
src/interact.js
CLI playback
Deterministic terminal simulation.
- CLI session · Defines the simulated profile, planning, and deployment session.
src/cli.js - Terminal player · Renders timed typing, scrolling, and terminal-loop behavior.
src/terminal.js
TUI playback
Sequential full-screen picker simulation.
- TUI frames · Defines picker frames and decision states.
src/tui.js - Screen renderer · Draws panes, footers, and typing.
src/screens.js
Content assurance
Validates map integrity and visible copy.
- Content verifier · Checks map references and visitor-visible CLI/TUI copy.
verify/check.py - mov string catalog · Known output formats and source mappings.
verify/mov-strings.json
Connections 18
- 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