Skip to content

Commit 6aad76e

Browse files
committed
Docs about our Y.js integration
1 parent e3101bb commit 6aad76e

2 files changed

Lines changed: 35 additions & 11 deletions

File tree

docs/Y.js/Y.js.md

Lines changed: 19 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5,29 +5,29 @@ title: 'Y.js'
55

66
## Dexie.js ❤️ Y.js
77

8-
Dexie supports the powerful CRDT library [Y.js](http://github.com/yjs/yjs) through its add-on [y-dexie](https://www.npmjs.com/package/y-dexie).
8+
Dexie supports the powerful CRDT library [Y.js](https://yjs.dev/) through the Dexie add-on [y-dexie](y-dexie).
99

1010
## What is Y.js
1111

1212
Y.js is a high-performance CRDT for building collaborative applications that sync automatically. It exposes its internal CRDT model as shared data types that can be manipulated concurrently. Shared types are similar to common data types like Map and Array.
1313

1414
The core type in Y.js is the Y.Doc that holds CRDT data. One of the most powerful use cases of CRDT is collaborative editing of texts and images.
1515

16-
## [y-indexeddb](https://github.com/yjs/y-indexeddb) and [y-dexie](https://github.com/dexie/Dexie.js/tree/master/addons/y-dexie)
16+
## [y-indexeddb](https://github.com/yjs/y-indexeddb) vs [y-dexie](https://github.com/dexie/Dexie.js/tree/master/addons/y-dexie)
1717

18-
y-indexeddb, developed by [Kevin Jahns](https://github.com/dmonad), allows basic persistance of a single Y.Doc in indexedDB. Each document is represented by its own unique IndexedDB database. This implementation acts as a model for persisting Y.Doc updates and works well when only a single or few documents are being used.
18+
y-indexeddb, developed by [Kevin Jahns](https://github.com/dmonad), is a storage provider that use indexedDB. Each document is represented by its own unique IndexedDB database. This implementation acts as a role model for persisting Y.Docs. But since y-indexeddb requires one database per document, it can be hard to combine it with additional offline data or integrate it with a dexie database.
1919

2020
y-dexie is an alternative to y-indexeddb that allows structured storage of multiple Y.Docs in a single indexedDB database. It integrates well to existing databases and Y.Docs can be places on existing
2121
database objects (rows) on their own properties of the objects.
2222

23-
| Features | y-indexeddb | y-dexie |
24-
| ---------------------------------------------------------- | ----------- | ------- |
25-
| Persist single document in browser | [x] | [x] |
26-
| Garbage collect historical Y.js updates | [x] | [x] |
27-
| Perist multiple documents in the same database | [-] | [x] |
28-
| Store documents as properties on traditional indexed items | [-] | [x] |
29-
| Sync with dexie-cloud | [-] | [x] |
30-
| Optimized sync protocol for syncing multiple documents | [-] | [x] |
23+
| Features | y-indexeddb  | y-dexie |
24+
| ---------------------------------------------------------- | ----------------- | ------- |
25+
| Persist single document in browser | | |
26+
| Garbage collect historical Y.js updates | | |
27+
| Perist multiple documents in the same database | | |
28+
| Store documents as properties on traditional indexed items | | |
29+
| Sync with dexie-cloud | | |
30+
| Optimized sync protocol for syncing multiple documents | | |
3131

3232
## The Y.js ecosystem
3333

@@ -53,3 +53,11 @@ database objects (rows) on their own properties of the objects.
5353
### Block / document frameworks (Yjs under the hood)
5454

5555
- BlockSuite / AFFiNE – block editor toolkit built on Yjs
56+
57+
## Sample Applications
58+
59+
[Dexie Cloud Starter](https://github.com/dexie/dexie-cloud-starter)
60+
61+
[Lkal.ma](https://lkal.ma/boards)
62+
63+
[To To Do](https://totodo.app)

docs/Y.js/y-dexie.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
---
2+
layout: docs
3+
title: 'y-dexie'
4+
---
5+
6+
## Dexie.js ❤️ Y.js
7+
8+
[y-dexie](https://www.npmjs.com/package/y-dexie) is a storage provider for [Y.js](Y.js).
9+
10+
## Dexie Cloud ❤️ Y.js
11+
12+
[dexie-cloud-addon](/cloud/docs/dexie-cloud-addon) further extends `y-dexie` to become a [sync- and awareness provider](https://github.com/dexie/Dexie.js/tree/master/addons/y-dexie#adding-sync-and-awareness) for Y.js.
13+
14+
---
15+
16+
See [y-dexie's README](https://github.com/dexie/Dexie.js/tree/master/addons/y-dexie#readme).

0 commit comments

Comments
 (0)