# opencut-app/opencut architecture

> Architecture diagram of the GitHub repository opencut-app/opencut, 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/opencut-app/opencut
- Repository: https://github.com/opencut-app/opencut
- Video tour (about a minute): https://gitdiagram.com/opencut-app/opencut/video

## Overview

OpenCut is an in-progress rewrite of a video editor, not yet a complete editing workflow: the README describes future editor, plugin, cross-platform, AI, automation, and scripting capabilities, while the sampled desktop panels and web routes are largely scaffolding. The visible runtime path is web startup through routing to its routes, or desktop startup through the shell to editor panels. The API and media setup appear in the tree, but their behavior and connections are not established by the excerpts; future README capabilities are therefore not shown as implemented.

Main entry points: [`apps/desktop/src/shell.rs`](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/shell.rs) (Editor shell), [`apps/desktop/src/theme.rs`](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/theme.rs) (Desktop theme), [`apps/web/src/routeTree.gen.ts`](https://github.com/opencut-app/opencut/blob/main/apps/web/src/routeTree.gen.ts) (Route tree), [`apps/desktop/src/main.rs`](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/main.rs) (Desktop startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web app"]
  node_web_router["Web router<br/>[router.tsx]"]
  node_route_tree["Route tree<br/>[routeTree.gen.ts]"]
  node_root_route["Root document<br/>[__root.tsx]"]
  node_home_route["Home route<br/>[index.tsx]"]
  node_editor_route["Editor route<br/>[editor.tsx]"]
end

subgraph group_desktop["Desktop app"]
  node_desktop_entry["Desktop startup<br/>[main.rs]"]
  node_desktop_shell["Editor shell<br/>[shell.rs]"]
  node_browser_panel["Media browser<br/>[browser.rs]"]
  node_preview_panel["Preview panel<br/>[preview.rs]"]
  node_inspector_panel["Inspector panel<br/>[inspector.rs]"]
  node_timeline_panel["Timeline panel<br/>[timeline.rs]"]
end

subgraph group_ui["Interface components"]
  node_web_tooltip["Tooltip provider<br/>[tooltip.tsx]"]
  node_web_ui["Web UI library"]
  node_desktop_components["Desktop controls"]
  node_context_menu["Context menu<br/>[context_menu.rs]"]
  node_desktop_theme["Desktop theme<br/>[theme.rs]"]
end

subgraph group_services["Service entrypoints"]
  node_api_entry["API entrypoint<br/>[index.ts]"]
  node_media_setup["Media setup<br/>[setup.ts]"]
end

node_user(("User"))

node_user -.->|"opens app"| node_web_router
node_web_router -->|"loads routes"| node_route_tree
node_route_tree -->|"registers root"| node_root_route
node_route_tree -->|"registers route"| node_home_route
node_route_tree -->|"registers route"| node_editor_route
node_root_route -->|"wraps children"| node_web_tooltip
node_user -.->|"starts editor"| node_desktop_entry
node_desktop_entry -->|"creates shell"| node_desktop_shell
node_desktop_shell -->|"creates and renders"| node_browser_panel
node_desktop_shell -->|"creates and renders"| node_preview_panel
node_desktop_shell -->|"creates and renders"| node_inspector_panel
node_desktop_shell -->|"creates and renders"| node_timeline_panel
node_desktop_entry -->|"imports controls"| node_desktop_components
node_desktop_shell -->|"reads colors"| node_desktop_theme
node_browser_panel -->|"reads colors"| node_desktop_theme
node_preview_panel -->|"reads colors"| node_desktop_theme
node_context_menu -->|"reads theme"| node_desktop_theme
node_desktop_components -.->|"uses theme"| node_desktop_theme

click node_web_router "https://github.com/opencut-app/opencut/blob/main/apps/web/src/router.tsx"
click node_route_tree "https://github.com/opencut-app/opencut/blob/main/apps/web/src/routeTree.gen.ts"
click node_root_route "https://github.com/opencut-app/opencut/blob/main/apps/web/src/routes/__root.tsx"
click node_home_route "https://github.com/opencut-app/opencut/blob/main/apps/web/src/routes/index.tsx"
click node_editor_route "https://github.com/opencut-app/opencut/blob/main/apps/web/src/routes/editor.tsx"
click node_web_tooltip "https://github.com/opencut-app/opencut/blob/main/apps/web/src/components/ui/tooltip.tsx"
click node_web_ui "https://github.com/opencut-app/opencut/tree/main/apps/web/src/components/ui"
click node_desktop_entry "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/main.rs"
click node_desktop_shell "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/shell.rs"
click node_browser_panel "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/browser.rs"
click node_preview_panel "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/preview.rs"
click node_inspector_panel "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/inspector.rs"
click node_timeline_panel "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/timeline.rs"
click node_desktop_components "https://github.com/opencut-app/opencut/tree/main/apps/desktop/src/components"
click node_context_menu "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/components/context_menu.rs"
click node_desktop_theme "https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/theme.rs"
click node_api_entry "https://github.com/opencut-app/opencut/blob/main/apps/api/src/index.ts"
click node_media_setup "https://github.com/opencut-app/opencut/blob/main/crates/media/setup/setup.ts"

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_web_router,node_route_tree,node_root_route,node_home_route,node_editor_route,node_user toneBlue
class node_desktop_entry,node_desktop_shell,node_browser_panel,node_preview_panel,node_inspector_panel,node_timeline_panel toneAmber
class node_web_tooltip,node_web_ui,node_desktop_components,node_context_menu,node_desktop_theme toneMint
class node_api_entry,node_media_setup toneRose
```

## Components

### Web app

- [Web router](https://github.com/opencut-app/opencut/blob/main/apps/web/src/router.tsx): `apps/web/src/router.tsx`
- [Route tree](https://github.com/opencut-app/opencut/blob/main/apps/web/src/routeTree.gen.ts): `apps/web/src/routeTree.gen.ts`
- [Root document](https://github.com/opencut-app/opencut/blob/main/apps/web/src/routes/__root.tsx): `apps/web/src/routes/__root.tsx`
- [Home route](https://github.com/opencut-app/opencut/blob/main/apps/web/src/routes/index.tsx): `apps/web/src/routes/index.tsx`
- [Editor route](https://github.com/opencut-app/opencut/blob/main/apps/web/src/routes/editor.tsx): `apps/web/src/routes/editor.tsx`

### Desktop app

- [Desktop startup](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/main.rs): `apps/desktop/src/main.rs`
- [Editor shell](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/shell.rs): `apps/desktop/src/shell.rs`
- [Media browser](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/browser.rs): `apps/desktop/src/panels/browser.rs`
- [Preview panel](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/preview.rs): `apps/desktop/src/panels/preview.rs`
- [Inspector panel](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/inspector.rs): `apps/desktop/src/panels/inspector.rs`
- [Timeline panel](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/panels/timeline.rs): `apps/desktop/src/panels/timeline.rs`

### Interface components

- [Tooltip provider](https://github.com/opencut-app/opencut/blob/main/apps/web/src/components/ui/tooltip.tsx): `apps/web/src/components/ui/tooltip.tsx`
- [Web UI library](https://github.com/opencut-app/opencut/tree/main/apps/web/src/components/ui): `apps/web/src/components/ui`
- [Desktop controls](https://github.com/opencut-app/opencut/tree/main/apps/desktop/src/components): `apps/desktop/src/components`
- [Context menu](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/components/context_menu.rs): `apps/desktop/src/components/context_menu.rs`
- [Desktop theme](https://github.com/opencut-app/opencut/blob/main/apps/desktop/src/theme.rs): `apps/desktop/src/theme.rs`

### Service entrypoints

- [API entrypoint](https://github.com/opencut-app/opencut/blob/main/apps/api/src/index.ts): `apps/api/src/index.ts`
- [Media setup](https://github.com/opencut-app/opencut/blob/main/crates/media/setup/setup.ts): `crates/media/setup/setup.ts`

### Other components

- **User**

## Connections

- User → Web router: opens app
- Web router → Route tree: loads routes (evidence: `apps/web/src/router.tsx`)
- Route tree → Root document: registers root (evidence: `apps/web/src/routeTree.gen.ts`)
- Route tree → Home route: registers route (evidence: `apps/web/src/routeTree.gen.ts`)
- Route tree → Editor route: registers route (evidence: `apps/web/src/routeTree.gen.ts`)
- Root document → Tooltip provider: wraps children (evidence: `apps/web/src/routes/__root.tsx`)
- User → Desktop startup: starts editor
- Desktop startup → Editor shell: creates shell (evidence: `apps/desktop/src/main.rs`)
- Editor shell → Media browser: creates and renders (evidence: `apps/desktop/src/shell.rs`)
- Editor shell → Preview panel: creates and renders (evidence: `apps/desktop/src/shell.rs`)
- Editor shell → Inspector panel: creates and renders (evidence: `apps/desktop/src/shell.rs`)
- Editor shell → Timeline panel: creates and renders (evidence: `apps/desktop/src/shell.rs`)
- Desktop startup → Desktop controls: imports controls (evidence: `apps/desktop/src/main.rs`)
- Editor shell → Desktop theme: reads colors (evidence: `apps/desktop/src/shell.rs`)
- Media browser → Desktop theme: reads colors (evidence: `apps/desktop/src/panels/browser.rs`)
- Preview panel → Desktop theme: reads colors (evidence: `apps/desktop/src/panels/preview.rs`)
- Context menu → Desktop theme: reads theme (evidence: `apps/desktop/src/components/context_menu.rs`)
- Desktop controls → Desktop theme: uses theme (evidence: `apps/desktop/src/components/context_menu.rs`)
