Public documentation workspace for Amber Protocol, designed for human readers and AI consumption.
/— Product landing page for the docs workspace/docs— Documentation library with lifecycle stage badges (Draft / Final / Official)/docs/[slug]— Latest doc version (AI checks, notes, feedback, related context)/docs/[slug]/v/[version]— Pinned historical doc version/docs/[slug]/diff— Diff viewer between doc versions/paths— Collections + recommended reading paths (breadcrumbs + prev/next)/studio— Write + publish (create/edit/publish/unpublish/finalize/delete doc files locally)/assistant— Ask AI (Gemini + internal docs context via/chunks.json)/templates— Template tool (prompt pack + markdown scaffold + optional sections)/blocks— Blocks library (disclaimers + glossary + local custom blocks)
/docs.json— Versioned docs index (schema version + content hashes)/search-index.json— Build-time search index used by the UI/chunks.json— Chunked docs export with stable chunk IDs (RAG-friendly)/embeddings-manifest.json— Doc + chunk content hashes (sync pipelines)/updates.json— Pollable build ID + latest doc hashes/claims.json— Lightweight extracted number/date claims per doc/raw/[slug]— Raw markdown for the latest version/raw/v/[slug]/[version]— Raw markdown for a pinned version
- Docs live in
content/docs/*.md(YAML frontmatter + markdown body). - Unpublished docs set
archived: truein frontmatter (excluded from the app, exports, sitemap, and static params). - Templates live in
content/templates/*.json. - Blocks (disclaimers + glossary) live in
content/blocks/*.json. - Search synonyms live in
content/search/synonyms.json.
The template tool lets you standardize document structures across teams.
- Pick a template type (executive brief, launch note, partner announcement).
- Fill required metadata fields.
- Copy the generated AI prompt to Claude/OpenAI/Kimi.
- Copy the markdown scaffold back into your docs workflow.
This keeps doc shapes consistent while still allowing model-assisted drafting.
pnpm install
pnpm devOpen http://localhost:3000.
pnpm qapnpm build runs QA automatically (frontmatter schema, internal links, assets, Official gates, external links).
You can manage doc files in two ways:
- Browser UI: open
/studioand connect yourcontent/docsfolder (Chrome/Edge recommended). - CLI (repo-local):
pnpm docs:new -- --slug treasury-strategy --title "Treasury Strategy" --summary "How we manage treasury risk." --updated-at 2026-02-08
pnpm docs:publish -- --slug treasury-strategy --version 2026-02-08
pnpm docs:finalize -- --slug treasury-strategy --version 2026-02-08
pnpm docs:unpublish -- --slug treasury-strategy --version 2026-02-08
pnpm docs:delete -- --slug treasury-strategy --version 2026-02-08Gemini calls happen client-side from the browser (static export friendly). Paste your API key in:
/templates(Generate Markdown)/assistant(Ask AI with internal docs context)
Keys are saved locally in your browser to avoid retyping.
This project is configured as a static Next.js export for easy Cloudflare Pages hosting.
- Create a Cloudflare Pages project named
amber-docs. - Set your custom domain to
docs.amberprotocol.orgin Pages → Custom domains. - Ensure the
amberprotocol.orgDNS zone is in Cloudflare.
pnpm deploy:cloudflareThis runs:
pnpm build(produces staticout/)wrangler pages deploy out --project-name amber-docs
A workflow is included at .github/workflows/deploy-cloudflare-pages.yml.
Add these GitHub repo secrets:
CLOUDFLARE_API_TOKENCLOUDFLARE_ACCOUNT_ID
Then pushing to main or work triggers deployment automatically.
Optional secrets (webhooks):
DOCS_WEBHOOK_URLDOCS_WEBHOOK_SECRET
Convex schema and functions are in convex/. Start local Convex dev server with:
npx convex dev