How prosemirror/prosemirror-collab works
Project type and purpose
• From the file tree and README, this is not a standalone front-end/back-end application but an open-source “core module” (a plugin) for the ProseMirror rich-text editor.
• Its sole responsibility is to track editor changes, package them up as “steps,” and coordinate merging those steps across collaborating clients.
File structure
• Top level: configuration files (.gitignore, package.json, etc.), documentation (README, CONTRIBUTING), and a src directory.
• src/collab.ts: the one source file exporting the plugin logic.
• test/: unit tests around collab behavior.
• No “backend” or “frontend” folders—this is a library meant to be embedded into a browser-side editor and paired with a server component elsewhere.
README for additional insights
• The module implements a ProseMirror plugin that plugs into the editor’s state management.
• It depends on ProseMirror’s core (state, transform) and exposes an API for sending/receiving steps.
• No built-in network or persistence; integrates with whatever real-time messaging (WebSocket, REST, CRDT sync) you choose.