Application Types

Specific design guidance for different types of collaborative documents.

Overview

Different application types have different data structure needs. A text editor has very different requirements from a spreadsheet or drawing canvas. This section provides tailored guidance for each category.

Application Categories

  • Text Editors - Rich text with Y.Text and editor bindings
  • Spreadsheets - 2D grids with cells, rows, and columns (Calcillo patterns)
  • Canvas Apps - Drawing and whiteboard applications (Ideallo patterns)
  • Presentations - Slide-based documents with containers and views (Prezillo patterns)

Choosing the Right Approach

Application Type Primary Data Structure Key Pattern
Text editor Y.Text Editor binding (Quill, ProseMirror)
Spreadsheet Y.Map of cells ID-based cells, ordered rows/columns
Canvas/Whiteboard Y.Map of objects Separate content maps by type
Presentations Y.Map of containers Style inheritance, templates

Common Themes

Despite their differences, all collaborative applications share these needs:

  1. Stable references - Use IDs, not indices, to reference other elements
  2. Separate ordering from content - Store order in arrays, content in maps
  3. Batch changes - Use transactions to group related modifications
  4. Local state separation - Keep UI state (selection, scroll) out of the CRDT

Each application type page shows how to apply these principles to that specific domain.