# satoshiinu2/esotereel architecture

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

- Interactive diagram: https://gitdiagram.com/satoshiinu2/esotereel
- Repository: https://github.com/satoshiinu2/esotereel

## Overview

Esotereel is an in-progress video editor with a Qt/C++ client and Rust core, connected through a C ABI and described as client-server. The user-facing path starts at the editor, passes through GUI state and requests, and reaches project commands; the GUI also presents timeline editing and GPU preview. Separate core capabilities include media decoding, rendering, and plugins. The index and excerpts establish some module references and startup calls, but do not expose the full request dispatch or rendering path, so those relationships are not inferred.

Main entry points: [`gui/src/ffi/ClientState.cpp`](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/ClientState.cpp) (Client state), [`gui/src/window/MainWindow.cpp`](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/window/MainWindow.cpp) (Main window), [`gui/src/main.cpp`](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/main.cpp) (App startup), [`guihlp/src/ffi`](https://github.com/satoshiinu2/esotereel/tree/master/guihlp/src/ffi) (Rust FFI)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Editor UI"]
  node_entry["App startup<br/>[main.cpp]"]
  node_window["Main window<br/>[MainWindow.cpp]"]
  node_timelineui["Timeline editor"]
  node_previewui["GPU preview"]
end

subgraph group_bridge["FFI Bridge"]
  node_client["Client state<br/>[ClientState.cpp]"]
  node_requestsui["GUI requests<br/>[Requests.cpp]"]
  node_projectffi["Project FFI<br/>[Project.cpp]"]
  node_helper["Rust FFI"]
  node_server["Internal server<br/>[InternalServer.cpp]"]
end

subgraph group_core["Core Services"]
  node_corestate["Core state<br/>[state.rs]"]
  node_corenetwork["Core networking<br/>[network.rs]"]
  node_corerequests["Request handling<br/>[requests.rs]"]
end

subgraph group_domain["Editing Domain"]
  node_commands["Project commands<br/>[commands.rs]"]
  node_history["Command history<br/>[history.rs]"]
  node_project["Project model"]
end

subgraph group_media["Media Extensions"]
  node_decode["Media decoding"]
  node_render["GPU rendering"]
  node_plugins["Plugin system<br/>[mod.rs]"]
  node_properties["Property schemas<br/>[mod.rs]"]
  node_registry["Plugin registry<br/>[registry.rs]"]
end

node_user(("Editor user"))

node_user -->|"edits in"| node_window
node_entry -->|"creates"| node_client
node_entry -->|"opens"| node_window
node_entry -->|"starts"| node_server
node_window -->|"uses"| node_requestsui
node_window -.->|"hosts"| node_timelineui
node_window -.->|"hosts"| node_previewui
node_client -->|"creates state"| node_helper
node_client -->|"starts network"| node_helper
node_client -->|"locks project"| node_projectffi
node_client -->|"provides"| node_requestsui
node_server -.->|"serves client"| node_client
node_helper -.->|"bridges state"| node_corestate
node_corerequests -.->|"dispatches"| node_commands
node_commands -->|"updates"| node_project
node_history -->|"tracks commands"| node_commands
node_plugins -->|"uses schemas"| node_properties
node_plugins -->|"registers"| node_registry
node_previewui -.->|"requests preview"| node_render
node_render -.->|"uses media frames"| node_decode

click node_entry "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/main.cpp"
click node_window "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/window/MainWindow.cpp"
click node_timelineui "https://github.com/satoshiinu2/esotereel/tree/master/gui/src/window/widget/timeline"
click node_previewui "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/window/widget/preview/GpuPreviewWidget.cpp"
click node_client "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/ClientState.cpp"
click node_requestsui "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/Requests.cpp"
click node_projectffi "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/project/Project.cpp"
click node_helper "https://github.com/satoshiinu2/esotereel/tree/master/guihlp/src/ffi"
click node_server "https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/InternalServer.cpp"
click node_corestate "https://github.com/satoshiinu2/esotereel/blob/master/core/src/state.rs"
click node_corenetwork "https://github.com/satoshiinu2/esotereel/blob/master/core/src/network.rs"
click node_corerequests "https://github.com/satoshiinu2/esotereel/blob/master/core/src/requests.rs"
click node_commands "https://github.com/satoshiinu2/esotereel/blob/master/core/src/project/commands.rs"
click node_history "https://github.com/satoshiinu2/esotereel/blob/master/core/src/project/history.rs"
click node_project "https://github.com/satoshiinu2/esotereel/tree/master/lib/src/project"
click node_decode "https://github.com/satoshiinu2/esotereel/tree/master/lib/src/decode"
click node_render "https://github.com/satoshiinu2/esotereel/tree/master/lib/src/render"
click node_plugins "https://github.com/satoshiinu2/esotereel/blob/master/lib/src/plugin/mod.rs"
click node_properties "https://github.com/satoshiinu2/esotereel/blob/master/lib/src/plugin/property/mod.rs"
click node_registry "https://github.com/satoshiinu2/esotereel/blob/master/lib/src/plugin/registry.rs"

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_entry,node_window,node_timelineui,node_previewui,node_user toneBlue
class node_client,node_requestsui,node_projectffi,node_helper,node_server toneAmber
class node_corestate,node_corenetwork,node_corerequests toneMint
class node_commands,node_history,node_project toneRose
class node_decode,node_render,node_plugins,node_properties,node_registry toneIndigo
```

## Components

### Editor UI

- [App startup](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/main.cpp): `gui/src/main.cpp`
- [Main window](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/window/MainWindow.cpp): `gui/src/window/MainWindow.cpp`
- [Timeline editor](https://github.com/satoshiinu2/esotereel/tree/master/gui/src/window/widget/timeline): `gui/src/window/widget/timeline`
- [GPU preview](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/window/widget/preview/GpuPreviewWidget.cpp): `gui/src/window/widget/preview/GpuPreviewWidget.cpp`

### FFI Bridge

- [Client state](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/ClientState.cpp): `gui/src/ffi/ClientState.cpp`
- [GUI requests](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/Requests.cpp): `gui/src/ffi/Requests.cpp`
- [Project FFI](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/project/Project.cpp): `gui/src/ffi/project/Project.cpp`
- [Rust FFI](https://github.com/satoshiinu2/esotereel/tree/master/guihlp/src/ffi): `guihlp/src/ffi`
- [Internal server](https://github.com/satoshiinu2/esotereel/blob/master/gui/src/ffi/InternalServer.cpp): `gui/src/ffi/InternalServer.cpp`

### Core Services

- [Core state](https://github.com/satoshiinu2/esotereel/blob/master/core/src/state.rs): `core/src/state.rs`
- [Core networking](https://github.com/satoshiinu2/esotereel/blob/master/core/src/network.rs): `core/src/network.rs`
- [Request handling](https://github.com/satoshiinu2/esotereel/blob/master/core/src/requests.rs): `core/src/requests.rs`

### Editing Domain

- [Project commands](https://github.com/satoshiinu2/esotereel/blob/master/core/src/project/commands.rs): `core/src/project/commands.rs`
- [Command history](https://github.com/satoshiinu2/esotereel/blob/master/core/src/project/history.rs): `core/src/project/history.rs`
- [Project model](https://github.com/satoshiinu2/esotereel/tree/master/lib/src/project): `lib/src/project`

### Media Extensions

- [Media decoding](https://github.com/satoshiinu2/esotereel/tree/master/lib/src/decode): `lib/src/decode`
- [GPU rendering](https://github.com/satoshiinu2/esotereel/tree/master/lib/src/render): `lib/src/render`
- [Plugin system](https://github.com/satoshiinu2/esotereel/blob/master/lib/src/plugin/mod.rs): `lib/src/plugin/mod.rs`
- [Property schemas](https://github.com/satoshiinu2/esotereel/blob/master/lib/src/plugin/property/mod.rs): `lib/src/plugin/property/mod.rs`
- [Plugin registry](https://github.com/satoshiinu2/esotereel/blob/master/lib/src/plugin/registry.rs): `lib/src/plugin/registry.rs`

### Other components

- **Editor user**

## Connections

- Editor user → Main window: edits in (evidence: `README.md`)
- App startup → Client state: creates (evidence: `gui/src/main.cpp`)
- App startup → Main window: opens (evidence: `gui/src/main.cpp`)
- App startup → Internal server: starts (evidence: `gui/src/main.cpp`)
- Main window → GUI requests: uses
- Main window → Timeline editor: hosts
- Main window → GPU preview: hosts
- Client state → Rust FFI: creates state (evidence: `gui/src/ffi/ClientState.cpp`)
- Client state → Rust FFI: starts network (evidence: `gui/src/ffi/ClientState.cpp`)
- Client state → Project FFI: locks project (evidence: `gui/src/ffi/ClientState.cpp`)
- Client state → GUI requests: provides (evidence: `gui/src/ffi/ClientState.cpp`)
- Internal server → Client state: serves client
- Rust FFI → Core state: bridges state
- Request handling → Project commands: dispatches
- Project commands → Project model: updates
- Command history → Project commands: tracks commands (evidence: `core/src/project/history.rs`)
- Plugin system → Property schemas: uses schemas (evidence: `lib/src/plugin/mod.rs`)
- Plugin system → Plugin registry: registers (evidence: `lib/src/plugin/mod.rs`)
- GPU preview → GPU rendering: requests preview
- GPU rendering → Media decoding: uses media frames
