a proof of concept realtime collaborative text editor using atproto as a sync server jake.tngl.io/y-pds/
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Fix collection names

+4 -4
+1 -1
client-metadata.json
··· 7 7 "dpop_bound_access_tokens": true, 8 8 "grant_types": ["authorization_code", "refresh_token"], 9 9 "response_types": ["code"], 10 - "scope": "atproto repo?collection=jake.tngl.io.ypds.doc&collection=jake.tngl.io.ypds.update&collection=jake.tngl.io.ypds.awareness&collection=jake.tngl.io.ypds.snapshot", 10 + "scope": "atproto repo?collection=io.tngl.jake.ypds.doc&collection=io.tngl.jake.ypds.update&collection=io.tngl.jake.ypds.awareness&collection=io.tngl.jake.ypds.snapshot", 11 11 "token_endpoint_auth_method": "none" 12 12 }
+3 -3
y-pds.js
··· 2 2 import * as Y from "yjs"; 3 3 import { Awareness, encodeAwarenessUpdate, applyAwarenessUpdate } from "y-protocols/awareness"; 4 4 5 - export const DOC_COLLECTION = "jake.tngl.ypds.doc"; 6 - export const UPDATE_COLLECTION = "jake.tngl.ypds.update"; 7 - export const AWARENESS_COLLECTION = "jake.tngl.ypds.awareness"; 5 + export const DOC_COLLECTION = "io.tngl.jake.ypds.doc"; 6 + export const UPDATE_COLLECTION = "io.tngl.jake.ypds.update"; 7 + export const AWARENESS_COLLECTION = "io.tngl.jake.ypds.awareness"; 8 8 9 9 const encode = (/** @type {Uint8Array} */ update) => btoa(String.fromCharCode(...update)); 10 10 const decode = (/** @type {string} */ b64) => Uint8Array.from(atob(b64), c => c.charCodeAt(0));