Targeted documentation site for seasoned NEAR developers, builders, and founders. Complements the general NEAR docs with clinical, precise definitions and advanced technical content.
Deployed at: https://builder-docs.fastnear.com
Two repositories work together to deliver embedded API documentation:
| Repo | GitHub | Deploys to | Purpose |
|---|---|---|---|
| builder-docs (this repo) | fastnear/builder-docs |
builder-docs.fastnear.com |
Docusaurus site — all content pages, navigation, API key management |
| mike-docs | fastnear/docs |
fastnear.redocly.app |
Redocly portal — OpenAPI specs, Try-It console, operation pages rendered headlessly |
- The mike-docs repo contains OpenAPI YAML specs under
rpcs/andapis/— each YAML file becomes its own page - Redocly builds those specs into pages at the corresponding path (e.g.
rpcs/account/view_account.yaml→/rpcs/account/view_account) - The builder-docs
RpcRedoccomponent embeds those pages in iframes via thepathprop - API keys flow from builder-docs localStorage → iframe URL param → Redocly's
configure.ts→ Try-It console
builder-docs (this repo):
- MDX content pages (
docs/) RpcRedociframe embedding componentApiKeyManagercomponent for API key entry- Docusaurus config, sidebars, styling
mike-docs:
- OpenAPI YAML specs (
rpcs/openapi.yaml,apis/openapi.yaml) redocly.yaml— portal config (hidden sidebar/navbar/breadcrumbs)reference.page.yaml— enablespagination: itemfor single-operation pages@theme/ext/configure.ts— reads API key from URL params and injects into requestsscripts/dark-mode.js— dark mode support
- Node.js 18+
- Yarn (v4.9.2, included via corepack)
yarn install
yarn start # Dev server on http://localhost:3000cd /path/to/mike-docs
npm install
npx @redocly/cli preview # Preview server on http://localhost:4000- Start the Redocly preview (port 4000)
- Temporarily change
redoclyBasein an MDX file to"http://localhost:4000" - Start builder-docs (port 3000)
- Navigate to an RPC endpoint page and verify the iframe loads
yarn build # Output to build/
yarn serve # Serve the production build locallyEach YAML file in mike-docs rpcs/ gets its own Redocly page at the corresponding path. The URL is derived from the file path, not the operationId:
rpcs/account/view_account.yaml → /rpcs/account/view_account
rpcs/contract/call.yaml → /rpcs/contract/call
rpcs/block/block_by_height.yaml → /rpcs/block/block_by_height
The path prop in builder-docs MDX files must match these paths exactly. See CLAUDE.md for the full guide on adding new endpoint pages.
| URL | Description |
|---|---|
https://builder-docs.fastnear.com |
Production site |
https://fastnear.redocly.app |
Redocly portal (headless, no chrome) |
https://fastnear.redocly.app/rpcs/account/view_account |
Example single-operation page |
http://localhost:3000 |
Local builder-docs dev server |
http://localhost:4000 |
Local Redocly preview server |
CLAUDE.md— Development guide, component docs, adding new endpoint pagesREDOCLY_SETUP.md— How the Redocly portal is configured for headless embedding