# gnovotny/nothing-to-watch architecture

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

- Interactive diagram: https://gitdiagram.com/gnovotny/nothing-to-watch
- Repository: https://github.com/gnovotny/nothing-to-watch

## Overview

This is an interactive WebGL film-poster gallery. The user enters through the React application, explores the intro/selection experience, focuses a film to see its preview, and can adjust display, device, and performance settings. Zustand coordinates UI, film data, and engine state; the app’s Voroforce integration configures the standalone engine, which simulates poster relationships, renders them, and handles interaction. The README documents the overall data flow and engine capabilities; unsampled implementation links are shown only where that documentation supports them.

Main entry points: [`voroforce/voroforce.js`](https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/voroforce.js) (Voroforce runtime), [`app/cmps/views`](https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views) (Primary views), [`app/store/voroforce-slice.ts`](https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/voroforce-slice.ts) (Engine state), [`app/main.tsx`](https://github.com/gnovotny/nothing-to-watch/blob/main/app/main.tsx) (React entry)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_application["Application"]
  node_react_entry["React entry<br/>[main.tsx]"]
  node_app_shell["App shell<br/>[app.tsx]"]
  node_settings["Settings view"]
  node_responsive["Device adaptation<br/>[device-class.ts]"]
  node_theme["Theme and navigation<br/>[navbar.tsx]"]
end

subgraph group_discovery["Film discovery"]
  node_views["Primary views"]
  node_intro["Intro experience"]
  node_film_preview["Film preview<br/>[film-preview.tsx]"]
  node_favorites["Favorites view"]
end

subgraph group_integration["Engine integration"]
  node_settings_config["Engine configuration"]
  node_engine_adapter["Engine integration<br/>[init-voroforce.ts]"]
  node_engine_host["Engine host<br/>[voroforce.tsx]"]
end

subgraph group_engine["Voroforce engine"]
  node_voroforce["Voroforce runtime<br/>[voroforce.js]"]
  node_simulation["Force simulation"]
  node_renderer["WebGL renderer"]
  node_controls["Interaction controls"]
  node_lattice["Poster lattice<br/>[lattice.js]"]
  node_media_loading["Media loading<br/>[loader.js]"]
end

subgraph group_state["State and settings"]
  node_film_state["Film data state<br/>[film-data-slice.ts]"]
  node_ui_state["UI state<br/>[ui-slice.ts]"]
  node_engine_state["Engine state<br/>[voroforce-slice.ts]"]
  node_local_storage[("Browser preferences<br/>[storage.ts]")]
end

node_visitor(("Gallery visitor"))

node_visitor -->|"opens gallery"| node_react_entry
node_react_entry -->|"renders"| node_app_shell
node_app_shell -->|"renders"| node_views
node_app_shell -->|"renders"| node_intro
node_app_shell -->|"renders"| node_theme
node_visitor -->|"explores films"| node_views
node_views -->|"shows selection"| node_film_preview
node_visitor -->|"adjusts settings"| node_settings
node_views -->|"uses film data"| node_film_state
node_views -->|"updates interface state"| node_ui_state
node_views -->|"reads engine state"| node_engine_state
node_settings -->|"updates engine settings"| node_engine_state
node_engine_state -->|"configures"| node_settings_config
node_engine_state -->|"initializes"| node_engine_adapter
node_react_entry -->|"initializes"| node_engine_adapter
node_react_entry -->|"renders"| node_engine_host
node_engine_host -->|"hosts"| node_voroforce
node_voroforce -->|"arranges cells"| node_lattice
node_voroforce -->|"updates simulation"| node_simulation
node_voroforce -->|"updates display"| node_renderer
node_voroforce -->|"updates controls"| node_controls
node_voroforce -->|"loads media"| node_media_loading
node_renderer -->|"receives media layers"| node_media_loading
node_controls -.->|"dispatches interactions"| node_engine_state
node_settings -.->|"persists preferences"| node_local_storage
node_settings_config -.->|"adapts device settings"| node_responsive
node_favorites -.->|"uses saved films"| node_film_state

click node_react_entry "https://github.com/gnovotny/nothing-to-watch/blob/main/app/main.tsx"
click node_app_shell "https://github.com/gnovotny/nothing-to-watch/blob/main/app/app.tsx"
click node_views "https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views"
click node_intro "https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views/intro"
click node_film_preview "https://github.com/gnovotny/nothing-to-watch/blob/main/app/cmps/views/film/film-preview.tsx"
click node_favorites "https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views/favorites"
click node_settings "https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views/settings"
click node_film_state "https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/film-data-slice.ts"
click node_ui_state "https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/ui-slice.ts"
click node_engine_state "https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/voroforce-slice.ts"
click node_settings_config "https://github.com/gnovotny/nothing-to-watch/tree/main/app/vf/config"
click node_engine_adapter "https://github.com/gnovotny/nothing-to-watch/blob/main/app/vf/init-voroforce.ts"
click node_engine_host "https://github.com/gnovotny/nothing-to-watch/blob/main/app/voroforce.tsx"
click node_voroforce "https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/voroforce.js"
click node_simulation "https://github.com/gnovotny/nothing-to-watch/tree/main/voroforce/simulation"
click node_renderer "https://github.com/gnovotny/nothing-to-watch/tree/main/voroforce/display"
click node_controls "https://github.com/gnovotny/nothing-to-watch/tree/main/voroforce/controls"
click node_lattice "https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/common/lattice/lattice.js"
click node_media_loading "https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/common/helpers/loader.js"
click node_local_storage "https://github.com/gnovotny/nothing-to-watch/blob/main/app/utils/storage.ts"
click node_responsive "https://github.com/gnovotny/nothing-to-watch/blob/main/app/vf/utils/device-class.ts"
click node_theme "https://github.com/gnovotny/nothing-to-watch/blob/main/app/cmps/layout/navbar.tsx"

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_react_entry,node_app_shell,node_settings,node_responsive,node_theme toneBlue
class node_views,node_intro,node_film_preview,node_favorites toneAmber
class node_settings_config,node_engine_adapter,node_engine_host toneMint
class node_voroforce,node_simulation,node_renderer,node_controls,node_lattice,node_media_loading toneRose
class node_film_state,node_ui_state,node_engine_state,node_local_storage,node_visitor toneIndigo
```

## Components

### Application

- [React entry](https://github.com/gnovotny/nothing-to-watch/blob/main/app/main.tsx): `app/main.tsx`
- [App shell](https://github.com/gnovotny/nothing-to-watch/blob/main/app/app.tsx): `app/app.tsx`
- [Settings view](https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views/settings): `app/cmps/views/settings`
- [Device adaptation](https://github.com/gnovotny/nothing-to-watch/blob/main/app/vf/utils/device-class.ts): `app/vf/utils/device-class.ts`
- [Theme and navigation](https://github.com/gnovotny/nothing-to-watch/blob/main/app/cmps/layout/navbar.tsx): `app/cmps/layout/navbar.tsx`

### Film discovery

- [Primary views](https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views): `app/cmps/views`
- [Intro experience](https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views/intro): `app/cmps/views/intro`
- [Film preview](https://github.com/gnovotny/nothing-to-watch/blob/main/app/cmps/views/film/film-preview.tsx): `app/cmps/views/film/film-preview.tsx`
- [Favorites view](https://github.com/gnovotny/nothing-to-watch/tree/main/app/cmps/views/favorites): `app/cmps/views/favorites`

### Engine integration

- [Engine configuration](https://github.com/gnovotny/nothing-to-watch/tree/main/app/vf/config): `app/vf/config`
- [Engine integration](https://github.com/gnovotny/nothing-to-watch/blob/main/app/vf/init-voroforce.ts): `app/vf/init-voroforce.ts`
- [Engine host](https://github.com/gnovotny/nothing-to-watch/blob/main/app/voroforce.tsx): `app/voroforce.tsx`

### Voroforce engine

- [Voroforce runtime](https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/voroforce.js): `voroforce/voroforce.js`
- [Force simulation](https://github.com/gnovotny/nothing-to-watch/tree/main/voroforce/simulation): `voroforce/simulation`
- [WebGL renderer](https://github.com/gnovotny/nothing-to-watch/tree/main/voroforce/display): `voroforce/display`
- [Interaction controls](https://github.com/gnovotny/nothing-to-watch/tree/main/voroforce/controls): `voroforce/controls`
- [Poster lattice](https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/common/lattice/lattice.js): `voroforce/common/lattice/lattice.js`
- [Media loading](https://github.com/gnovotny/nothing-to-watch/blob/main/voroforce/common/helpers/loader.js): `voroforce/common/helpers/loader.js`

### State and settings

- [Film data state](https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/film-data-slice.ts): `app/store/film-data-slice.ts`
- [UI state](https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/ui-slice.ts): `app/store/ui-slice.ts`
- [Engine state](https://github.com/gnovotny/nothing-to-watch/blob/main/app/store/voroforce-slice.ts): `app/store/voroforce-slice.ts`
- [Browser preferences](https://github.com/gnovotny/nothing-to-watch/blob/main/app/utils/storage.ts): `app/utils/storage.ts`

### Other components

- **Gallery visitor**

## Connections

- Gallery visitor → React entry: opens gallery (evidence: `README.md`)
- React entry → App shell: renders (evidence: `app/main.tsx`)
- App shell → Primary views: renders (evidence: `app/app.tsx`)
- App shell → Intro experience: renders (evidence: `app/app.tsx`)
- App shell → Theme and navigation: renders (evidence: `app/app.tsx`)
- Gallery visitor → Primary views: explores films (evidence: `README.md`)
- Primary views → Film preview: shows selection (evidence: `README.md`)
- Gallery visitor → Settings view: adjusts settings (evidence: `README.md`)
- Primary views → Film data state: uses film data (evidence: `README.md`)
- Primary views → UI state: updates interface state (evidence: `README.md`)
- Primary views → Engine state: reads engine state (evidence: `app/cmps/views/film/film-preview.tsx`)
- Settings view → Engine state: updates engine settings (evidence: `README.md`)
- Engine state → Engine configuration: configures (evidence: `app/store/voroforce-slice.ts`)
- Engine state → Engine integration: initializes (evidence: `app/store/voroforce-slice.ts`)
- React entry → Engine integration: initializes (evidence: `app/main.tsx`)
- React entry → Engine host: renders (evidence: `app/main.tsx`)
- Engine host → Voroforce runtime: hosts (evidence: `README.md`)
- Voroforce runtime → Poster lattice: arranges cells (evidence: `voroforce/voroforce.js`)
- Voroforce runtime → Force simulation: updates simulation (evidence: `voroforce/voroforce.js`)
- Voroforce runtime → WebGL renderer: updates display (evidence: `voroforce/voroforce.js`)
- Voroforce runtime → Interaction controls: updates controls (evidence: `voroforce/voroforce.js`)
- Voroforce runtime → Media loading: loads media (evidence: `voroforce/voroforce.js`)
- WebGL renderer → Media loading: receives media layers (evidence: `voroforce/display/scene/base-scene.js`)
- Interaction controls → Engine state: dispatches interactions
- Settings view → Browser preferences: persists preferences
- Engine configuration → Device adaptation: adapts device settings
- Favorites view → Film data state: uses saved films
