# ueberdosis/hocuspocus

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/ueberdosis-hocuspocus).**

2,455 stars · 206 forks · TypeScript · MIT

## Links

- GitHub: https://github.com/ueberdosis/hocuspocus
- Homepage: https://tiptap.dev/docs/hocuspocus/introduction
- awesome-repositories: https://awesome-repositories.com/repository/ueberdosis-hocuspocus.md

## Topics

`collaborative-editing` `crdt` `prosemirror` `real-time` `self-hosted` `slatejs` `tiptap` `yjs`

## Description

Hocuspocus is a backend framework designed to facilitate real-time collaborative editing and state synchronization in web applications. It functions as a server-side infrastructure that manages persistent WebSocket connections, enabling multiple users to edit shared documents simultaneously while maintaining data consistency through a conflict-free replicated data type engine.

The platform distinguishes itself through a modular, middleware-driven architecture that allows developers to intercept document lifecycle events, enforce custom access control policies, and integrate external services. By utilizing a flexible adapter pattern for state persistence, it decouples the synchronization engine from specific database backends, supporting self-hosted deployments that prioritize data privacy and infrastructure control.

Beyond core synchronization, the framework provides comprehensive tools for managing collaborative sessions, including user presence tracking, automatic conflict resolution, and offline-first resilience. It also supports advanced workflows such as streaming document updates to AI editing agents and broadcasting system events via webhooks, ensuring that collaborative environments remain extensible and responsive to complex application requirements.

## Tags

### Software Engineering & Architecture

