# leon-thomm/ryven architecture

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

- Interactive diagram: https://gitdiagram.com/leon-thomm/ryven
- Repository: https://github.com/leon-thomm/ryven

## Overview

Ryven is a Python flow-based visual scripting editor and framework. Users configure a launch, load node packages, assemble nodes and connections in a Qt flow editor, and run the resulting graph; projects can also run headlessly through the console. The repository includes a reusable ryvencore Qt presentation layer, package/node APIs, example nodes, and node source inspection/editing tools. The README documents capabilities beyond the sampled code; edges for those branches are included only where documented, while unsampled implementation details are left out.

Main entry points: [`ryven-editor/ryven/gui/startup_dialog/StartupDialog.py`](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/startup_dialog/StartupDialog.py) (Startup Dialog), [`ryven-editor/ryven/gui/main_window.py`](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/main_window.py) (Editor Window), [`ryvencore-qt/ryvencore_qt/src/SessionGUI.py`](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/SessionGUI.py) (Session GUI), [`ryvencore-qt/ryvencore_qt/src/flows/FlowView.py`](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/FlowView.py) (Flow Canvas)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_launch["Launch and Projects"]
  node_startup["Startup Dialog<br/>[StartupDialog.py]"]
  node_config["Configuration<br/>[config.py]"]
  node_project_utils["Project Utilities<br/>[utils.py]"]
  node_main_window["Editor Window<br/>[main_window.py]"]
end

subgraph group_packages["Nodes and Packages"]
  node_package_loader["Package Loader<br/>[nodes_package.py]"]
  node_node_api["Node API<br/>[node_env.py]"]
  node_node_examples["Example Nodes<br/>[matrices.py]"]
end

subgraph group_editor["Qt Flow Editor"]
  node_session_gui["Session GUI<br/>[SessionGUI.py]"]
  node_design["Design and Themes<br/>[Design.py]"]
  node_flow_view["Flow Canvas<br/>[FlowView.py]"]
  node_node_view["Node Items<br/>[NodeItem.py]"]
  node_ports["Node Ports<br/>[PortItem.py]"]
  node_connections["Connections<br/>[ConnectionItem.py]"]
end

subgraph group_runtime["Execution and Tools"]
  node_core["ryvencore Session"]
  node_console["Headless Console<br/>[RyvenConsole.py]"]
  node_code_editor["Node Code Editor"]
  node_code_storage["Source Code Storage<br/>[codes_storage.py]"]
end

node_user(("User"))

node_user -->|"configures launch"| node_startup
node_startup -->|"reads settings"| node_config
node_startup -->|"selects packages"| node_package_loader
node_startup -.->|"launches editor"| node_main_window
node_main_window -->|"loads project"| node_core
node_main_window -.->|"hosts session UI"| node_session_gui
node_main_window -.->|"loads project data"| node_project_utils
node_package_loader -->|"loads node definitions"| node_node_api
node_node_examples -->|"uses node API"| node_node_api
node_session_gui -->|"creates session"| node_core
node_session_gui -->|"creates flow views"| node_flow_view
node_session_gui -->|"initializes design"| node_design
node_flow_view -->|"creates node items"| node_node_view
node_flow_view -->|"creates connections"| node_connections
node_node_view -->|"builds ports"| node_ports
node_connections -->|"reads port items"| node_ports
node_user -->|"builds graph"| node_flow_view
node_user -->|"runs headlessly"| node_console
node_console -.->|"loads graph"| node_core
node_user -.->|"edits node code"| node_code_editor
node_code_editor -->|"uses source cache"| node_code_storage
node_code_storage -->|"reads editor settings"| node_config

