tldraw is a monorepo providing an open-source infinite-canvas SDK for building collaborative whiteboard/drawing applications in React. The core library (`@tldraw/editor`, `@tldraw/tldraw`) exposes a highly extensible shape/tool/overlay system with signal-based reactivity, real-time synchronization (`@tldraw/sync-core`), and a full UI component library (menus, toolbars, dialogs, style panels, commenting). The repository also includes a production-grade web application (tldraw.com) with authentication (Clerk), file management, real-time sync via Cloudflare Durable Objects, MCP server integration, and a Zero-based relational data layer for multi-user features. Additional assets include a VS Code extension, an AI agent starter kit, a documentation site, an extensive example gallery (~100+ recipes), and deployment infrastructure for Cloudflare Workers, Vercel, and template demos. The architecture is modular—core packages have minimal dependencies—and the codebase demonstrates strong engineering practices: comprehensive unit and e2e testing, a custom validation library with path-aware errors, an efficient small-set implementation (`ArraySet`), and a debounce utility that returns cancelable promises.
Outline is a collaborative knowledge base platform built with React and Node.js. It provides real-time document editing via ProseMirror/Yjs, team workspaces with granular permissions, and extensibility through a plugin system. The application features rich text editing, document organization into collections, search functionality, notifications, and integrations with services like Slack, GitHub, and Notion. Architecture follows a monorepo structure with frontend (React/MobX/Styled Components), backend (Node.js/Koa/Sequelize), and shared utilities. Key entry points include the React root (app/index.tsx), Koa server (server/index.ts), and API routes (server/routes/api/). The system relies on PostgreSQL for primary data storage, Redis for caching and job queues, and S3/local storage for file attachments.
This repository is the development branch of the collaborative editing binding between CodeMirror 6 and Yjs, published as the unstable @y/codemirror package targeting Yjs v14 (@y/y). It is a library, not an application: consumers embed it into a CodeMirror editor to synchronize a Y.Text shared type with the editor's document, render remote cursors and selections, and enable shared undo/redo with per-client history. The primary entry point is the yCollab(ytext, awareness, opts) function in src/index.js, which composes three CodeMirror plugins: ySync (bidirectional Y.Text <-> editor sync), yRemoteSelections (awareness-based remote cursor/selection rendering), and yUndoManager (Y.UndoManager integration with selection restoration). A fourth internal state field, yAttributionDecorations, renders Yjs attribution manager data (insert/delete markers) as editor decorations. The architecture is a modular set of CodeMirror 6 extensions communicating through facets and annotations. Local editor transactions are converted to Yjs deltas and applied to Y.Text inside a tagged Yjs transaction; remote Yjs updates are observed and dispatched back into the editor with annotations. Remote selections are transmitted as Yjs relative positions via awareness and rendered as decorations and widget carets. The undo plugin stores selection ranges as YRange (relative positions) on Yjs stack items, allowing selections to be restored after concurrent edits. Code is ESM with JSDoc-based TypeScript checking, rollup for CJS/IIFE builds, and peer dependencies on @codemirror/state, @codemirror/view, @y/y, and @y/protocols. Tests are robust for a collaborative editor library: they use lib0's PRNG-based fuzzing with @y/y/testHelper to apply random multi-editor transactions and assert document convergence. The codebase is generally well-crafted with clean separation of concerns, though it sits on pre-release Yjs v14 APIs, contains a few TODOs, and pins CI to Node 16 with older jsdom — hence moderate technical drift. The stable Yjs v13 line remains the separate y-codemirror.next package; this repo is explicitly experimental.
Fireproof is a local-first, real-time document database with CRDT-based conflict resolution, end-to-end encryption, and multi-platform support (browser, Node.js, Deno, Cloudflare Workers). The monorepo contains the core database engine (`@fireproof/core`), a cloud sync backend (Hono + Durable Objects), a dashboard web application for tenant/ledger management, a CLI tool for build and DevOps tasks, and a React hooks library (`use-fireproof`). The architecture is modular with clear separation between storage gateways (IndexedDB, filesystem, memory, cloud), key management (KeyBag with fingerprinting), device identity (X.509-like PKI), and protocol layers (WebSocket/HTTP message dispatch). The codebase exhibits strong engineering practices including extensive TypeScript usage, comprehensive testing (though some tests are skipped or known to fail), and reusable patterns like the Gateway interceptor, Result type, and Evento command pipeline. However, complexity is high due to multiple runtime targets and active refactoring between versions, and there are known critical bugs (e.g., remote sync not triggering subscriptions in React hooks).
pg_mooncake is a Postgres extension that adds a custom table access method ('mooncake') backed by Apache Iceberg, enabling real-time analytics on columnar data stored in Iceberg tables. It integrates DuckDB (via pg_duckdb) as the query engine for fast analytics and provides a background worker (moonlink) that streams changes from regular Postgres heap tables to Iceberg tables via logical replication, ensuring sub-second data freshness. The extension exposes SQL procedures to create columnstore mirrors of Postgres tables, manage snapshots, load files, and optimize storage. It is built using the pgrx framework for Rust-based Postgres extensions and supports Postgres versions 14-18. The architecture is a hybrid of a shared library loaded into the Postgres backend and a separate background worker process. The codebase is well-structured and actively developed, though many table access method callbacks are still stubs, indicating it is in an early but functional stage.
AppFlowy-Cloud is the Rust backend for the AppFlowy collaborative workspace platform, providing real-time document editing via CRDT (Yrs) with WebSocket sync, REST APIs for user/workspace management, AI features (chat, completion, embeddings), file storage (S3/MinIO), and background indexing. It follows a multi-service architecture with a main Actix-web server, a background worker (Axum), and an admin frontend (Axum/Askama), all orchestrated via Docker Compose. The codebase is extensive and well-structured, with many reusable libraries for database access, access control (Casbin), real-time protocol handling, and AI client integration. A significant portion is dedicated to integration tests covering collaborative sync, file uploads, and AI operations. However, this repository is explicitly marked as a legacy open-source release. The README states it is no longer maintained; active development has moved to a closed-source commercial fork. This results in some technical drift, such as deprecated endpoints, commented-out tests, and workarounds for known issues. Despite this, the code demonstrates high craftsmanship with clean abstractions (e.g., StreamRouter, ReconnectionManager, CollabStore trait) and robust patterns for distributed systems. It serves as a valuable reference for building real-time collaborative backends, but any reuse should account for its stale maintenance status and the need to update dependencies and fix known bugs.