You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/architecture-patterns.mdx
+1-2Lines changed: 1 addition & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -259,7 +259,7 @@ In this pattern, Yorkie serves as the primary Source of Truth for your document
259
259
- All changes are automatically persisted in real-time
260
260
- Simplified architecture with single source of truth
261
261
262
-
> **How It Works:** Yorkie uses [CRDT (Conflict-free Replicated Data Types)](/docs/internals) to ensure automatic conflict resolution, enabling seamless real-time collaboration without manual conflict handling.
262
+
> **How It Works:** Yorkie uses CRDT (Conflict-free Replicated Data Types) to ensure automatic conflict resolution, enabling seamless real-time collaboration without manual conflict handling.
263
263
264
264
**Document Editing Flow:**
265
265
@@ -349,4 +349,3 @@ For more information about Yorkie's API and features:
349
349
-[Security Configuration](/docs/security) - Auth Webhook and access control
350
350
-[CLI](/docs/cli) - Command-line tools for project management
351
351
-[Glossary](/docs/glossary) - Key terminology and concepts
352
-
-[Internals](/docs/internals) - CRDT algorithms and design documents
Copy file name to clipboardExpand all lines: docs/index.mdx
+94-30Lines changed: 94 additions & 30 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,47 +5,111 @@ order: 10
5
5
6
6
## About Yorkie
7
7
8
-
Yorkie is an open-source document store that provides a suite of tools for building real-time collaborative applications like Google Docs and Figma. It includes a JSON-like Document based on Conflict-free Replicated Data Types(CRDTs), Presence, and auth webhook features to enable synchronous co-editing.
8
+
Yorkie is an open-source document store for building real-time collaborative applications. Think Google Docs, Figma, or any application where multiple users work together simultaneously - Yorkie provides the infrastructure to make that happen.
9
9
10
-
Unlike other libraries like AutoMerge and Yjs, Yorkie includes a full-stack solution with SDKs, Cloud or Self-Hosted Server, making it easier to implement co-editing capabilities in your application.
10
+
### What is Yorkie?
11
11
12
-
In the following sections, we will explore the structure and workings of Yorkie in more detail.
12
+
Yorkie is a comprehensive collaboration platform that handles the complex challenges of building real-time collaborative applications. It provides:
13
13
14
-
### Components
14
+
-[JSON-like Document](/docs/js-sdk#document) based on [Conflict-free Replicated Data Types (CRDTs)](/docs/glossary) for automatic conflict resolution
15
+
-[Presence](/docs/js-sdk#presence) tracking to show who's online and what they're doing
16
+
-[Channel](/docs/js-sdk#channel) for lightweight, real-time communication without data persistence
17
+
- Offline support with automatic synchronization when network is restored
15
18
16
-
Yorkie consists of four main components: Clients, Documents, Channels, and Server.
19
+
### Why Yorkie?
17
20
18
-
-[Client](/docs/js-sdk#client)s are the entities that communicate with the server. Changes made by documents can be synchronized with the server, allowing for real-time collaboration.
19
-
-[Document](/docs/js-sdk#document)s are the core data structures of Yorkie, based on Conflict-free Replicated Data Types(CRDTs). Documents are persisted in the database and support offline editing, making them ideal for collaborative applications that require data persistence.
20
-
-[Channel](/docs/js-sdk#channel)s provide lightweight, real-time communication for ephemeral data like presence tracking and message broadcasting. Unlike Documents, Channels are memory-only and do not persist data to the database.
21
-
-[Server](/docs/self-hosted-server) is the central hub of Yorkie, receiving changes from clients, storing them in the database, and propagating them to other clients who are subscribed to the same documents or channels.
21
+
Unlike other CRDT libraries like AutoMerge and Yjs that only provide data structures, Yorkie delivers a complete full-stack solution:
22
22
23
-
In addition, [Project](/docs/cli#project)s in Yorkie represent separate services or applications within the system. This allows for multiple independent projects to coexist within a single Yorkie installation.
23
+
- Client SDKs for [JavaScript](/docs/js-sdk), [React](/docs/getting-started/with-react), [Android](/docs/android-sdk), and [iOS](/docs/ios-sdk)
24
+
- Managed Cloud Service or [Self-Hosted Server](/docs/self-hosted-server) options
25
+
- Built-in Infrastructure for data persistence, synchronization, and scaling
26
+
-[Admin APIs](/docs/web-api) for server-side document management
27
+
-[Dashboard](https://yorkie.dev/dashboard) and [CLI](/docs/cli) for project management and monitoring
24
28
25
-
> Server can be used either in Cloud or Self-Hosted Server. <br/><br/> When using Yorkie in the cloud, you can access the API directly through the SDK without the need for server installation. For security reason, you can also build and operate a self-hosted Yorkie server.
29
+
This means you can focus on building your application's features instead of managing collaboration infrastructure.
30
+
31
+
### Core Components
32
+
33
+
Yorkie consists of four main components that work together to enable real-time collaboration:
34
+
35
+
-[Client](/docs/js-sdk#client) : The entry point for your application. Clients connect to the server, manage documents and channels, and handle synchronization automatically.
36
+
-[Document](/docs/js-sdk#document) : Persistent, collaborative data structures based on CRDTs. Documents are stored in the database, support offline editing, and automatically resolve conflicts when users edit simultaneously.
37
+
-[Channel](/docs/js-sdk#channel) : Lightweight, memory-only communication layer for ephemeral data. Perfect for presence tracking (who's online, cursor positions) and real-time message broadcasting.
38
+
-[Server](/docs/self-hosted-server) : The central hub that receives changes from clients, persists them to the database, and broadcasts updates to subscribed clients. Available as a managed cloud service or self-hosted.
39
+
40
+
Additionally, **[Projects](/docs/cli#project)** allow you to organize multiple independent applications within a single Yorkie installation, each with its own documents, channels, and clients. Learn more about key concepts in the [Glossary](/docs/glossary).
41
+
42
+
Yorkie offers flexibility in how you deploy:
43
+
-**Cloud**: Get started instantly with our managed service - no infrastructure setup required
44
+
-**Self-Hosted**: Full control over your data and infrastructure for security and compliance needs
26
45
27
46
### How it works
28
47
29
-
A high-level overview of Yorkie is as follows:
48
+
Here's a high-level overview of Yorkie's architecture:
30
49
50
+
```mermaid
51
+
graph LR
52
+
subgraph ClientA["Client A (Go)"]
53
+
DocA["Document D-1<br/>{ a: 1, b: {} }"]
54
+
end
55
+
56
+
subgraph ClientB["Client B (JS)"]
57
+
DocB["Document D-1<br/>{ a: 2, b: {} }"]
58
+
end
59
+
60
+
subgraph Dashboard["Dashboard or CLI"]
61
+
Query["Query Q-1<br/>P-1.find({a:2})"]
62
+
end
63
+
64
+
subgraph Server["Cloud or Self-Hosted Server"]
65
+
subgraph Project["Project p-1"]
66
+
DocServer["Document D-1<br/>{ a: 2, b: {} }"]
67
+
Channel["Channel C-1<br/>{ A, B }"]
68
+
end
69
+
end
70
+
71
+
subgraph DB["Database"]
72
+
DBChanges["Changes"]
73
+
DBSnapshots["Snapshots"]
74
+
end
75
+
76
+
DocA <-->|Changes| DocServer
77
+
DocB <-->|Changes| DocServer
78
+
Query <--->|Query| Project
79
+
Project <--> DBChanges
80
+
Project <--> DBSnapshots
31
81
```
32
-
Client "A" (Go) Cloud or Self-Hosted Server Database
The Yorkie system allows clients to have replicas of a document, representing an application model, on multiple devices. Each client can edit the document independently on their local devices, even when offline. When a network connection is available, Yorkie determines which changes need to be synced between clients and brings their replicas into the same state. In the event that the document is being edited concurrently on different devices, Yorkie automatically syncs the changes and resolves any conflicts, ensuring that all replicas end up in the same state.
83
+
**The Collaboration Flow:**
84
+
85
+
1. Multiple Replicas: Each client maintains its own replica of a document, representing your application's data model
86
+
2. Offline Editing: Clients can edit documents independently, even without network connectivity
87
+
3. Automatic Sync: When connected, Yorkie determines which changes need synchronization and updates all clients
88
+
4. Conflict Resolution: If multiple users edit simultaneously, Yorkie's CRDTs automatically resolve conflicts, ensuring all replicas converge to the same state
89
+
90
+
This architecture enables seamless real-time collaboration while supporting offline work, making it ideal for modern collaborative applications.
91
+
92
+
### Use Cases
93
+
94
+
Yorkie is perfect for building various types of collaborative applications:
95
+
96
+
- Collaborative Editors Build the next Google Docs or Notion with [rich text editing examples](/examples/quill)
97
+
- Real-time Whiteboards Create Figma-like experiences with [drawing applications](/examples/tldraw)
98
+
- Project Management Tools Develop Trello-style boards with [kanban examples](/examples/kanban)
99
+
- Code Collaboration Enable pair programming with [CodeMirror integration](/examples/codemirror)
100
+
- Presence & Cursors Show who's online with [simultaneous cursors](/examples/simultaneous-cursors)
101
+
102
+
Explore more [examples](/examples) to see what you can build with Yorkie.
103
+
104
+
### Next Steps
105
+
106
+
**Get Started Quickly:**
107
+
- Follow the [Getting Started guide](/docs/getting-started) for step-by-step integration
108
+
- Choose your platform: [JavaScript](/docs/js-sdk), [React](/docs/getting-started/with-react), [Android](/docs/android-sdk), or [iOS](/docs/ios-sdk)
109
+
- Try our [live examples](/examples) to see Yorkie in action
50
110
51
-
To get started with Yorkie, please refer to the [Getting Started](/docs/getting-started).
111
+
**Dive Deeper:**
112
+
- Understand [Architecture Patterns](/docs/architecture-patterns) to design your collaboration system
113
+
- Learn about [security best practices](/docs/security) for production deployments
114
+
- Explore [CLI commands](/docs/cli) for managing your projects
115
+
- Check the [Glossary](/docs/glossary) for terminology reference
0 commit comments