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 28 apps in this directory
Rybbit
Analytics
Open-source, privacy-friendly web and product analytics with cookieless tracking, session replays, funnels, and real-time dashboards — a self-hostable alternative to Google Analytics.
Hexclave
Authentication · Developer Tools
The open-source user infrastructure platform — authentication, teams, payments, emails, analytics, and more on a single unified user model.
Suna
AI Agents
Turn your company into a git repo — one config, one command center, a workforce of AI agents that runs the real work around the clock.
Superagent
AI Agents · Security
An open-source SDK that blocks prompt injections, redacts PII and secrets, scans repositories for AI-targeted attacks, and red-teams production agents.
superset
AI Code Assistants · AI Development
Orchestrate an army of AI coding agents—Claude Code, Codex, Gemini CLI, and more—running simultaneously in isolated git worktrees from a single Electron desktop app.
SurfSense
AI Assistants · Search
The open-source, unlimited NotebookLM alternative with real-time collaboration, a desktop app, and no vendor lock-in.
Swetrix
Analytics
Privacy-first, cookieless web analytics with error tracking, session replays, and performance monitoring — self-host or use Cloud.
Trieve
AI Development · Developer Tools · Search
All-in-one self-hostable platform for hybrid search, RAG, recommendations, and analytics built on Rust and Qdrant.
Voicebox
AI Development · Productivity · Voice AI
Clone voices, dictate anywhere, and give AI agents your voice — all locally.