did-btcr2-js

ADR 022: Split User Docs (btcr2.dev) from Contributor Docs (this repo)

Status: Accepted

Date: 2026-04-08

Branch / PR: docs/typedoc-unified-site

Context

Prior to this decision, did-btcr2-js had a single VitePress site under docs/ that tried to be both a user-facing documentation site and a contributor-facing reference. It wasn’t really either:

The question was: rebuild the existing site with fresh content and keep VitePress, or change direction entirely?

The client decision was to split the documentation surface:

Decision

We adopted three sub-decisions that together implement the split:

1. Delete the VitePress site and rebuild with TypeDoc’s projectDocuments feature

TypeDoc 0.26+ has a projectDocuments option that includes arbitrary markdown files in its HTML output alongside the auto-generated API reference. We use it to merge hand-written narrative pages (under docs/architecture/, docs/contributing/, docs/adr/) with the auto-generated API reference into a single unified site. One tool. One command. One output directory.

This replaces the VitePress + typedoc-plugin-markdown + typedoc-vitepress-theme + vitepress-plugin-mermaid stack. Net: 9 devDependencies removed from the root package.json.

2. Docs output is not committed

The built site lives in .docs-site/ at the repo root and is gitignored. Contributors run pnpm docs:build locally to generate it, or pnpm docs:serve to preview at http://localhost:3000. The hand-written markdown sources are the only committed artifact: they are the single source of truth, fully readable in any editor or on GitHub.

This reverses the prior convention where docs/packages/ was committed. The prior convention created noise in PRs and caused stale content to drift into git history. The new convention treats docs the same as any other build artifact.

3. User docs surface lives at btcr2.dev, not here

All user-facing content: installation instructions, usage tutorials, API examples aimed at consumers, demos, versioning and release notes for end users: goes to btcr2.dev, not docs/. The README’s “Documentation” section explicitly directs users to btcr2.dev and contributors to docs/.

This lets us stop trying to serve two audiences with one set of files, stop leaving empty stub pages around, and stop conflating user tutorials with architecture docs.

Consequences

Positive:

Negative:

Alternatives considered

Verification

Follow-ups

Planned future work:

References