Skip to content

Project Schema

InkyCut projects are represented as JSON objects that contain all the data needed to recreate and render video compositions. This schema is designed to be simple, extensible, and compatible with open-source rendering engines.

Project Structure

A project consists of multiple pages (scenes), each containing elements (text, images, videos) with positioning, styling, and animation properties.

{
"id": "project-123",
"name": "My Video",
"createdAt": "2025-01-01T00:00:00.000Z",
"updatedAt": "2025-01-01T12:00:00.000Z",
"propertiesEnabled": true,
"composition": {
"fps": 30,
"width": 1920,
"height": 1080,
"pages": [
{
"id": "page-1",
"name": "Intro",
"duration": 5000,
"backgroundColor": "#1e3a8a",
"elements": [
{
"id": "text-1",
"type": "text",
"left": 100,
"top": 200,
"width": 800,
"height": 100,
"text": "Welcome to InkyCut",
"fontSize": 48,
"color": "#ffffff",
"fontWeight": "bold",
"textAlign": "center",
"animation": {
"props": { "scale": [1, 1.2] },
"duration": 1000,
"ease": "easeInOut",
"alternate": true,
"loop": true,
"autoplay": true
}
}
]
}
]
},
"appState": {
"selectedElementId": null,
"selectedPageId": "page-1",
"viewMode": "edit",
"zoomLevel": 1,
"showGrid": false,
"isLoading": false,
"error": null,
"history": {
"past": [],
"future": []
}
},
"files": [
{
"id": "file-1",
"name": "logo.png",
"type": "image/png",
"size": 12345,
"dataUrl": "data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAYAAAAfFcSJAAAADUlEQVR42mP8/5+hHgAHggJ/PchI7wAAAABJRU5ErkJggg==",
"createdAt": "2025-01-01T00:00:00.000Z"
}
],
"metadata": {
"timeline": [],
"version": "1.0"
}
}

Schema Reference

Project

The root object representing a complete video editing project.

PropertyTypeDescriptionRequired
idstringUnique identifier for the project
namestringUser-assigned name of the project
createdAtstringISO timestamp when the project was created
updatedAtstringISO timestamp when the project was last updated
propertiesEnabledbooleanWhether properties panel is enabled
compositionCompositionDataThe actual video composition data
appStateAppStateCurrent application state for this project
filesLocalFile[]Local files stored in the project
metadataobjectOptional additional metadata

CompositionData

Contains the core video composition structure with pages and global settings.

PropertyTypeDescriptionRequired
pagesCompositionPage[]Array of all pages in the composition
fpsnumberFrames per second for the entire composition
widthnumberWidth of the composition canvas in pixels
heightnumberHeight of the composition canvas in pixels

CompositionPage

Represents a distinct section/scene in the composition. Each page contains its own set of elements and duration.

PropertyTypeDescriptionRequired
idstringUnique identifier for the page
namestringUser-friendly name for the page
durationnumberDuration of the page in milliseconds (defaults to 5000ms if not provided)
backgroundColorstringBackground color of the page (CSS color value)
elementsCompositionElement[]Array of elements that appear on this page

CompositionElement

Represents a visual element in the composition. Elements can be videos, images, text, or groups that are positioned and styled within the composition timeline.

Note for Group Elements: Child elements within a group use absolute positioning relative to the group container. The group automatically calculates its scale based on the natural bounds of its children versus the allocated group dimensions. Child elements maintain their original left/top/width/height values, and the entire group is scaled to fit within the specified group boundaries.

Note for Text Elements: For type: "text" elements, the actual rendered height is determined by the fontSize and width properties. When text wraps to multiple lines based on the available width, the height automatically adjusts accordingly. While the height property can be set in the element structure, it has no effect on the actual text rendering - the text will render at its natural height based on content and styling.