click node_startup "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/startup_dialog/StartupDialog.py"
click node_config "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/config.py"
click node_project_utils "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/utils.py"
click node_main_window "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/main_window.py"
click node_package_loader "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/packages/nodes_package.py"
click node_node_api "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/packages/node_env.py"
click node_node_examples "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/example_nodes/linalg/matrices.py"
click node_session_gui "https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/SessionGUI.py"
click node_design "https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/Design.py"
click node_flow_view "https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/FlowView.py"
click node_node_view "https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/nodes/NodeItem.py"
click node_ports "https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/nodes/PortItem.py"
click node_connections "https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/connections/ConnectionItem.py"
click node_console "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/RyvenConsole.py"
click node_code_editor "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/code_editor/CodePreviewWidget.py"
click node_code_storage "https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/code_editor/codes_storage.py"

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_startup,node_config,node_project_utils,node_main_window,node_user toneBlue
class node_package_loader,node_node_api,node_node_examples toneAmber
class node_session_gui,node_design,node_flow_view,node_node_view,node_ports,node_connections toneMint
class node_core,node_console,node_code_editor,node_code_storage toneRose
```

## Components

### Launch and Projects

- [Startup Dialog](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/startup_dialog/StartupDialog.py): `ryven-editor/ryven/gui/startup_dialog/StartupDialog.py`
- [Configuration](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/config.py): `ryven-editor/ryven/main/config.py`
- [Project Utilities](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/utils.py): `ryven-editor/ryven/main/utils.py`
- [Editor Window](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/main_window.py): `ryven-editor/ryven/gui/main_window.py`

### Nodes and Packages

- [Package Loader](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/packages/nodes_package.py): `ryven-editor/ryven/main/packages/nodes_package.py`
- [Node API](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/packages/node_env.py): `ryven-editor/ryven/main/packages/node_env.py`
- [Example Nodes](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/example_nodes/linalg/matrices.py): `ryven-editor/ryven/example_nodes/linalg/matrices.py`

### Qt Flow Editor

- [Session GUI](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/SessionGUI.py): `ryvencore-qt/ryvencore_qt/src/SessionGUI.py`
- [Design and Themes](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/Design.py): `ryvencore-qt/ryvencore_qt/src/Design.py`
- [Flow Canvas](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/FlowView.py): `ryvencore-qt/ryvencore_qt/src/flows/FlowView.py`
- [Node Items](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/nodes/NodeItem.py): `ryvencore-qt/ryvencore_qt/src/flows/nodes/NodeItem.py`
- [Node Ports](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/nodes/PortItem.py): `ryvencore-qt/ryvencore_qt/src/flows/nodes/PortItem.py`
- [Connections](https://github.com/leon-thomm/ryven/blob/master/ryvencore-qt/ryvencore_qt/src/flows/connections/ConnectionItem.py): `ryvencore-qt/ryvencore_qt/src/flows/connections/ConnectionItem.py`

### Execution and Tools

- **ryvencore Session**
- [Headless Console](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/main/RyvenConsole.py): `ryven-editor/ryven/main/RyvenConsole.py`
- [Node Code Editor](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/code_editor/CodePreviewWidget.py): `ryven-editor/ryven/gui/code_editor/CodePreviewWidget.py`
- [Source Code Storage](https://github.com/leon-thomm/ryven/blob/master/ryven-editor/ryven/gui/code_editor/codes_storage.py): `ryven-editor/ryven/gui/code_editor/codes_storage.py`

### Other components

- **User**

## Connections

- User → Startup Dialog: configures launch
- Startup Dialog → Configuration: reads settings (evidence: `ryven-editor/ryven/gui/startup_dialog/StartupDialog.py`)
- Startup Dialog → Package Loader: selects packages (evidence: `ryven-editor/ryven/gui/startup_dialog/StartupDialog.py`)
- Startup Dialog → Editor Window: launches editor
- Editor Window → ryvencore Session: loads project (evidence: `ryven-editor/ryven/gui/main_window.py`)
- Editor Window → Session GUI: hosts session UI (evidence: `ryven-editor/ryven/gui/main_window.py`)
- Editor Window → Project Utilities: loads project data (evidence: `ryven-editor/ryven/gui/main_window.py`)
- Package Loader → Node API: loads node definitions (evidence: `ryven-editor/ryven/main/packages/nodes_package.py`)
- Example Nodes → Node API: uses node API (evidence: `ryven-editor/ryven/example_nodes/linalg/matrices.py`)
- Session GUI → ryvencore Session: creates session (evidence: `ryvencore-qt/ryvencore_qt/src/SessionGUI.py`)
- Session GUI → Flow Canvas: creates flow views (evidence: `ryvencore-qt/ryvencore_qt/src/SessionGUI.py`)
- Session GUI → Design and Themes: initializes design (evidence: `ryvencore-qt/ryvencore_qt/src/SessionGUI.py`)
- Flow Canvas → Node Items: creates node items (evidence: `ryvencore-qt/ryvencore_qt/src/flows/FlowView.py`)
- Flow Canvas → Connections: creates connections (evidence: `ryvencore-qt/ryvencore_qt/src/flows/FlowView.py`)
- Node Items → Node Ports: builds ports (evidence: `ryvencore-qt/ryvencore_qt/src/flows/nodes/NodeItem.py`)
- Connections → Node Ports: reads port items (evidence: `ryvencore-qt/ryvencore_qt/src/flows/connections/ConnectionItem.py`)
- User → Flow Canvas: builds graph
- User → Headless Console: runs headlessly
- Headless Console → ryvencore Session: loads graph
- User → Node Code Editor: edits node code
- Node Code Editor → Source Code Storage: uses source cache (evidence: `ryven-editor/ryven/gui/code_editor/CodePreviewWidget.py`)
- Source Code Storage → Configuration: reads editor settings (evidence: `ryven-editor/ryven/gui/code_editor/codes_storage.py`)