- [Collaborative Data Structure Synchronization](https://awesome-repositories.com/f/software-engineering-architecture/sync-conflict-resolution/collaborative-data-structure-synchronization.md) — Synchronizes complex data structures across clients in real time using conflict-resolution logic to maintain a consistent shared state. ([source](https://github.com/ueberdosis/hocuspocus#readme))
- [Conflict-Free Replicated Data Types](https://awesome-repositories.com/f/software-engineering-architecture/conflict-free-replicated-data-types.md) — Maintains consistent document state across distributed clients by merging concurrent edits using conflict-free replicated data types.
- [CRDT State Synchronization Engines](https://awesome-repositories.com/f/software-engineering-architecture/crdt-state-synchronization-engines.md) — Uses conflict-free replicated data types to ensure consistent state across distributed clients without a central coordinator.
- [State Change Broadcasting](https://awesome-repositories.com/f/software-engineering-architecture/architectural-design-patterns/state-management/reactive-subscription-systems/state-change-subscriptions/state-change-broadcasting.md) — Notifies external services of document updates in real time by triggering webhooks whenever content changes occur. ([source](https://tiptap.dev/docs/hocuspocus/introduction))
- [Lifecycle Event Hooks](https://awesome-repositories.com/f/software-engineering-architecture/lifecycle-event-hooks.md) — Executes custom logic during specific stages of a collaborative session such as when a user connects to or disconnects from the server. ([source](https://github.com/ueberdosis/hocuspocus/blob/main/README.md))
- [Middleware Lifecycle Hooks](https://awesome-repositories.com/f/software-engineering-architecture/middleware-lifecycle-hooks.md) — Intercepts document events and connection states to allow custom logic execution for authentication, persistence, and session management.
- [Offline-First Synchronization](https://awesome-repositories.com/f/software-engineering-architecture/offline-first-synchronization.md) — Provides architectural support for local-first editing with automatic merging of changes after network reconnection.

### Web Development

- [Collaborative Editing Frameworks](https://awesome-repositories.com/f/web-development/collaborative-editing-frameworks.md) — Provides a backend framework for synchronizing real-time collaborative editing sessions in web applications. ([source](https://tiptap.dev/docs/hocuspocus/introduction))
- [Collaborative Editing Conflict Resolution](https://awesome-repositories.com/f/web-development/collaborative-editing-conflict-resolution.md) — Merges concurrent edits from multiple users automatically using conflict-free data structures to maintain a consistent document state. ([source](https://tiptap.dev/collab))
- [System Event Webhooks](https://awesome-repositories.com/f/web-development/external-event-integration/system-event-webhooks.md) — Triggers external service notifications by broadcasting document changes and system events via HTTP callbacks.
- [Offline Data Synchronization Frameworks](https://awesome-repositories.com/f/web-development/real-time-collaboration-tools/offline-data-synchronization-frameworks.md) — Buffers local changes during network interruptions and automatically synchronizes them with the remote backend upon reconnection. ([source](https://tiptap.dev/collab))
- [Yjs Document Synchronizations](https://awesome-repositories.com/f/web-development/websocket-integrations/real-time-sync-engines/yjs-document-synchronizations.md) — Provides server infrastructure specifically for synchronizing Yjs CRDT documents across multiple clients.

### Data & Databases

- [Session-Surviving Document Persistence](https://awesome-repositories.com/f/data-databases/data-engineering-infrastructure/data-persistence-storage/data-storage/document-based-storage/session-surviving-document-persistence.md) — Automatically persists document state to durable storage to ensure data survives client disconnections and server restarts. ([source](https://github.com/ueberdosis/hocuspocus/blob/main/README.md))
- [Middleware Logic Extensions](https://awesome-repositories.com/f/data-databases/database-extenders/middleware-logic-extensions.md) — Intercepts messages and authenticates users by applying custom middleware to document processing workflows during the active editing lifecycle. ([source](https://github.com/ueberdosis/hocuspocus/blob/main/CHANGELOG.md))
- [Collaborative Session Scalers](https://awesome-repositories.com/f/data-databases/session-state-management/collaborative-session-coordination/collaborative-session-scalers.md) — Distributes synchronization traffic across multiple server instances using a shared cache to support high-concurrency environments. ([source](https://tiptap.dev/docs/hocuspocus/introduction))
- [Storage Backend Adapters](https://awesome-repositories.com/f/data-databases/storage-backend-adapters.md) — Decouples the core synchronization engine from storage backends to enable flexible document saving and retrieval across various database systems.
- [Collaborative Session Multiplexers](https://awesome-repositories.com/f/data-databases/typed-data-collections/sequence-management/asynchronous-streams/multiplexed-message-streams/collaborative-session-multiplexers.md) — Routes multiple collaborative document streams over shared network connections by embedding unique identifiers within the communication protocol.

### Development Tools & Productivity

- [Collaborative Editing Middleware](https://awesome-repositories.com/f/development-tools-productivity/collaborative-real-time-editing/collaborative-editing-middleware.md) — Intercepts document lifecycle events and enforces custom logic within real-time synchronization workflows.

### Networking & Communication

- [Bidirectional WebSocket Streaming](https://awesome-repositories.com/f/networking-communication/bidirectional-websocket-streaming.md) — Establishes persistent full-duplex communication channels to stream incremental document updates between clients and the server in real time.
- [Websocket Connection Managers](https://awesome-repositories.com/f/networking-communication/connection-management/websocket-connection-managers.md) — Manages persistent bidirectional communication channels between clients and the server to facilitate low-latency data exchange. ([source](https://github.com/ueberdosis/hocuspocus#readme))
- [Real-Time Connections](https://awesome-repositories.com/f/networking-communication/server-connection-managers/real-time-connections.md) — Establishes persistent bidirectional WebSocket connections to manage document state updates for multi-user interaction.

### User Interface & Experience

- [Real-Time Collaborative Editing](https://awesome-repositories.com/f/user-interface-experience/real-time-collaborative-editing.md) — Coordinates document state across multiple users by displaying live cursors and merging content changes for a seamless shared editing experience. ([source](https://tiptap.dev/))
- [Collaborative Presence States](https://awesome-repositories.com/f/user-interface-experience/application-state-managers/collaborative-presence-states.md) — Broadcasts live activity including cursor positions and profile information to all connected participants to provide visibility into shared session interactions. ([source](https://tiptap.dev/collab))

### Business & Productivity Software

- [Collaborative Document Infrastructures](https://awesome-repositories.com/f/business-productivity-software/cloud-synced-managers/collaborative-document-infrastructures.md) — Manages the lifecycle and persistence of collaborative documents through configurable backend infrastructure. ([source](https://tiptap.dev/collab))
- [AI-Assisted Co-Editing](https://awesome-repositories.com/f/business-productivity-software/team-collaboration-events/collaboration-communication-tools/collaboration-software/collaborative-editors/ai-assisted-co-editing.md) — Supports automated assistants that perform proofreading or multi-document workflows by streaming content updates in real time. ([source](https://tiptap.dev/))

### DevOps & Infrastructure

- [Private Infrastructure Hosting](https://awesome-repositories.com/f/devops-infrastructure/private-infrastructure-hosting.md) — Enables deployment within private internal environments to maintain full control over data privacy and security. ([source](https://tiptap.dev/collab))
- [Self-Hosted Collaboration Servers](https://awesome-repositories.com/f/devops-infrastructure/self-hosted-collaboration-servers.md) — Provides deployable server-side runtimes for collaboration synchronization engines on private hardware.

### Security & Cryptography

- [Security and Access Control](https://awesome-repositories.com/f/security-cryptography/security-and-access-control.md) — Validates authentication tokens and enforces granular permissions to ensure secure access to shared content. ([source](https://github.com/ueberdosis/hocuspocus/blob/main/CHANGELOG.md))
