Data management

Manage state, history, multiplayer presence, and schema migrations with tldraw’s type-safe data management system.

Key features

Key features

Key features

Key features

Reactive store

Keep UI, computed values, and business logic in sync by leveraging tldraw’s reactive data layer, which instantly propagates changes without manual state management.

Reactive store

Keep UI, computed values, and business logic in sync by leveraging tldraw’s reactive data layer, which instantly propagates changes without manual state management.

Reactive store

Keep UI, computed values, and business logic in sync by leveraging tldraw’s reactive data layer, which instantly propagates changes without manual state management.

Reactive store

Keep UI, computed values, and business logic in sync by leveraging tldraw’s reactive data layer, which instantly propagates changes without manual state management.

Type safety

Define data with an enumerated set of valid records, each with strict types, including branded types that catch errors before they reach production.

Type safety

Define data with an enumerated set of valid records, each with strict types, including branded types that catch errors before they reach production.

Type safety

Define data with an enumerated set of valid records, each with strict types, including branded types that catch errors before they reach production.

Type safety

Define data with an enumerated set of valid records, each with strict types, including branded types that catch errors before they reach production.

History and undo/redo

Implement undo/redo functionality with built-in change tracking of configurable length. Every modification is a reversible operation that can be batched.

History and undo/redo

Implement undo/redo functionality with built-in change tracking of configurable length. Every modification is a reversible operation that can be batched.

History and undo/redo

Implement undo/redo functionality with built-in change tracking of configurable length. Every modification is a reversible operation that can be batched.

History and undo/redo

Implement undo/redo functionality with built-in change tracking of configurable length. Every modification is a reversible operation that can be batched.

Collaboration ready

Add multiplayer features in minutes with built-in simultaneous editing powered by tldraw’s collaboration system, which uses intelligent conflict resolution and data scoping.

Collaboration ready

Add multiplayer features in minutes with built-in simultaneous editing powered by tldraw’s collaboration system, which uses intelligent conflict resolution and data scoping.

Collaboration ready

Add multiplayer features in minutes with built-in simultaneous editing powered by tldraw’s collaboration system, which uses intelligent conflict resolution and data scoping.

Collaboration ready

Add multiplayer features in minutes with built-in simultaneous editing powered by tldraw’s collaboration system, which uses intelligent conflict resolution and data scoping.

Asset management

Handle large uploads and media files with advanced optimization, deduplication, and pluggable storage backends. Perfect for handling images, videos, and user-generated content.

Asset management

Handle large uploads and media files with advanced optimization, deduplication, and pluggable storage backends. Perfect for handling images, videos, and user-generated content.

Asset management

Handle large uploads and media files with advanced optimization, deduplication, and pluggable storage backends. Perfect for handling images, videos, and user-generated content.

Asset management

Handle large uploads and media files with advanced optimization, deduplication, and pluggable storage backends. Perfect for handling images, videos, and user-generated content.

Skip scaling headaches

Build data-driven canvas apps. let tldraw handle undo/redo, multiplayer, reactive updates, asset optimization.

Skip scaling headaches

Build data-driven canvas apps. let tldraw handle undo/redo, multiplayer, reactive updates, asset optimization.

Skip scaling headaches

Build data-driven canvas apps. let tldraw handle undo/redo, multiplayer, reactive updates, asset optimization.

Skip scaling headaches

Build data-driven canvas apps. let tldraw handle undo/redo, multiplayer, reactive updates, asset optimization.

Engineering details

Engineering details

Engineering details

Engineering details

Scoped data organization

The data system structures application state into three scopes (document, session, and presence), each with tailored persistence and synchronization strategies. The document scope stores core content that persists across sessions and syncs across all users. The session scope manages user-specific preferences and UI state that remain local to the browser. The presence scope tracks real-time awareness data, such as cursor positions, which update instantly but aren’t stored long term.

Scoped data organization

The data system structures application state into three scopes (document, session, and presence), each with tailored persistence and synchronization strategies. The document scope stores core content that persists across sessions and syncs across all users. The session scope manages user-specific preferences and UI state that remain local to the browser. The presence scope tracks real-time awareness data, such as cursor positions, which update instantly but aren’t stored long term.

Scoped data organization

The data system structures application state into three scopes (document, session, and presence), each with tailored persistence and synchronization strategies. The document scope stores core content that persists across sessions and syncs across all users. The session scope manages user-specific preferences and UI state that remain local to the browser. The presence scope tracks real-time awareness data, such as cursor positions, which update instantly but aren’t stored long term.

Scoped data organization

The data system structures application state into three scopes (document, session, and presence), each with tailored persistence and synchronization strategies. The document scope stores core content that persists across sessions and syncs across all users. The session scope manages user-specific preferences and UI state that remain local to the browser. The presence scope tracks real-time awareness data, such as cursor positions, which update instantly but aren’t stored long term.

Reactive state management

All data operations use reactive signals that automatically propagate changes to dependent components and computed values. When records change, the system identifies affected parts of the application and updates them efficiently without manual subscription management. This eliminates common state synchronization bugs and reduces boilerplate code while maintaining predictable update patterns throughout the application lifecycle.

