yjs-cf-ws-provider: A Yjs WebSocket Provider on Cloudflare Workers

This repository profile is provided by osrepos.com, an open source repository discovery platform.

yjs-cf-ws-provider: A Yjs WebSocket Provider on Cloudflare Workers

Summary

The yjs-cf-ws-provider project offers a serverless WebSocket provider for Yjs, leveraging Cloudflare Workers and Durable Objects. It is designed for learning and demonstrating Cloudflare's powerful APIs, providing a cost-effective and scalable solution for real-time collaboration. This provider is fully compatible with the Yjs WebSocket Connector.

Repository Information

Analyzed by OSRepos on January 26, 2026

Topics

Click on any tag to explore related repositories

Use at your own risk

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of code from these repositories is the user's own responsibility. Always review the repository, source code, dependencies, licenses, and security implications before running or installing anything. OSRepos is not responsible for issues, damages, or losses resulting from third-party repositories.

Introduction

The yjs-cf-ws-provider project offers a serverless WebSocket provider specifically designed for Yjs, running efficiently on Cloudflare Workers. It utilizes Cloudflare Durable Objects to manage state and relay messages between clients, ensuring robust real-time synchronization. A notable feature is its use of the Cloudflare Durable Objects WebSocket Hibernation API, which terminates idle WebSocket connections to minimize duration charges. Additionally, it periodically saves Yjs document states to Cloudflare R2 storage, clearing partial updates from Durable Object storage to optimize performance and cost. This provider is fully compatible with the official Yjs WebSocket Connector.

Please note, this project is primarily intended for learning purposes and to demonstrate the capabilities of Cloudflare Workers and Durable Objects APIs. For production-ready solutions, consider alternatives like PartyKit, which also supports the Yjs API.

Installation

To run this project locally, follow these steps:

npm install
npm run dev

This command will start a local server using the Wrangler CLI and serve a demo application. You can then open a browser to the URL displayed in the console to test it with a simple TipTap editor.

Examples

The local development setup includes a demo application, allowing you to easily test the provider with a basic TipTap editor in your browser. This provides a practical example of how the Yjs WebSocket provider integrates with a collaborative text editor.

Why Use It

  • Serverless & Scalable: Leveraging Cloudflare Workers and Durable Objects, this provider offers a highly scalable and serverless solution for Yjs real-time collaboration.
  • Cost-Effective: The innovative use of WebSocket Hibernation significantly reduces operational costs by preventing charges for idle connections.
  • Data Persistence: Integration with Cloudflare R2 ensures that Yjs document states are persistently stored and regularly optimized.
  • Educational Value: It serves as an excellent resource for developers looking to understand and implement Cloudflare's powerful serverless and state management APIs.
  • Yjs Ecosystem: Its full compatibility with the Yjs WebSocket Connector makes it a seamless fit within existing Yjs-based applications.

Links

Related repositories

Similar repositories that may be relevant next.

Leetcode Patterns: A Pattern-Based Approach to Technical Interview Prep

Leetcode Patterns: A Pattern-Based Approach to Technical Interview Prep

July 18, 2026

Leetcode Patterns is a highly-starred GitHub repository offering a structured, pattern-based approach to mastering technical interview questions. It helps individuals improve problem-solving skills by grouping LeetCode problems under specific subtopics, allowing for focused practice and application of common algorithms and data structures.

algorithmsdata-structuresinterview-prep
TencentDB Agent Memory: Enhancing AI Agents with Layered Long-Term Memory

TencentDB Agent Memory: Enhancing AI Agents with Layered Long-Term Memory

July 7, 2026

TencentDB Agent Memory provides AI agents with fully local, long-term memory through a 4-tier progressive pipeline, eliminating external API dependencies. It significantly reduces token usage and improves task success rates by employing symbolic short-term memory and layered long-term memory. This innovative approach helps agents learn workflows and retain context more effectively.

AI AgentLong-Term MemoryLLM
Llama Cloud Services: Knowledge Agents and Management in the Cloud

Llama Cloud Services: Knowledge Agents and Management in the Cloud

July 3, 2026

Llama Cloud Services offers tools for building knowledge agents and managing data in the cloud. It provides robust capabilities for parsing various document types, including PDF, DOCX, and PPTX, into structured formats. Users should note that this repository is deprecated, with migration recommended to the new `llama-cloud` packages for continued support and improved performance.

document parsingpdf processingstructured data
FreeLLMAPI: Stack 16 Free LLM Tiers for 1.7 Billion Tokens/Month

FreeLLMAPI: Stack 16 Free LLM Tiers for 1.7 Billion Tokens/Month

June 27, 2026

FreeLLMAPI is an OpenAI-compatible proxy that aggregates the free tiers of 16 LLM providers, offering access to approximately 1.7 billion tokens per month. It simplifies access to diverse models through a single endpoint, featuring smart routing, automatic failover, and encrypted key storage. This powerful tool is designed for personal experimentation, allowing developers to leverage multiple free LLM resources efficiently.

TypeScriptLLMAI

Source repository

Open the original repository on GitHub.

11 counted GitHub visits

View on GitHub
OS
OSRepos

Analysis and discovery of open source repositories. Find interesting projects and follow their updates.

Monitor your website with YourWebsiteScore

OSRepos shares public repositories for knowledge and discovery only. Any installation, execution, configuration, or use of third-party repository code is at your own risk. Always review source code, dependencies, licenses, and security implications before running anything.

© 2025 OSRepos. Built with Nuxt 3 and lots of ❤️