Skip to content

Contributing to the Docs

This site is a VitePress docsite, themed from design-system/DESIGN.md, gated behind Cloudflare Access. Drop a markdown file into a category folder and it appears in the sidebar. Need richer than markdown? Inline Vue lives in the same file. Need a fully standalone artifact? Drop it in public/.

InternalAudience: OnRamp engineersStack: VitePress + Vue + DESIGN.md tokens
5
Categories
3
Tiers of fidelity
~30s
To add a markdown doc
0
Config edits required

Quick start

bash
# from the repo root
bun install
bunx vitepress dev docs --port 5199
# → http://localhost:5199

There's also a Docs entry in .claude/launch.json for the Claude Code preview tooling.

Drop-in workflow. Create docs/<category>/my-doc.md, add a title: and order: to its frontmatter, restart the dev server, and it's in the nav + sidebar. No config.mts edits.

Pick a tier of fidelity

Pick the lowest tier that fits — higher tiers add maintenance cost.

Tier 1 — Markdown

Plain markdown, fenced code, mermaid, frontmatter. The default for most docs.

md
---
title: My Doc
order: 3
---

# My Doc

Short intro paragraph.

## A section

- Lists
- `inline code`
- Tables, fenced code, mermaid all work natively

​```python
def hello(): return "world"
​```

​```mermaid
flowchart LR
    A[Start] --> B[Done]
​```

Use it for: runbooks, RFCs, architecture notes, dev-setup guides — anything that reads top-to-bottom.

Categories

Every category is a top-level folder under docs/. Drop a .md in and it appears.

FolderSidebar labelGoes here
architecture/ArchitectureSystem/design docs.
design-system/Design SystemDESIGN.md tokens, style guidance.
proposals/Proposals & RFCsDesign proposals/RFCs. Copy proposals/_template.md.
runbooks/Runbooks & GuidesOperational runbooks.
dev-setup/Dev SetupNew-machine / dev-environment setup.

Add a new category

Add one row to CATEGORIES in config.mts and create the matching folder with at least one .md (otherwise it's skipped):

ts
const CATEGORIES = [
  { dir: 'architecture', label: 'Architecture' },
  // ...
  { dir: 'my-new-cat', label: 'My New Category' },
]

Mermaid diagrams

Fenced ```mermaid blocks render client-side. The theme cleans up after failures so a single broken diagram can't pollute other pages.

Semicolons break sequenceDiagram text. ; is a statement separator in mermaid's sequence grammar. Inside any sequenceDiagram message or Note, use , ,, or <br/> instead.

Note over X: token validated; identity locked    ❌ parse error
Note over X: token validated, identity locked    ✓

Design tokens

The docsite imports the live DESIGN.md token set. Use the CSS variables for every color, font, and radius — never hardcode brand hex.

css
/* available globally on every page */
color: var(--color-primary);          /* #893eff */
background: var(--vp-c-bg-soft);      /* dark-mode aware surface */
border-radius: var(--radius-lg);      /* 16px */
font-family: var(--font-body);
Variable familySourceUse for
--color-primary, --color-brand-*, --color-purple-50..950 (+ pink/green/red/orange/black ramps)design-system/generated/tokens.css (from DESIGN.md)Brand, accents, tints.
--vp-c-bg, --vp-c-bg-soft, --vp-c-bg-alt, --vp-c-text-1, --vp-c-text-2, --vp-c-divider, --vp-c-brand-1VitePress + theme overridesSurfaces and text — dark-mode aware. Prefer these for chrome.
--radius-xs..xl, --font-bodyDESIGN.mdShape and type.

See /design-system/ in the sidebar for the palette and full token list.

Run locally / build / deploy

bash
bunx vitepress dev docs --port 5199    # dev w/ HMR
bunx vitepress build docs              # production build — catches dead links

The build is dependency-free (bunx resolves VitePress on demand). The deploy build command is just bunx vitepress build with docs as the root.

Dev-server restart needed for new files/categories. The nav + sidebar are generated by a filesystem scan at config-load time. HMR covers content edits live, but a newly added file or category only shows up after the dev server restarts (or in a fresh build).

See also

  • For Claude Code agents: the docs skill — same content, agent-targeted.
  • Tokens source of truth: design-system/DESIGN.md. Hand-edit; generated artifacts flow from it.
  • VitePress docs: vitepress.dev for the framework itself (Vue in markdown, frontmatter, custom theme).

Internal documentation — gated behind Cloudflare Access.