# Fumadocs

## Build better docs, in seconds.

Fumadocs is a React documentation framework for developers, beautifully designed by Fuma Nama.

- [Powerful yet simple](https://fumadocs.hamur.dev/#features)
- [Customizable at every layer](https://fumadocs.hamur.dev/#layers)
- [Compatible with your stack](https://fumadocs.hamur.dev/#stack)

Runs on [Next.js](https://fumadocs.hamur.dev/docs/next/manual-installation), [React Router](https://fumadocs.hamur.dev/docs/react-router/manual-installation), [TanStack Start](https://fumadocs.hamur.dev/docs/tanstack-start/manual-installation), [Waku](https://fumadocs.hamur.dev/docs/waku/manual-installation), [Astro](https://fumadocs.hamur.dev/docs/astro/manual-installation).

```bash
pnpm create fumadocs-app
```

[Get started](https://fumadocs.hamur.dev/docs).

## Every docs feature is built in.

When your docs need API references, a blog or reader feedback, Fumadocs already supports them.

- [Internationalization](https://fumadocs.hamur.dev/docs/next/internationalization): Your pages in several languages, with a switcher for readers.
- [OG images](https://fumadocs.hamur.dev/docs/next/integrations/og): A link preview image for each page, made from its title.
- [Blog](https://fumadocs.hamur.dev/docs/next/integrations/blog): A blog with authors and tags, on the same site as your docs.
- [RSS](https://fumadocs.hamur.dev/docs/next/guides/rss): A feed that tells subscribers about your new posts.
- [Feedback](https://fumadocs.hamur.dev/docs/next/integrations/feedback): Readers rate each page and tell you what is missing.
- [Math](https://fumadocs.hamur.dev/docs/next/markdown/math): Formulas in your Markdown, typeset with KaTeX.
- [Mermaid](https://fumadocs.hamur.dev/docs/next/markdown/mermaid): Diagrams written as text, drawn in your theme.
- [Story](https://fumadocs.hamur.dev/docs/next/integrations/story): Live previews of your components, with their controls.
- [TypeScript](https://fumadocs.hamur.dev/docs/next/markdown/typescript): Type tables generated from your types, so they never go out of date.
- [GraphQL](https://fumadocs.hamur.dev/docs/next/integrations/graphql): Reference pages generated from your GraphQL schema.
- [AsyncAPI](https://fumadocs.hamur.dev/docs/next/integrations/asyncapi): Reference pages for your channels and messages.
- [Static export](https://fumadocs.hamur.dev/docs/next/deploying/static): Plain files you can host anywhere, with search that needs no server.

## Content is code.

Your docs stay accurate as your code changes. They go through your code review, and an example that no longer type-checks fails the build.

`slugify.mdx`:

````mdx
---
title: slugify()
description: Turn a title into a URL-safe slug.
---

## Usage

Pass any title, and the slug comes back in lowercase with dashes between its words.

<Callout title="Stable links">

The same title always gives the same slug.

</Callout>

```ts twoslash title="lib/slug.ts"
export function slugify(title: string) {
  return title.toLowerCase().replaceAll(' ', '-');
}
const slug = slugify(42);
```
````

```txt
lib/slug.ts:4:22 - error TS2345: Argument of type 'number' is not assignable to parameter of type 'string'.
```

## Customize every layer.

Change each layer through its options and still get Fumadocs updates, or copy the UI's source with the CLI and edit any line.

- UI: layouts and components
- Core: page tree, search and i18n
- Content: Markdown files or a CMS

```bash
npx @fumadocs/cli customize
```

## Bring your own stack.

Fumadocs works with the React framework and the CMS or Markdown files you already use, and serves your docs in your readers' languages.

- Frameworks: [Next.js](https://fumadocs.hamur.dev/docs/next/manual-installation), [React Router](https://fumadocs.hamur.dev/docs/react-router/manual-installation), [TanStack Start](https://fumadocs.hamur.dev/docs/tanstack-start/manual-installation), [Waku](https://fumadocs.hamur.dev/docs/waku/manual-installation), [Astro](https://fumadocs.hamur.dev/docs/astro/manual-installation)
- Content sources: [Fumadocs MDX](https://fumadocs.hamur.dev/docs/mdx/next), [Content Collections](https://fumadocs.hamur.dev/docs/headless/content-collections), [Linear](https://fumadocs.hamur.dev/docs/next/integrations/content/linear), [Local HTML](https://fumadocs.hamur.dev/docs/next/integrations/content/local-html), [Local Markdown](https://fumadocs.hamur.dev/docs/next/integrations/content/local-md), [MDX Remote](https://fumadocs.hamur.dev/docs/next/integrations/content/mdx-remote), [Notion](https://fumadocs.hamur.dev/docs/next/integrations/content/notion), [Obsidian](https://fumadocs.hamur.dev/docs/next/integrations/content/obsidian), [Sanity](https://fumadocs.hamur.dev/docs/next/integrations/content/sanity)
- UI languages: [日本語](https://fumadocs.hamur.dev/docs/ui/translations#language-packs), [简体中文](https://fumadocs.hamur.dev/docs/ui/translations#language-packs), [繁體中文](https://fumadocs.hamur.dev/docs/ui/translations#language-packs)

```bash
npx @fumadocs/cli init
```

## Your API docs stay in sync.

Reference pages are built from your schemas and types on every deploy, so they always match the code you ship.

## AI-native by default.

Coding agents can read and search your docs directly, so their code follows your current API instead of their training data.

[llms.txt](https://fumadocs.hamur.dev/llms.txt), [llms-full.txt](https://fumadocs.hamur.dev/llms-full.txt)

## Search finds the exact answer.

Readers answer their own questions instead of asking you. Search works from your first deploy, with no hosted service to pay for.

## Trusted by teams in production.

UI libraries, auth frameworks, databases and validators publish their docs with Fumadocs.

- [shadcn/ui](https://ui.shadcn.com): components
- [Better Auth](https://better-auth.com): auth framework
- [Zod](https://zod.dev): schema validation
- [Prisma](https://prisma.io): ORM and Postgres
- [ArkType](https://arktype.io): validator

> You know how you end up rebuilding a full docs site every time you start a new project? Fumadocs fixes this by giving you all the right blocks that you compose together. Like headless docs to build exactly what you need.
>
> shadcn, Creator of Shadcn UI

> Major shoutout to @fuma_nama for making fumadocs, a gorgeous documentation framework that composes beautifully into the App Router.
>
> Anthony Shew, Turbo DX at Vercel

> I'd have no shot building @arktypeio docs that looked half this good without it 😍
>
> David Blass, Creator of Arktype

[See every site in the showcase](https://fumadocs.hamur.dev/showcase).

## Your docs are one command away.

```bash
pnpm create fumadocs-app
```

```txt
my-app/
├── app/
│   ├── docs/layout.tsx         the docs layout
│   ├── api/search/route.ts     the search API
│   └── llms.txt/route.ts       for AI agents
└── content/docs/
    └── index.mdx               your first page
```

By Fuma Nama.

[216 contributors](https://github.com/fuma-nama/fumadocs/graphs/contributors)