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.

aport-spec: The Open Agent Passport (OAP) Specification for AI Agent Trust

aport-spec: The Open Agent Passport (OAP) Specification for AI Agent Trust

September 18, 2026

The aport-spec repository introduces the Open Agent Passport (OAP) specification, a critical framework for establishing trust in AI agents. It defines a lightweight, cryptographically verifiable credential, enabling real-time, pre-action authorization for AI agents across various platforms. OAP provides the essential runtime trust layer for secure and scalable agentic commerce.

aiaiagentauthorization
SandBase Harness: Local-First AI Agent Runtime with Sandboxed Sessions

SandBase Harness: Local-First AI Agent Runtime with Sandboxed Sessions

September 13, 2026

SandBase Harness is a local-first, self-hosted runtime for AI agents, offering sandboxed sessions, memory, and credentials. This TypeScript-based project provides a robust infrastructure for managing and observing AI agents, ensuring auditability and secure execution on your own machine or infrastructure.

AI AgentsAgent RuntimeSelf-Hosted
A3M Router: Biology-Inspired LLM Routing for Cost Savings and Performance

A3M Router: Biology-Inspired LLM Routing for Cost Savings and Performance

September 13, 2026

A3M Router is an open-source, biology-inspired LLM router designed to optimize costs and performance across over 80 providers. It leverages principles like swarm intelligence and neural plasticity to offer adaptive, resilient, and cost-effective AI routing. This tool helps users save significantly on AI costs by intelligently selecting the best model for each query.

LLM RoutingAI GatewayCost Optimization
Skill Recorder: Turn Screen Recordings into AI Agent Skills

Skill Recorder: Turn Screen Recordings into AI Agent Skills

September 11, 2026

Skill Recorder is a desktop application that captures your on-screen work sessions, including clicks and app switches. It leverages the GitHub Copilot CLI to analyze these recordings, reconstructing them into an intent and ordered steps. This process allows users to generate reusable AI agent skills or automations for platforms like Microsoft Scout, Copilot Cowork, or Copilot Studio.

AI AgentsAutomationCopilot

Source repository

Open the original repository on GitHub.

16 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 ❤️