Video Studio SDKv0.0.3
Core

Core overview

How the editor is put together — the bundle that is the source of truth, the store that holds state, the commands that mutate it, the timeline, and the event bus.

The Core layer is the SDK without any UI. Every editor surface — built-in or plugin-contributed — sits on top of these pieces:

ConceptWhat it is
Project bundleThe serializable JSON shape that fully describes a project. The "save file."
StoreA single Zustand + Immer instance holding StudioState. The runtime source of truth.
ContextsReact contexts that expose the store, the config, the icon map, and the plugin registry to the tree.
CommandsReversible mutations. Every undoable change is a Command pushed to a 100-entry history.
TimelineTracks, items, transitions, markers, regions, snap engine, invariants.
EventsA typed mitt bus for plugin and consumer communication.

These pages document each one in depth. Skim the table below to pick a starting point.

One end-to-end mental model

A user action flows through these pieces in order:

  1. The user clicks / drags / types in a UI surface.
  2. The surface calls a store action (e.g. addItem, moveItem, updateItemProperties).
  3. The action constructs a Command (execute + undo) and calls executeCommand.
  4. executeCommand runs execute(draft) inside Immer, pushes the command to the undo stack, clears the redo stack, sets project.isDirty = true.
  5. The store emits a typed event on the event bus.
  6. React components subscribed via useStudioStore(selector) re-render.
  7. Plugin code listening on the event bus runs side effects (analytics, autosave, etc.).
  8. The user clicks Save → the provider's onSave(bundle) runs → your backend persists the bundle.

Every page below is some slice of this flow. Read in the order above for a top-down tour, or jump to whichever piece you're working on.

On this page