Skip to main content

Overview

The Video Workspace enables AI-driven video creation through a structured pipeline. When a project has type: "video", the workspace UI replaces the default trajectory/files tabs with Storyboard and Timeline panels, while the left-side chat orchestrates the generation flow using the Agent’s ReAct pattern.

Architecture

Pipeline Phases

Utility: resource-analyzer — triggered when user uploads reference files.

Storyboard Data Model

All tables defined in apps/web/src/db/schema/video.ts.

Frontend Components

Chat Cards (Pipeline Results)

State Management

videoStore.ts (Zustand) manages:
  • Storyboard data (elements, segments, shots, audio)
  • Timeline state (active shot, playhead position, playback)
  • Generation job tracking
  • quoteToChat() dispatches storyboard-quote events to ChatInput

SSE Events

Handled in stream-processor.ts → updates videoStore.

Backend

AI Backend Services

Web API Routes

Reference Mechanism

Users can reference storyboard items in chat using the quote button on any Element, Shot, or Audio card. This inserts a chip like [[ELEMENT:name|id]] into the chat input, which the Agent interprets to target specific items for modification.