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.Mapkeyed by random IDs. Ordering is maintained separately inY.Arraystructures. 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<StoredObject>)<br/>Objects"]
c["c (Y.Map<StoredContainer>)<br/>Containers"]
rt["rt (Y.Map<Y.Text>)<br/>Rich Texts"]
end
subgraph Hierarchy
r["r (Y.Array<ChildRef>)<br/>Root Children"]
ch["ch (Y.Map<Y.Array<ChildRef>>)<br/>Container Children"]
end
subgraph Presentation
v["v (Y.Map<StoredView>)<br/>Views"]
vo["vo (Y.Array<string>)<br/>View Order"]
m["m (Y.Map)<br/>Metadata"]
end
subgraph Styling
st["st (Y.Map<StoredStyle>)<br/>Styles"]
pl["pl (Y.Map<StoredPalette>)<br/>Palette"]
end
subgraph Templates
tpl["tpl (Y.Map<StoredTemplate>)<br/>Templates"]
tpo["tpo (Y.Map<Y.Array<string>>)<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
- Document Structure — Top-level CRDT maps, initialization, ID system, and metadata
- Object Types — All 14 object types with their fields and supporting types
- Containers and Hierarchy — Layers, groups, ChildRef system, and z-ordering
- Views — Slides/pages, ordering, backgrounds, and transitions
- Styling and Palette — Style cascade, shape/text styles, and palette system
- Templates and Prototypes — Reusable templates, snap guides, and prototype inheritance
- Export Format — JSON export envelope and serialization details
See Also
- CRDT Design Guide > Presentations — Generic collaboration patterns for presentation apps
- CRDT Design Guide > Style Inheritance — General style inheritance pattern