Imported from iamnotdou/bound-docs (
AGENTS.md). Install upstream withnpx skills add iamnotdou/bound-docs. Copyright stays with the author.
bound-docs — the documentation site
Next.js 16 + Fumadocs. Prose lives in MDX under content/docs; everything
factual about the protocol is rendered from @bound/sdk. Private repo, deployed
to docs.boundprotocol.dev. npm, not pnpm — the lockfile is package-lock.json.
Definition of done
npm run build # type-checks and prerenders every page
npm run lint
There is no CI workflow and no test suite: the Vercel build is the gate. A build
failure on a missing MDX component means it was never registered in
components/mdx.tsx. npm run types:check runs next typegen first, which is
what generates the PageProps / LayoutProps globals the pages use.
The one rule that matters
No contract address, public key, RPC URL, package version or protocol link is
written into MDX. Every such value has a component in components/protocol.tsx
(<Address>, <ContractTable>, <AccountTable>, <NetworkTable>, <Sdk>,
<SdkVersion>, <RpcUrl>, <NetworkName>, <ExternalLink>), backed by
@bound/sdk/deployments or by lib/protocol.ts. They are registered globally, so
MDX uses them without an import. Hardcoding a value is how docs start lying about
a live deployment.
- New deployment →
npm i @bound/sdk@latest. Nothing else changes. - New link, package, contract blurb or actor description →
lib/protocol.ts. - A value with no component yet → add the component, then use it.
Fenced code blocks are the one exception: they are illustrative and may carry a literal demo address.
Map
| Path | What it is |
|---|---|
content/docs/ |
The MDX. Sidebar order is explicit in each meta.json |
lib/protocol.ts |
Every fact this site states, other than addresses |
components/protocol.tsx |
The components that render those facts |
components/mdx.tsx |
The global MDX component registry |
lib/source.ts |
Fumadocs loader; also getLLMText and the image/markdown URLs |
lib/shared.ts |
Route constants (/docs, /og/docs, /llms.mdx/docs) |
lib/layout.shared.tsx |
Nav chrome. The wordmark links to boundprotocol.dev, not / |
proxy.ts |
Content negotiation — see below |
Conventions
- Sidebar order is explicit. A page not listed in its folder's
meta.jsonwill not appear where you expect. Section dividers are"---Title---"entries. - Every page is agent-readable twice.
proxy.tsrewrites/docs/<path>.mdand any/docs/<path>request that prefers markdown onto/llms.mdx/docs/<path>/content.md, and/llms.txt+/llms-full.txtserve the index and the whole corpus. A new route that shadows those paths breaks the machine-readable copies silently. KeepVary: Accepton the negotiated rewrite. /redirects to/docs. This host serves documentation and nothing else; the marketing home is boundprotocol.dev.- No "Edit on GitHub" link. The repo is private, so
githubUrlis deliberately absent from the docs page — it would 404 for every reader. - Tone: written for a reader deciding whether to trust the protocol, not for
one who already agrees. State limits plainly.
content/docs/trust-model.mdxsets the register, andcontent/docs/v2/open-problems.mdxkeeps the unresolved parts visible rather than tidied away. - Page frontmatter is
title,description,icon(a lucide name, resolved bylucideIconsPlugin).
Connections
@bound/sdkcomes from npm and is the only source of addresses, endpoints, actor keys and deploy provenance.sdkVersioninlib/protocol.tsis read out of the installedpackage.json, so the docs always name the version the examples were written against.- Contracts and the SDK live in the sibling
boundrepo; the app lives inbound-web.linksinlib/protocol.tsis the only place those hosts are named — includinglinks.dashboard, which still points at the landing page's/apprather than anapp.subdomain.