# blixvip/html-anime architecture

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

- Interactive diagram: https://gitdiagram.com/blixvip/html-anime
- Repository: https://github.com/blixvip/html-anime

## Overview

html-anime turns a scene brief into constrained shot sheets for a coding agent, which authors timed HTML animation; its Node pipeline can compile multi-scene manifests, generate deterministic preview HTML, render silent scene MP4s, and assemble them into a film. The browser site and Node compiler share the sheet-generation module. The graph covers documented skill guidance as a subsystem, but its individual skill files were not sampled; pipeline links are limited to explicit README statements or shown imports and calls.

Main entry points: [`harness/preview-film.mjs`](https://github.com/blixvip/html-anime/blob/main/harness/preview-film.mjs) (Preview generator), [`harness/render-film.mjs`](https://github.com/blixvip/html-anime/blob/main/harness/render-film.mjs) (Scene renderer), [`harness/assemble-film.mjs`](https://github.com/blixvip/html-anime/blob/main/harness/assemble-film.mjs) (Film assembler), [`site.js`](https://github.com/blixvip/html-anime/blob/main/site.js) (Browser site)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_authoring["Brief authoring"]
  node_site["Browser site<br/>[site.js]"]
  node_sheet["Sheet compiler<br/>[compile.js]"]
  node_skills["Animation skills"]
end

subgraph group_planning["Film planning"]
  node_manifest["Film manifest"]
  node_film["Film compiler<br/>[film.js]"]
  node_cli["Manifest CLI<br/>[film-cli.mjs]"]
  node_preview["Preview generator<br/>[preview-film.mjs]"]
  node_timeline["Film timeline"]
end

subgraph group_rendering["Rendering"]
  node_html["Scene HTML"]
  node_renderer["Scene renderer<br/>[render-film.mjs]"]
  node_scenes["Rendered scenes"]
end

subgraph group_assembly["Film assembly"]
  node_assembler["Film assembler<br/>[assemble-film.mjs]"]
  node_filmout["Silent film"]
end

node_viewer(("Brief author"))
node_agent(("Coding agent"))
node_gsap["GSAP CDN"]
node_browser["Chromium"]
node_ffmpeg["FFmpeg"]
node_ffprobe["ffprobe"]

node_viewer -->|"enters brief"| node_site
node_site -->|"compiles brief"| node_sheet
node_site -->|"shows sheet"| node_viewer
node_viewer -->|"pastes sheet"| node_agent
node_agent -->|"reads guidance"| node_skills
node_agent -->|"authors scenes"| node_html
node_manifest -->|"supplies input"| node_cli
node_cli -->|"compiles manifest"| node_film
node_film -->|"compiles scenes"| node_sheet
node_manifest -->|"supplies input"| node_preview
node_preview -->|"compiles manifest"| node_film
node_preview -->|"reads palettes"| node_sheet
node_preview -->|"generates scenes"| node_html
node_preview -->|"writes timeline"| node_timeline
node_html -.->|"loads animation"| node_gsap
node_timeline -->|"provides timing"| node_renderer
node_html -->|"provides scenes"| node_renderer
node_renderer -->|"captures frames"| node_browser
node_renderer -->|"encodes scenes"| node_ffmpeg
node_renderer -->|"writes MP4s"| node_scenes
node_timeline -->|"provides sequence"| node_assembler
node_scenes -->|"provides MP4s"| node_assembler
node_assembler -->|"validates streams"| node_ffprobe
node_assembler -->|"joins scenes"| node_ffmpeg
node_assembler -->|"writes film"| node_filmout

click node_site "https://github.com/blixvip/html-anime/blob/main/site.js"
click node_sheet "https://github.com/blixvip/html-anime/blob/main/harness/compile.js"
click node_skills "https://github.com/blixvip/html-anime/tree/main/skills"
click node_film "https://github.com/blixvip/html-anime/blob/main/harness/film.js"
click node_cli "https://github.com/blixvip/html-anime/blob/main/harness/film-cli.mjs"
click node_preview "https://github.com/blixvip/html-anime/blob/main/harness/preview-film.mjs"
click node_renderer "https://github.com/blixvip/html-anime/blob/main/harness/render-film.mjs"
click node_assembler "https://github.com/blixvip/html-anime/blob/main/harness/assemble-film.mjs"

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_site,node_sheet,node_skills toneBlue
class node_manifest,node_film,node_cli,node_preview,node_timeline toneAmber
class node_html,node_renderer,node_scenes toneMint
class node_assembler,node_filmout toneRose
class node_viewer,node_agent,node_gsap,node_browser,node_ffmpeg,node_ffprobe toneIndigo
```

## Components

### Brief authoring

- [Browser site](https://github.com/blixvip/html-anime/blob/main/site.js): `site.js`
- [Sheet compiler](https://github.com/blixvip/html-anime/blob/main/harness/compile.js): `harness/compile.js`
- [Animation skills](https://github.com/blixvip/html-anime/tree/main/skills): `skills`

### Film planning

- **Film manifest**
- [Film compiler](https://github.com/blixvip/html-anime/blob/main/harness/film.js): `harness/film.js`
- [Manifest CLI](https://github.com/blixvip/html-anime/blob/main/harness/film-cli.mjs): `harness/film-cli.mjs`
- [Preview generator](https://github.com/blixvip/html-anime/blob/main/harness/preview-film.mjs): `harness/preview-film.mjs`
- **Film timeline**

### Rendering

- **Scene HTML**
- [Scene renderer](https://github.com/blixvip/html-anime/blob/main/harness/render-film.mjs): `harness/render-film.mjs`
- **Rendered scenes**

### Film assembly

- [Film assembler](https://github.com/blixvip/html-anime/blob/main/harness/assemble-film.mjs): `harness/assemble-film.mjs`
- **Silent film**

### Other components

- **Brief author**
- **Coding agent**
- **GSAP CDN**
- **Chromium**
- **FFmpeg**
- **ffprobe**

## Connections

- Brief author → Browser site: enters brief (evidence: `README.md`)
- Browser site → Sheet compiler: compiles brief (evidence: `site.js`)
- Browser site → Brief author: shows sheet (evidence: `README.md`)
- Brief author → Coding agent: pastes sheet (evidence: `README.md`)
- Coding agent → Animation skills: reads guidance
- Coding agent → Scene HTML: authors scenes (evidence: `README.md`)
- Film manifest → Manifest CLI: supplies input (evidence: `README.md`)
- Manifest CLI → Film compiler: compiles manifest (evidence: `harness/film-cli.mjs`)
- Film compiler → Sheet compiler: compiles scenes (evidence: `harness/film.js`)
- Film manifest → Preview generator: supplies input (evidence: `README.md`)
- Preview generator → Film compiler: compiles manifest (evidence: `harness/preview-film.mjs`)
- Preview generator → Sheet compiler: reads palettes (evidence: `harness/preview-film.mjs`)
- Preview generator → Scene HTML: generates scenes (evidence: `harness/preview-film.mjs`)
- Preview generator → Film timeline: writes timeline (evidence: `harness/preview-film.mjs`)
- Scene HTML → GSAP CDN: loads animation
- Film timeline → Scene renderer: provides timing (evidence: `README.md`)
- Scene HTML → Scene renderer: provides scenes (evidence: `README.md`)
- Scene renderer → Chromium: captures frames (evidence: `harness/render-film.mjs`)
- Scene renderer → FFmpeg: encodes scenes (evidence: `harness/render-film.mjs`)
- Scene renderer → Rendered scenes: writes MP4s (evidence: `README.md`)
- Film timeline → Film assembler: provides sequence (evidence: `README.md`)
- Rendered scenes → Film assembler: provides MP4s (evidence: `README.md`)
- Film assembler → ffprobe: validates streams (evidence: `harness/assemble-film.mjs`)
- Film assembler → FFmpeg: joins scenes (evidence: `harness/assemble-film.mjs`)
- Film assembler → Silent film: writes film (evidence: `harness/assemble-film.mjs`)