Reactive state management

All data operations use reactive signals that automatically propagate changes to dependent components and computed values. When records change, the system identifies affected parts of the application and updates them efficiently without manual subscription management. This eliminates common state synchronization bugs and reduces boilerplate code while maintaining predictable update patterns throughout the application lifecycle.

Reactive state management

All data operations use reactive signals that automatically propagate changes to dependent components and computed values. When records change, the system identifies affected parts of the application and updates them efficiently without manual subscription management. This eliminates common state synchronization bugs and reduces boilerplate code while maintaining predictable update patterns throughout the application lifecycle.

Reactive state management

All data operations use reactive signals that automatically propagate changes to dependent components and computed values. When records change, the system identifies affected parts of the application and updates them efficiently without manual subscription management. This eliminates common state synchronization bugs and reduces boilerplate code while maintaining predictable update patterns throughout the application lifecycle.

Migration and schema evolution

The migration system ensures backward compatibility when loading data created with older schema versions. Each data snapshot includes version metadata that triggers automatic migration sequences during deserialization. Migrations apply transformations sequentially with comprehensive validation, enabling applications to evolve their data structures while preserving existing user content and maintaining data integrity across version boundaries.

Migration and schema evolution

The migration system ensures backward compatibility when loading data created with older schema versions. Each data snapshot includes version metadata that triggers automatic migration sequences during deserialization. Migrations apply transformations sequentially with comprehensive validation, enabling applications to evolve their data structures while preserving existing user content and maintaining data integrity across version boundaries.

Migration and schema evolution

The migration system ensures backward compatibility when loading data created with older schema versions. Each data snapshot includes version metadata that triggers automatic migration sequences during deserialization. Migrations apply transformations sequentially with comprehensive validation, enabling applications to evolve their data structures while preserving existing user content and maintaining data integrity across version boundaries.

Migration and schema evolution

The migration system ensures backward compatibility when loading data created with older schema versions. Each data snapshot includes version metadata that triggers automatic migration sequences during deserialization. Migrations apply transformations sequentially with comprehensive validation, enabling applications to evolve their data structures while preserving existing user content and maintaining data integrity across version boundaries.

Asset storage and optimization

tldraw handles large files through pluggable storage backends with intelligent optimization for different contexts. Upload workflows include automatic validation, deduplication through content hashing, and temporary preview generation for immediate user feedback. The system supports dynamic image resizing based on viewport requirements, format optimization for modern browsers, and network-aware quality adjustments to balance performance with visual fidelity across different connection speeds.

Asset storage and optimization

tldraw handles large files through pluggable storage backends with intelligent optimization for different contexts. Upload workflows include automatic validation, deduplication through content hashing, and temporary preview generation for immediate user feedback. The system supports dynamic image resizing based on viewport requirements, format optimization for modern browsers, and network-aware quality adjustments to balance performance with visual fidelity across different connection speeds.

Asset storage and optimization

tldraw handles large files through pluggable storage backends with intelligent optimization for different contexts. Upload workflows include automatic validation, deduplication through content hashing, and temporary preview generation for immediate user feedback. The system supports dynamic image resizing based on viewport requirements, format optimization for modern browsers, and network-aware quality adjustments to balance performance with visual fidelity across different connection speeds.

Asset storage and optimization

tldraw handles large files through pluggable storage backends with intelligent optimization for different contexts. Upload workflows include automatic validation, deduplication through content hashing, and temporary preview generation for immediate user feedback. The system supports dynamic image resizing based on viewport requirements, format optimization for modern browsers, and network-aware quality adjustments to balance performance with visual fidelity across different connection speeds.

Multiplayer starter kit

Self-hosted tldraw with real-time multiplayer collaboration built with Cloudflare Durable Objects. Production-ready backend that handles WebSocket connections, automatic persistence, and asset management. The same architecture that powers hundreds of thousands of collaborative sessions on tldraw.com.

Agent starter kit

Give your AI agents visual superpowers. Allow them to read drawings, generate diagrams, and interact with canvas elements just like human users. You handle the AI integration, tldraw handles the complex canvas interactions, shape recognition, and visual rendering.

Multiplayer starter kit

Self-hosted tldraw with real-time multiplayer collaboration built with Cloudflare Durable Objects. Production-ready backend that handles WebSocket connections, automatic persistence, and asset management. The same architecture that powers hundreds of thousands of collaborative sessions on tldraw.com.

Agent starter kit

Give your AI agents visual superpowers. Allow them to read drawings, generate diagrams, and interact with canvas elements just like human users. You handle the AI integration, tldraw handles the complex canvas interactions, shape recognition, and visual rendering.

Examples

Examples

Examples

Examples

Ready to grow with you

Let tldraw handle multiplayer, undo/redo, updates, and more.

Ready to grow with you

Let tldraw handle multiplayer, undo/redo, updates, and more.

Ready to grow with you

Let tldraw handle multiplayer, undo/redo, updates, and more.

Ready to grow with you

Let tldraw handle multiplayer, undo/redo, updates, and more.

Product

Developers

Resources

Product

Developers

Resources

Product

Developers

Resources

Product

Developers

Resources