Prezillo format

Complete format specification for Prezillo, Cloudillo’s collaborative presentation editor.

Overview

Prezillo is a real-time collaborative presentation editor that supports slides, layers, groups, rich text, shapes, images, connectors, templates, a palette system, and style inheritance. Documents are stored as Yjs CRDT structures for conflict-free concurrent editing.

  • Content type: application/vnd.cloudillo.prezillo+json
  • Format version: 2.0.0
  • File extension: .prezillo

Design Philosophy

  • Compact field names: All stored types use short keys (t, xy, wh, si) to minimize CRDT sync overhead. This section documents the compact names directly — they map 1:1 to what you see in the code and on the wire.
  • Separate maps by purpose: Objects, containers, views, styles, and templates each get their own top-level Yjs shared type. This enables targeted observers, type-safe access, and efficient partial sync.
  • ID-based storage: All entities are stored in Y.Map keyed by random IDs. Ordering is maintained separately in Y.Array structures. This prevents the CRDT data-loss pitfall of storing complex objects directly in arrays.

Document Architecture

graph LR
    Doc[Y.Doc]

    subgraph Content
        o["o (Y.Map&lt;StoredObject&gt;)<br/>Objects"]
        c["c (Y.Map&lt;StoredContainer&gt;)<br/>Containers"]
        rt["rt (Y.Map&lt;Y.Text&gt;)<br/>Rich Texts"]
    end

    subgraph Hierarchy
        r["r (Y.Array&lt;ChildRef&gt;)<br/>Root Children"]
        ch["ch (Y.Map&lt;Y.Array&lt;ChildRef&gt;&gt;)<br/>Container Children"]
    end

    subgraph Presentation
        v["v (Y.Map&lt;StoredView&gt;)<br/>Views"]
        vo["vo (Y.Array&lt;string&gt;)<br/>View Order"]
        m["m (Y.Map)<br/>Metadata"]
    end

    subgraph Styling
        st["st (Y.Map&lt;StoredStyle&gt;)<br/>Styles"]
        pl["pl (Y.Map&lt;StoredPalette&gt;)<br/>Palette"]
    end

    subgraph Templates
        tpl["tpl (Y.Map&lt;StoredTemplate&gt;)<br/>Templates"]
        tpo["tpo (Y.Map&lt;Y.Array&lt;string&gt;&gt;)<br/>Template Prototypes"]
    end

    Doc --> Content
    Doc --> Hierarchy
    Doc --> Presentation
    Doc --> Styling
    Doc --> Templates

Quick Reference

Map Key Yjs Type Purpose
o Y.Map<StoredObject> All drawable objects (rects, text, images, connectors, etc.)
c Y.Map<StoredContainer> Layers and groups
r Y.Array<ChildRef> Root-level children (top-level layers/objects)
ch Y.Map<Y.Array<ChildRef>> Children arrays per container
v Y.Map<StoredView> Views (slides/pages) with dimensions and backgrounds
vo Y.Array<string> View ordering (presentation sequence)
m Y.Map Document metadata (name, default dimensions, grid settings)
rt Y.Map<Y.Text> Rich text content for text objects (Quill Delta format)
st Y.Map<StoredStyle> Global style definitions (shape and text styles)
pl Y.Map<StoredPalette> Color palette (single entry keyed by 'default')
tpl Y.Map<StoredTemplate> Templates (background, dimensions, snap guides)
tpo Y.Map<Y.Array<string>> Template prototype objects: templateId → objectId array

Detailed Documentation

See Also