Fumadocs Core
The headless React library for building documentation websites, with source loading, page trees, MDX processing, search, and i18n.
Repository Health
Technical Analysis
Fumadocs Core is the headless engine behind Fumadocs, the React.js documentation framework. It provides the framework-agnostic building blocks a docs site needs — a content source loader that turns files into structured page trees, a full remark/rehype MDX plugin suite, multi-provider full-text search, Shiki-powered syntax highlighting, internationalization, and adapters for Next.js, Astro, React Router, TanStack Start, and Waku.
Because it ships as headless logic rather than prebuilt UI, you compose it directly in your own components and routes, giving you complete control over rendering while still getting the hard parts — content resolution, tree building, TOC generation, and search indexing — handled for you.
What You Get
- A content source loader (
loader()) that converts files and virtual sources into a navigable, typed page tree - A complete remark/rehype MDX plugin suite for headings, TOC, code blocks, admonitions, package-manager tabs, structure extraction, and more
- Multi-provider full-text search — FlexSearch, Orama, Algolia, and Mixedbread — with server and client helpers
- Shiki-based syntax highlighting utilities for server and client rendering
- Framework adapters for Next.js, Astro, React Router, TanStack Start, and Waku plus i18n middleware and locale negotiation
Common Use Cases
- Building a custom-designed documentation site where you own all the UI but want content loading and search handled
- Adding fast, static or hosted full-text search to an existing docs or content site
- Processing MDX content with a curated set of remark/rehype plugins for headings, code, and callouts
- Serving localized documentation with locale negotiation and i18n-aware routing
Under The Hood
Architecture
Fumadocs Core is organized as a headless pipeline. The loader() in src/source/loader.ts composes a ContentStorage builder with a page-tree builder (src/source/page-tree/builder.ts), applying a plugin chain (slugs, icons) to resolve file-based or virtual sources into a typed, serializable page tree; storage is abstracted behind a FileSystem layer so content origins are pluggable. MDX handling lives under src/mdx-plugins as discrete remark/rehype transforms, search under src/search splits into server and client halves per provider, and src/framework supplies per-framework adapters (Next, Astro, React Router, TanStack, Waku) over a shared framework abstraction.
Tech Stack
Written in TypeScript and shipped ESM-only, it builds on the unified/remark/rehype ecosystem (remark, remark-gfm, remark-rehype, mdast/hast utilities), Shiki for highlighting, Orama for in-repo search, and github-slugger, tinyglobby, and yaml for content plumbing. React 19, Next 16, and the various search providers (Algolia, Mixedbread, FlexSearch, Orama Cloud) are peer dependencies, keeping the core lean. Builds run through tsdown and tests through Vitest.
Code Quality
The codebase is strongly typed with generics threaded through the loader and storage types, and uses path aliases and clear module boundaries. A Vitest suite (packages/core/test) covers loader, search, MDX plugins, frontmatter, highlight, and negotiation behavior — solid for the critical paths, though modest in count relative to the package’s large public surface.
API Design
The public API is deliberately composable: a single loader() call yields typed page/meta accessors, search and highlight helpers are small focused functions, and framework adapters are exposed as separate subpath exports so consumers import only what they use. The tradeoff for that breadth is a wide surface with many entry points, which raises the initial orientation cost — mitigated by extensive external documentation at fumadocs.dev and a large examples directory.
Used by 25 apps in this directory
Amical
Note Taking · AI Assistants
Local-first AI dictation that understands your active app — private, offline, and built for speed.
ByteChef
Automation · AI Agents
Unified open-source platform for AI agent orchestration and workflow automation with 180+ connectors, MCP support, and durable execution.
CourseLit
Ecommerce · Blogging
Open-source, self-hosted LMS for selling online courses, digital downloads, and building communities on your own branded website.
Documenso
Digital Signiture
Self-hosted, open-source DocuSign alternative with legally binding PDF signatures, multi-party workflows, and a full REST and tRPC API.
FastGPT
AI Agents · AI Development
Build, debug, and deploy knowledge-based AI agents with a visual workflow editor, RAG retrieval, and support for any OpenAI-compatible LLM.
headroom
AI Development · Developer Tools
Compress everything your AI agent reads — tool outputs, logs, RAG chunks, and files — before it reaches the LLM, achieving 60–95% fewer tokens with the same answers.
ktx
Data Engineering · Analytics · AI Development
ktx builds a self-improving context layer over your data warehouse so AI agents like Claude Code and Codex query it with approved metric definitions instead of reinventing SQL logic from scratch.
Libra AI
AI Development · No Code Platforms
Open-source AI-powered platform that generates and deploys full-stack web applications from natural language prompts, built natively for Cloudflare Workers.
LLM Gateway
AI Development · Devops
One API endpoint for 25+ LLM providers — route, track costs, enforce compliance, and switch models without changing your code.