Technical documentation for GrowthDoc — a self-hosted, Notion-style document & knowledge-base editor for WordPress with a block/slash-command editor, nested docs and topics. Covers how it works, the shortcode, the document post type, roles & capabilities, REST API, and the AI / MCP abilities.

Version: 1.0.0  |  Requires: WordPress 6.0+, PHP 8.0+  |  Text domain: growthdoc

1. Overview

GrowthDoc adds a rich document editor (TipTap-based, with “/” slash commands) on top of a hierarchical growthdoc post type. Documents can be nested into a tree, tagged with Topics, and edited in a React single-page app. Content is exposed through the growthdoc/v1 REST API and the WordPress Abilities API (optionally over MCP), so docs can be created and updated by assistants too.

2. Installation & setup

  1. Activate the plugin. It registers the growthdoc post type and the growthdoc_topic taxonomy, and grants capabilities to Administrator, Editor and Author roles.
  2. Create a page with the shortcode [growthdoc], or set that page as the app page in Settings for a full-screen takeover.
  3. Optionally change the document URL base (default documents) in Settings.

3. Shortcode

[growthdoc]

Mounts the editor SPA at #growthdoc-root. Requires login and either the access_growthdoc or edit_growthdocs capability; otherwise a permission notice is shown. When a page is configured as the app page, GrowthDoc also enqueues early and redirects logged-out visitors to the login screen.

Editor features include headings, lists, to-dos, quotes, code blocks, tables, inline formatting, internal doc links, topic mentions, and export to Markdown / print to PDF.

4. Document post type & topics

  • Post type growthdoc (label “Documents”) — hierarchical, REST-enabled, supports title, editor, author, revisions, page attributes, excerpt and custom fields. URL base is configurable (default /documents/).
  • Taxonomy growthdoc_topic (“Topics”) — groups documents by subject.

Custom post meta: _growthdoc_tiptap (editor JSON, not exposed in REST), _growthdoc_icon, and _growthdoc_cover_url.

5. Roles & capabilities

GrowthDoc uses a mapped capability set (via map_meta_cap). Key capabilities:

CapabilityGrantsDefault roles
access_growthdocOpen the GrowthDoc appAdministrator, Editor, Author
edit_growthdocsCreate and edit documentsAdministrator, Editor, Author
delete_growthdocsDelete documentsAdministrator, Editor

The full mapped set (edit_others_growthdocs, publish_growthdocs, read_private_growthdocs, delete_others_growthdocs, etc.) is granted to Administrator and Editor; Authors get edit/publish on their own docs but not delete-others.

6. REST API

Namespace: growthdoc/v1  —  base URL /wp-json/growthdoc/v1. Standard WordPress auth (logged-in cookie + X-WP-Nonce). The SPA reads its REST root, nonce and capability flags from the localized GROWTHDOC object. The controller powers listing the document tree, reading/writing document content (TipTap JSON), managing topics, and moving/reordering docs — the same operations available as abilities below.

7. AI abilities & MCP

GrowthDoc registers document and topic tools on the WordPress Abilities API:

AbilityPurpose
growthdoc/list-docsList documents
growthdoc/get-docRead a document
growthdoc/get-treeGet the nested document tree
growthdoc/create-docCreate a document
growthdoc/update-docUpdate a document
growthdoc/append-docAppend content to a document
growthdoc/move-docMove a document in the tree
growthdoc/reorder-docsReorder sibling documents
growthdoc/delete-docDelete a document (destructive)
growthdoc/list-topicsList topics
growthdoc/create-topicCreate a topic

Each ability declares typed JSON schemas and is capability-gated (edit_growthdocs / delete_growthdocs). Abilities marked MCP-public are exposed as callable MCP tools via the WordPress Abilities MCP adapter; delete-doc is excluded by default. Capability and MCP visibility are configurable per ability or category in the plugin’s Abilities settings.


Back to GrowthDoc product page  |  All docs

Scroll to Top