PropertyTypeDescriptionRequired
idstringUnique identifier for the element
type'video' | 'image' | 'text' | 'group'Type of element
leftnumberX position from left edge (in pixels)
topnumberY position from top edge (in pixels)
widthnumberElement width in pixels
heightnumberElement height in pixels
rotationnumberRotation angle in degrees (clockwise)
opacitynumberOpacity value from 0 (transparent) to 1 (fully visible)
zIndexnumberStack order - higher values appear above lower values
delaynumberDelay before element appears (in milliseconds)
srcstringSource URL for video or image elements
elementsCompositionElement[]Child elements for group elements (positioned absolutely within group container, auto-scaled to fit)
textstringContent of a text element
fontSizenumberFont size in pixels
fontFamilystringFont family name
colorstringText color in CSS format (hex, rgba, etc.)
fontWeightstringFont weight (bold, normal, etc.)
textAlign'left' | 'center' | 'right'Horizontal text alignment
isDraggingbooleanWhether element is currently being dragged by user
animationAnimationConfigAnimation configuration

AnimationConfig

Animation configuration compatible with anime.js for element animations.

PropertyTypeDescriptionRequired
propsRecord<string, any>Animation parameters (CSS properties, transforms, variables)
durationnumberAnimation duration in milliseconds
easestringAnimation easing function
delaynumberAnimation delay in milliseconds
alternatebooleanAnimation direction
loopboolean | numberAnimation loop settings
autoplaybooleanAuto-play animation

AppState

Represents the UI state of the application, including UI preferences, selections, and transient states.

PropertyTypeDescriptionRequired
selectedElementIdstring | nullID of the currently selected element
selectedPageIdstring | nullID of the currently selected page
viewMode'edit' | 'preview'Current view mode
zoomLevelnumberCurrent zoom level of the canvas (1 = 100%)
showGridbooleanWhether to show the alignment grid
isLoadingbooleanWhether the app is currently loading data
errorstring | nullError message if there’s a problem
historyobjectUndo/redo history for the project

LocalFile

Represents a file stored locally in the project. Files are stored as data URLs (base64 encoded).

PropertyTypeDescriptionRequired
idstringUnique identifier for the file
namestringOriginal filename
typestringMIME type of the file
sizenumberFile size in bytes
dataUrlstringData URL containing the file content
createdAtstringISO timestamp when file was added

Usage Examples

Creating a Simple Text Animation

{
"id": "text-fade-in",
"type": "text",
"left": 100,
"top": 200,
"width": 600,
"height": 80,
"text": "Hello World",
"fontSize": 36,
"color": "#ffffff",
"animation": {
"props": { "opacity": [0, 1] },
"duration": 1000,
"ease": "easeOutQuad",
"autoplay": true
}
}

Adding an Image with Scaling Animation

{
"id": "logo-bounce",
"type": "image",
"left": 400,
"top": 300,
"width": 200,
"height": 200,
"src": "/logo.png",
"animation": {
"props": { "scale": [0.8, 1.2, 1] },
"duration": 800,
"ease": "easeOutElastic",
"autoplay": true
}
}

Creating a Group Element with Child Elements

{
"id": "title-card",
"type": "group",
"left": 100,
"top": 100,
"width": 600,
"height": 200,
"elements": [
{
"id": "title-text",
"type": "text",
"left": 50,
"top": 20,
"width": 400,
"height": 60,
"text": "Welcome",
"fontSize": 48,
"color": "#ffffff",
"fontWeight": "bold"
},
{
"id": "subtitle-text",
"type": "text",
"left": 50,
"top": 100,
"width": 350,
"height": 40,
"text": "to InkyCut",
"fontSize": 32,
"color": "#cccccc"
}
],
"animation": {
"props": { "opacity": [0, 1] },
"duration": 1000,
"ease": "easeInOut",
"autoplay": true
}
}

In this example, the child elements have a natural width of 450px (400 + 50) and height of 140px (100 + 40). The group will automatically scale these elements to fit within the 600×200 group boundaries.*

See the example project here.

Rendering Compatibility

The schema prioritizes simplicity and extensibility, making it easy to add new element types and animation properties without breaking existing implementations.

InkyCut offers CLI and web-based rendering capability (under construction). We also welcome contributions to the open-source rendering engine, which can be used to visualize and export projects in various formats.