No SaaS, No Sales Calls: lingyi-doc Gives Teams a Self-Hosted Docs System With CRDT, MCP, and One Docker Command
Self-hosting collaborative documents used to require a full team and deep pockets; lingyi-doc shows a solo engineer can ship real-time sync, AI agent access, and on-prem deployment with open-source code. It also puts a concrete number on how AI shifts a senior developer's job from typing code to making and owning architectural decisions.
lingyi-doc grew out of a single frontend engineer's refusal to hand a company's core documents to a SaaS vendor. The project now runs inside that company, with dozens of teams and over a thousand people writing requirements, weekly reports, and knowledge base entries daily. It is published on GitHub as an open-source repository with a demo at lingyidoc.com, and it ships multi-dimensional tables, a mind-map/whiteboard canvas, real-time collaboration, import/export, and one-command Docker self-hosting.
Under the hood, the collaboration stack uses CRDT (conflict-free replicated data types) plus HLC (hybrid logical clocks) over WebSocket, rejecting OT because of its server-side complexity. An MCP server (spec 2024-11-05) exposes the knowledge base to Cursor, Claude Desktop, and custom agents through Streamable HTTP, with tokens separated from user JWTs and scopes like kb:read, doc:read, and ai:rag. The core engine ships as npm packages (@lingyi-doc/core, @lingyi-doc/editor, @lingyi-doc/mind-map) so teams can embed tables and diagrams in their own products.
AI wrote roughly 80% of the code (boilerplate, CRUD, test drafts, comments) by the developer's own accounting. Architecture, the hardest choices (CRDT vs OT), review, and acceptance stayed with a human—and that remaining 20% of judgment, not API recall, is the value a ten-year frontend veteran claims to retain in the AI era.
AI first drafts frequently fall short of usable, and several rewrite rounds are normal, so the 80% code-generation figure comes with a nontrivial review tax that the fast-demo stories omit.
MCP tokens are separated from login JWTs and scoped per resource; that separation lets agent credentials be revoked without touching human accounts, and it's a pattern any team wiring AI to internal docs should copy.
Treating documents as company data leads to self-hosting as the product's foundation, with AI assistant and RAG kept commercial while the core is open source; that's a defensible line for a project that must survive in compliance-heavy environments.