Docmost — Profile
Markdown goes in and out of Docmost only by way of HTML, and the doors an agent would use — API keys and MCP — are the parts you have to license.
- Path
- profiles/Profile__Docmost.md
- Authors
- Michael Staton
- Augmented with
- Claude Code on Claude Opus 5.5
- Tags
- Profile · Docmost · Team-Wiki · Tiptap · ProseMirror · Yjs · Open-Core · Markdown-Round-Trip
Docmost — Profile
A profile of Docmost as it lives in this study (studies/content-authoring-tools/docmost, pinned at ef50d8c8, 2026-11-19, git describe → v0.97.0-104). AGPL-3.0 core plus a Docmost Enterprise License over three ee/ directories (README.md, packages/ee/LICENSE).
This is the study’s open-core Notion/Confluence entry, and the natural sibling of [[Profile__Outline]]: same storage shape, different answers on Markdown fidelity and on what is free.
TL;DR
Verdict: a capable wiki whose Markdown story is an import/export convenience, not a data model — and whose agent surface is behind the license line. The REST API accepts and returns Markdown, but the path is lossy by construction (two hops through HTML), and edits are coarse (append / prepend / replace).
How it works
- Stack. pnpm + Nx monorepo:
apps/client(React, Vite),apps/server(NestJS, Kysely over Postgres, Redis, BullMQ),packages/editor-ext(shared Tiptap extensions),packages/base-formula(formula engine for “bases”),packages/ee(license file only in this checkout). - Editor. Tiptap 3.33 on ProseMirror (
package.json:34-60), extended bypackages/editor-ext/src/lib/— callout, columns, tabs, details, math, footnotes, drawio, excalidraw, mention, status, subpages, transclusion, unique-id, a ProseMirror→DOCX converter and more. Extension model = Tiptap’s:Node.create({...})withaddAttributes,parseHTML,renderHTML,addCommands. - Collaboration. Yjs via Hocuspocus 4.8 (
package.json:26-30),apps/server/src/collaboration/with authentication, persistence and Redis-sync extensions. - The
ee/line in practice.apps/server/src/eeis a git submodule pointing athttps://github.com/docmost/ee(.gitmodules) and is empty in this checkout — the server-side enterprise code is not public.apps/client/src/eeis present (AI, AI chat, API keys, MFA, SCIM, page permissions, templates, …).
What’s on disk / in the DB
A page row (apps/server/src/database/types/db.d.ts:355-381) holds:
| Column | Role |
|---|---|
content (Json) |
Tiptap/ProseMirror JSON — the canonical snapshot |
ydoc (Buffer) |
Yjs state; if missing, rebuilt from content on load (collaboration/extensions/persistence.extension.ts:80-104) |
textContent |
Plain text extracted on every store, for search (:121-126) |
tsv, slugId, parentPageId, position, contributorIds, isBase |
search vector, tree, ordering, attribution, database-page flag |
Persistence skips the write when the new JSON deep-equals the old (persistence.extension.ts:149). There is no Markdown column at all. A callout exported to Markdown looks like:
:::warning
Body text, converted from the callout's HTML by Turndown.
:::
(packages/editor-ext/src/lib/markdown/utils/turndown.utils.ts:168-180). On import, any type other than info|success|warning|danger is coerced to info (callout.marked.ts:20-25), and YAML frontmatter is stripped before parsing (marked.utils.ts:57-60).
Agent reach
Read and write over REST, as a user — the long-lived credentials and MCP are licensed.
- REST.
POST /pages/info|create|update|delete|move|duplicate|history|backlinks|…(core/page/page.controller.ts), guarded byJwtAuthGuard(:58).create,updateandinfotakeformat: 'json' | 'markdown' | 'html'(dto/create-page.dto.ts:11-35,dto/page.dto.ts:40-41). - Edit granularity.
UpdatePageDto.operationis'append' | 'prepend' | 'replace'(dto/update-page.dto.ts:15,:36-38). No patch, no block addressing. - Live writes.
updatePageContentconverts to ProseMirror JSON and hands it to the collaboration gateway (services/page.service.ts:434-449), which opens a direct Hocuspocus connection and mutates the Y.Doc (collaboration/collaboration.handler.ts:92-127). Editors with the page open see it — butreplacedeletes the entire XML fragment and inserts a freshly built Y.Doc (:109-119), unlike Outline’s diffingupdateYFragment. - API keys. The JWT strategy accepts an
api_keytoken type butrequires./../../../ee/api-key/api-key.serviceto validate it (core/auth/strategies/jwt.strategy.ts:54-59,:100-106). Without the EE module, there are no standing keys. - MCP.
mcpandmcp:controlsare listed licensed features (apps/client/src/ee/features.ts:13,:28); enabling it checkslicenseCheckService.hasFeature(..., 'mcp', ...)(core/workspace/services/workspace.service.ts:396-397). The MCP server implementation itself is not in the public tree, so its tools could not be verified.
What’s clever or unique
- Markdown via HTML, on purpose.
parseProsemirrorContentdoesmarkdownToHtml(marked) →htmlToJson(Tiptap’s HTML parser) (page.service.ts:1383-1404); export doesjsonToHtml→ Turndown (integrations/export/export.service.ts:77-95). The trick is that each Tiptap node already knows itsparseHTML/renderHTML, so Markdown support costs one marked extension and one Turndown rule per custom node, not a Markdown serializer per node. Cheap to extend, inherently lossy. - Sync blocks (transclusion).
transclusionSource/transclusionReferencenodes with an explicit acyclicity rule — sources cannot contain sources or references, “which keeps the transclusion graph acyclic and lets the renderer skip cycle-aware traversal entirely” (packages/editor-ext/src/lib/transclusion/constants.ts:1-12). A reference carries onlysourcePageIdandtransclusionId(transclusion-reference.ts:44-55), and there is no Turndown rule for it, so it has nothing to say in Markdown. - Bases with a formula engine.
isBasepages pluspackages/base-formula(AST, compiler, evaluator, dependency graph —src/ast.ts,compile.ts,eval.ts,graph.ts) shared between client and server builds. Notion-style databases inside the wiki. - Turndown rules for structure Markdown lacks. Tabs export as
####headings per panel (turndown.utils.ts:96-118); details are preserved as raw<details><summary>HTML (:204-238). Pragmatic degradations, each one written down. - Content-format negotiation on every endpoint. The same
formatflag on read and write makes Markdown a first-class wire format for scripts even though it is not a storage format.
Costs / limits
- Lossy both ways. Two conversions through HTML; colgroups stripped (
export.service.ts:89-94), callout types coerced, frontmatter discarded, transclusions and bases have no Markdown form. - Coarse edits. Whole-document replace resets the Yjs fragment; an agent cannot change one paragraph without rewriting the page.
- The agent doors are paid. API keys, MCP, AI, DOCX/Confluence/PDF import, page permissions, templates are all enterprise features (
apps/client/src/ee/features.ts), and the server code for them is in a private repo. - No files. Postgres is the store; there is nothing on disk for an agent to open.
Relevance to flave
- Note the HTML-hop pattern, then avoid it. Letting every node’s HTML serialization double as its Markdown bridge is the fastest way to “support Markdown”, and Docmost shows the cost: Markdown becomes a degraded export. flave’s direction (source is the Markdown; render is derived) is the inverse and should stay that way.
- Avoid
replaceas the agent primitive. Docmost’s only fine-grained options are append and prepend. flave’s Phase 1block.replace/block.editat block grain is precisely the gap Docmost leaves; [[Profile__Outline]]’s quote-to-locate patch is the reference to beat. - Borrow the acyclicity rule for transclusion. If flave ever lets a block embed another block, “sources are leaves” is a one-line constraint that removes cycle detection from the renderer.
- Note the license line as a design lesson. Docmost puts agent access behind EE; flave’s premise is that the agent door is the same as the human door. Keeping operations in the open core is a product decision worth stating explicitly.
Read next
apps/server/src/core/page/services/page.service.ts:434-449,:1383-1410— format negotiationapps/server/src/collaboration/collaboration.handler.ts:92-150— API writes into the live Y.Docpackages/editor-ext/src/lib/markdown/utils/turndown.utils.ts— every Markdown degradation in one filepackages/editor-ext/src/lib/transclusion/— sync blocks
Related
- [[Profile__Outline]] — same architecture; better Markdown patching and a free MCP server, under BSL
- [[Profile__Milkdown]] — what it looks like when Markdown, not HTML, is the bridge format
- [[Profile__AFFiNE]] and [[Profile__AppFlowy]] — the other open-core Notion alternatives in the study