WalletConnect's documentation site, built with Fumadocs on Next.js. It was migrated from Mintlify, and every URL from the Mintlify site still works.
pnpm install
pnpm dev # http://localhost:3000
pnpm build # static export to out/: generates every page and fails on any broken MDX
pnpm preview # build, then serve out/ through the Cloudflare Worker at http://localhost:8787
pnpm lintpnpm dev doesn't run the Worker, so redirects and .md URLs only work in pnpm preview.
The site is a static export (output: 'export') served by Cloudflare Workers Static Assets, configured in wrangler.jsonc. There is no Next.js server.
out/: every page,/api/search.json,/llms*.txt, the.mdfiles, and OG images, all built bypnpm build.worker/index.ts: runs in front of page URLs and handles the redirects fromredirects.json,/<page>.md, and Markdown for clients sendingAccept: text/markdown. Anything else is served straight fromout/; unknown URLs getout/404.html.- Deploys: the
DeployGitHub Actions workflow (.github/workflows/deploy.yml) runswrangler deployon every push todocs/v3, served atdocs-next.walletconnect.com(mainanddocs.walletconnect.comafter the Mintlify cutover). Every PR gets a preview URL in a PR comment.pnpm run deploydeploys by hand. Don't also connect Cloudflare Workers Builds, or the two deployers overwrite each other.
| Path | What it is |
|---|---|
content/docs/**/*.mdx |
Pages. The file path is the URL (content/docs/network/specs.mdx → /network/specs; an index.mdx maps to its folder, so content/docs/wallets/index.mdx → /wallets). |
content/navigation.json |
Sidebar and tabs. It uses the same schema as Mintlify's docs.json → navigation. |
content/snippets/ |
Reusable MDX partials (formerly /snippets). |
redirects.json |
Redirects, applied by the Cloudflare Worker (worker/index.ts). |
openapi/*.json |
WalletConnect Pay OpenAPI specs, one per API version. |
public/ |
Images, logos, and other static files. |
components/mintlify.tsx |
Mintlify-compatible components: Card, CardGroup, Columns, Tabs/Tab, CodeGroup, Steps/Step, Note/Info/Tip/Warning/Check/Danger, Accordion/AccordionGroup, Frame, Tooltip, Expandable, and the legacy Table. |
lib/navigation.tsx |
Turns navigation.json into the Fumadocs page tree. |
- New page: create an
.mdxfile undercontent/docs/, then add its path tocontent/navigation.json. Pages that aren't in the navigation still build and can be reached by URL. - Frontmatter:
title,description,sidebarTitle(the sidebar label), andmode: frame(a landing page with no title, TOC, or page actions). - Components: the Mintlify components listed above work without an import. So do
<Icon icon="..." />(Font Awesome names),<Mermaid>(or a```mermaidcode block),$$ LaTeX $$,<ChainList />,<WalletList />,<ProductCard />,<Container>, and<Title>. - Code block titles: write
```ts title="app.ts". Inside<CodeGroup>, each title becomes a tab label. - Snippets: import them with
import Relay from "@/content/snippets/cloud/relay.mdx"and render them with<Relay components={props.components} />. You have to passcomponentsso the snippet can use the Mintlify components.
| Mintlify concept | Rendered as |
|---|---|
tabs[] |
Navbar tabs |
dropdowns[] (Wallets → Web, Android, …) and versions[] |
A switcher next to the tabs |
Top-level group |
A section heading in the sidebar |
Nested group |
A collapsible folder |
global.anchors[] |
Links pinned above the sidebar on every tab |
anchors[] on a tab (Payments → Report an Issue) |
Replaces the global anchor with the same anchor label on that tab |
| A page not listed anywhere | Still gets a URL and the tab row; its sidebar shows only the anchors |
API reference pages render <APIPage document="<version>.json" operations={[...]} /> with fumadocs-openapi.
pnpm generate (or the Update OpenAPI Specs GitHub workflow) does four things:
- Fetches the latest specs.
- Rewrites
openapi/. - Rewrites
content/docs/payments/api-reference/<version>/. - Updates the API Reference group (Payments tab → Get Started) in
navigation.jsonand the/payments/api-reference/latestredirect.
⌘Ksearch: the index is exported to/api/search.jsonat build time and searched in the browser (components/search.tsx).- The
.mdversion of every page (/wallets.md), plus/llms.txtand/llms-full.txt. - Per-page actions: "Copy Markdown" and "Open in ChatGPT / Claude / …".
- OG images under
/og/.... - PostHog analytics, on the same project and host as before. Override them with
NEXT_PUBLIC_POSTHOG_KEYandNEXT_PUBLIC_POSTHOG_HOST.