Y-websocket and Firestore

I’m trying to set up y-websocket with a Firestore database. I’m using BlockNote as a text editor.
Upon initial load, I want to content from Firestore DB.

My approach to this is for the first connected client to retrieve content and set the yjs document, and all other clients to connect to that RoomID to sync with that document. However, I cannot seem to find WHERE or HOW to do this exactly.

Another question I have is how to store content in DB. Should I store it as raw y-doc? I don’t care for version history

There’s an extension for this: https://github.com/podraven/y-fire

1 Like