How rakesh0x/opencardboard works
Cutboard is a local-first desktop video editor whose main workflow runs from project creation and media import through local footage analysis, chat- or MCP-driven timeline edits, preview, and export. The main process owns project state and persists edits as operations, while the renderer provides the editing interface. The graph includes documented analysis and editing capabilities even where implementation excerpts were not supplied; those less-visible links are cited to the README rather than presented as source-verified calls.
Main entry points: registry.ts Typed tool registry · project-service.ts Project service · store.ts Editor state · asset-service.ts Media ingest
Components 25
Desktop editing
- Editor interface
apps/desktop/src/renderer/App.tsx - Editor state
apps/desktop/src/renderer/store.ts - Typed IPC bridge
apps/desktop/src/preload/index.ts - Main IPC
apps/desktop/src/main/ipc.ts
Project and media
- Project service
apps/desktop/src/main/project-service.ts - SQLite state
apps/desktop/src/main/db.ts - Media ingest
apps/desktop/src/main/asset-service.ts - Background jobs
apps/desktop/src/main/jobs.ts
Agent and analysis
- Footage analysis
apps/desktop/src/main/analysis - Transcript and scene search
apps/desktop/src/main/analysis/search.ts - Agent runtime
apps/desktop/src/main/agent/chat.ts - Typed tool registry
packages/tools/src/registry.ts - Editing tools
packages/tools/src/tools/edit.ts - Beat-sync tools
packages/tools/src/tools/beat.ts - Reference tools
packages/tools/src/tools/reference.ts - Motion tools
packages/tools/src/tools/motion.ts
Timeline and rendering
- Timeline data model
packages/schema/src/item.ts - Operation engine
packages/editor-core/src/apply.ts - Timeline preview
apps/desktop/src/renderer/editor/PreviewPane.tsx - Canvas compositor
packages/renderer/src/compositor.ts
Export and integrations
- MCP server
apps/desktop/src/main/mcp-server.ts - Video export
apps/desktop/src/main/export-service.ts - Local media tools
apps/desktop/src/main/ffmpeg.ts
Other components
- Editor user
- External MCP client
Connections 30
- Editor user → Editor interface: edits in
- Editor interface → Editor state: loads state
apps/desktop/src/renderer/App.tsx - Editor state → Typed IPC bridge: calls IPC
- Typed IPC bridge → Main IPC: routes requests
- Main IPC → Project service: dispatches project actions
- Project service → SQLite state: reads and writes
apps/desktop/src/main/project-service.ts - Project service → Operation engine: applies operations
apps/desktop/src/main/project-service.ts - Project service → Timeline data model: validates project data
apps/desktop/src/main/project-service.ts - Operation engine → Timeline data model: validates timeline
packages/editor-core/src/apply.ts - Editor state → Operation engine: uses timeline operations
apps/desktop/src/renderer/store.ts - Editor interface → Media ingest: imports media
- Media ingest → SQLite state: stores asset metadata
apps/desktop/src/main/asset-service.ts - Media ingest → Background jobs: schedules analysis
apps/desktop/src/main/asset-service.ts - Media ingest → Footage analysis: analyzes imported media
apps/desktop/src/main/asset-service.ts - Footage analysis → Transcript and scene search: indexes descriptions
apps/desktop/src/main/asset-service.ts - Transcript and scene search → SQLite state: queries indexed data
apps/desktop/src/main/analysis/search.ts - Editor state → Agent runtime: sends chat requests
- Agent runtime → Typed tool registry: invokes tools
- External MCP client → MCP server: sends tool requests
- MCP server → Typed tool registry: shares catalog
- Typed tool registry → Editing tools: dispatches edits
packages/tools/src/tools/edit.ts - Typed tool registry → Beat-sync tools: dispatches beat edits
- Typed tool registry → Reference tools: dispatches analysis
- Typed tool registry → Motion tools: dispatches compositions
- Editing tools → Project service: applies timeline changes
- Editor state → Timeline preview: supplies edit state
apps/desktop/src/renderer/editor/PreviewPane.tsx - Timeline preview → Canvas compositor: renders frames
apps/desktop/src/renderer/editor/PreviewPane.tsx - Video export → Project service: reads project timeline
apps/desktop/src/main/export-service.ts - Video export → Canvas compositor: renders export frames
- Video export → Local media tools: encodes output
apps/desktop/src/main/export-service.ts