$ show ProseMirror/website
This repository is the website and documentation system for ProseMirror, a rich text editor library. It serves https://prosemirror.net, hosting the front-page, documentation, examples, and collaborative editing demos. The architecture consists of a static site built from markdown/templates, a Node.js development server with module serving capabilities, and a collaborative editing backend using operational transformation. Key entry points include the dev server (src/devserver.js), collaboration backend (src/collab/server/start.js), and various build scripts that bundle examples and generate documentation from source files.
The LLM identified 3 files worth highlighting for reuse:
Manages collaborative document instances with operational transformation, versioning, user tracking, and persistence. Demonstrates correct implementation of conflict resolution for real-time collaborative editing using the prosemirror-transform Mapping abstraction. The Instance class handles document state, step history, comment synchronization, and client management in a well-structured, reusable pattern.
Implements an HTTP server with routing and JSON API for the collaborative editing backend. Handles GET/POST requests for document events, manages waiting clients for long-polling, and provides proper error handling and status codes. Shows good RESTful API design and separation of concerns with clean routing and request/response handling.
Rollup-based bundler for ProseMirror examples that properly configures externals for peer dependencies and generates IIFE bundles for browser use. Demonstrates understanding of Rollup configuration for library examples, correctly handling external dependencies to avoid bundling Prosemitter core libraries while creating browser-compatible bundles.