Y-SweetConceptsHow Y-Sweet Works

How Y-Sweet Works

Y-Sweet is an open-source Yjs sync server created by Jamsocket. It integrates with the popular CRDT library Yjs, syncs document edits to multiple clients, and persists each document to your own S3 in the background. You can also use Y-Sweet for presence features, e.g. sharing cursor locations.

What is a document?

A document can be anything – a whiteboard, text document, etc.

In the past, documents like whiteboards and text documents, were typically single player – meaning only one person could edit a document at a time. This is because deploying your own websocket servers and writing conflict resolution logic was tedious and time-consuming.

Y-Sweet is built to make realtime collaboration painless and efficient.

The Open Source Y-Sweet Server

The open source Y-Sweet server gives you everything you need for realtime collaboration out of the box:

  • Sync the latest version of a document in realtime across users
  • Resolve conflicts using Yjs, the industry-standard for CRDTs (Conflict-free Replication Data Types).
  • Persist documents to S3-compatible storage

The Cloud

If you were to use the open source Y-Sweet server alone, you would still have to set up the infrastructure for self hosting it.

Jamsocket makes it easy to run a Y-Sweet server for your application, no setup needed.

Build collaborative features without managing your own server. Our Javascript SDK allows you creating and access documents. Use our React Hooks to power conflict-free edits to a document.

All you need is a connection string to get started. To get a connection string, you first need to create a Y-Sweet service in the Jamsocket dashboard. On your new service’s page, click “New connection string”. Give it a description and click “Create”, and copy the connection string. This is a secret key that your app will use to create docs and generate client tokens which give clients the ability to read and write Y-Sweet documents.

Next Steps

Built by Jamsocket.