# glanderness/beeftv architecture

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

- Interactive diagram: https://gitdiagram.com/glanderness/beeftv
- Repository: https://github.com/glanderness/beeftv

## Overview

BeefTV is a local-first, AI-native video creation workspace centered on a connected canvas. The main workflow is to organize ideas and reference media in a project, send prompts or media through configured model channels and creative tools, then reuse and refine the resulting text, images, video, audio, or storyboards. The graph also captures documented project/asset management, plugin extensibility, and AI art critique. README statements support the broad product flow; sampled source gives direct evidence for critique-stage calls, while most backend wiring was not sampled.

Main entry points: [`web/src/components/canvas/infinite-canvas.tsx`](https://github.com/glanderness/beeftv/blob/main/web/src/components/canvas/infinite-canvas.tsx) (Creative canvas), [`backend/internal/task/service.go`](https://github.com/glanderness/beeftv/blob/main/backend/internal/task/service.go) (Async tasks), [`web/src/lib/art-critique/pipeline.ts`](https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/pipeline.ts) (Art critique), [`backend/internal/handler/routes.go`](https://github.com/glanderness/beeftv/blob/main/backend/internal/handler/routes.go) (Backend API)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_canvas["Canvas creation"]
  node_canvas_ui["Creative canvas"]
  node_canvas_links["Canvas connections"]
  node_art_critique["Art critique<br/>[pipeline.ts]"]
  node_critique_review["Critique review<br/>[review.ts]"]
  node_critique_rubrics["Critique rubrics<br/>[rubrics.ts]"]
  node_critique_annotation["Critique annotations<br/>[annotation.ts]"]
end

subgraph group_generation["Generation runtime"]
  node_task_runtime["Async tasks<br/>[service.go]"]
  node_generation_registry["Generation registry<br/>[registry.go]"]
  node_model_routing["Model routing<br/>[model_router.go]"]
  node_providers["Model providers<br/>[registry.go]"]
end

subgraph group_workspace["Workspace data"]
  node_projects["Projects and workflow<br/>[service.go]"]
  node_assets["Asset library<br/>[service.go]"]
  node_storage[("Workspace storage<br/>[repository.go]")]
end

subgraph group_extensions["Tools and extensions"]
  node_protocols["Provider protocols<br/>[registry.go]"]
  node_plugins["Plugins<br/>[plugin-types.ts]"]
end

subgraph group_operations["App runtime"]
  node_backend_api["Backend API<br/>[routes.go]"]
  node_desktop["Desktop runtime<br/>[app.go]"]
end

node_creator(("Creator"))
node_ai_service{{"Configured AI service"}}

node_creator -->|"creates in"| node_canvas_ui
node_canvas_ui -->|"organizes with"| node_canvas_links
node_canvas_ui -->|"works in"| node_projects
node_canvas_ui -->|"requests critique"| node_art_critique
node_art_critique -->|"builds prompts"| node_critique_rubrics
node_critique_review -->|"validates targets"| node_critique_annotation
node_art_critique -->|"requests analysis"| node_ai_service
node_canvas_ui -->|"starts generation"| node_task_runtime
node_task_runtime -->|"uses channels"| node_model_routing
node_model_routing -.->|"routes requests"| node_providers
node_providers -.->|"adapts protocols"| node_protocols
node_task_runtime -->|"produces media"| node_assets
node_projects -->|"persists workspace"| node_storage
node_assets -->|"stores assets"| node_storage
node_canvas_ui -.->|"uses extensions"| node_plugins
node_creator -->|"opens workspace"| node_desktop
node_desktop -.->|"serves workspace"| node_backend_api
node_backend_api -.->|"handles project actions"| node_projects
node_backend_api -.->|"handles task actions"| node_task_runtime

click node_canvas_ui "https://github.com/glanderness/beeftv/blob/main/web/src/components/canvas/infinite-canvas.tsx"
click node_canvas_links "https://github.com/glanderness/beeftv/blob/main/web/src/pages/canvas/use-canvas-connection-controller.ts"
click node_art_critique "https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/pipeline.ts"
click node_critique_review "https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/review.ts"
click node_critique_rubrics "https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/rubrics.ts"
click node_critique_annotation "https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/annotation.ts"
click node_projects "https://github.com/glanderness/beeftv/blob/main/backend/internal/project/service.go"
click node_assets "https://github.com/glanderness/beeftv/blob/main/backend/internal/asset/service.go"
click node_storage "https://github.com/glanderness/beeftv/blob/main/backend/internal/repository/repository.go"
click node_task_runtime "https://github.com/glanderness/beeftv/blob/main/backend/internal/task/service.go"
click node_generation_registry "https://github.com/glanderness/beeftv/blob/main/backend/internal/generation/registry.go"
click node_model_routing "https://github.com/glanderness/beeftv/blob/main/backend/internal/app/model_router.go"
click node_providers "https://github.com/glanderness/beeftv/blob/main/backend/internal/provider/registry.go"
click node_protocols "https://github.com/glanderness/beeftv/blob/main/backend/internal/protocol/registry.go"
click node_plugins "https://github.com/glanderness/beeftv/blob/main/web/src/lib/plugins/plugin-types.ts"
click node_backend_api "https://github.com/glanderness/beeftv/blob/main/backend/internal/handler/routes.go"
click node_desktop "https://github.com/glanderness/beeftv/blob/main/backend/cmd/desktop/app.go"

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_canvas_ui,node_canvas_links,node_art_critique,node_critique_review,node_critique_rubrics,node_critique_annotation toneBlue
class node_task_runtime,node_generation_registry,node_model_routing,node_providers toneAmber
class node_projects,node_assets,node_storage toneMint
class node_protocols,node_plugins toneRose
class node_backend_api,node_desktop,node_creator,node_ai_service toneIndigo
```

## Components

### Canvas creation

- [Creative canvas](https://github.com/glanderness/beeftv/blob/main/web/src/components/canvas/infinite-canvas.tsx): `web/src/components/canvas/infinite-canvas.tsx`
- [Canvas connections](https://github.com/glanderness/beeftv/blob/main/web/src/pages/canvas/use-canvas-connection-controller.ts): `web/src/pages/canvas/use-canvas-connection-controller.ts`
- [Art critique](https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/pipeline.ts): `web/src/lib/art-critique/pipeline.ts`
- [Critique review](https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/review.ts): `web/src/lib/art-critique/review.ts`
- [Critique rubrics](https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/rubrics.ts): `web/src/lib/art-critique/rubrics.ts`
- [Critique annotations](https://github.com/glanderness/beeftv/blob/main/web/src/lib/art-critique/annotation.ts): `web/src/lib/art-critique/annotation.ts`

### Generation runtime

- [Async tasks](https://github.com/glanderness/beeftv/blob/main/backend/internal/task/service.go): `backend/internal/task/service.go`
- [Generation registry](https://github.com/glanderness/beeftv/blob/main/backend/internal/generation/registry.go): `backend/internal/generation/registry.go`
- [Model routing](https://github.com/glanderness/beeftv/blob/main/backend/internal/app/model_router.go): `backend/internal/app/model_router.go`
- [Model providers](https://github.com/glanderness/beeftv/blob/main/backend/internal/provider/registry.go): `backend/internal/provider/registry.go`

### Workspace data

- [Projects and workflow](https://github.com/glanderness/beeftv/blob/main/backend/internal/project/service.go): `backend/internal/project/service.go`
- [Asset library](https://github.com/glanderness/beeftv/blob/main/backend/internal/asset/service.go): `backend/internal/asset/service.go`
- [Workspace storage](https://github.com/glanderness/beeftv/blob/main/backend/internal/repository/repository.go): `backend/internal/repository/repository.go`

### Tools and extensions

- [Provider protocols](https://github.com/glanderness/beeftv/blob/main/backend/internal/protocol/registry.go): `backend/internal/protocol/registry.go`
- [Plugins](https://github.com/glanderness/beeftv/blob/main/web/src/lib/plugins/plugin-types.ts): `web/src/lib/plugins/plugin-types.ts`

### App runtime

- [Backend API](https://github.com/glanderness/beeftv/blob/main/backend/internal/handler/routes.go): `backend/internal/handler/routes.go`
- [Desktop runtime](https://github.com/glanderness/beeftv/blob/main/backend/cmd/desktop/app.go): `backend/cmd/desktop/app.go`

### Other components

- **Creator**
- **Configured AI service**

## Connections

- Creator → Creative canvas: creates in (evidence: `README.md`)
- Creative canvas → Canvas connections: organizes with (evidence: `README.md`)
- Creative canvas → Projects and workflow: works in (evidence: `README.md`)
- Creative canvas → Art critique: requests critique (evidence: `README.md`)
- Art critique → Critique rubrics: builds prompts (evidence: `web/src/lib/art-critique/pipeline.ts`)
- Critique review → Critique annotations: validates targets (evidence: `web/src/lib/art-critique/review.ts`)
- Art critique → Configured AI service: requests analysis (evidence: `web/src/lib/art-critique/pipeline.ts`)
- Creative canvas → Async tasks: starts generation (evidence: `README.md`)
- Async tasks → Model routing: uses channels (evidence: `README.md`)
- Model routing → Model providers: routes requests
- Model providers → Provider protocols: adapts protocols
- Async tasks → Asset library: produces media (evidence: `README.md`)
- Projects and workflow → Workspace storage: persists workspace (evidence: `README.md`)
- Asset library → Workspace storage: stores assets (evidence: `README.md`)
- Creative canvas → Plugins: uses extensions
- Creator → Desktop runtime: opens workspace (evidence: `README.md`)
- Desktop runtime → Backend API: serves workspace
- Backend API → Projects and workflow: handles project actions
- Backend API → Async tasks: handles task actions
