From 7982b672bd3b4ad9be9503be9dbfe62fcffae401 Mon Sep 17 00:00:00 2001 From: bordumb Date: Fri, 14 Aug 2026 19:45:19 +0100 Subject: [PATCH 01/29] docs: establish contract-driven documentation foundation --- .gitignore | 1 + .nvmrc | 1 + README.md | 30 +- app/components/AuthsLogo.tsx | 3 + app/components/CodeGroup.tsx | 45 +-- app/components/SdkCodeExample.tsx | 56 +-- app/components/SdkReference.tsx | 1 + app/components/SearchDialog.tsx | 59 +++ app/components/SiteFooter.tsx | 3 +- app/components/SiteHeader.tsx | 30 +- app/components/code/CodeBlock.tsx | 77 ++++ app/components/code/CodeBlockWithResult.tsx | 26 ++ app/components/code/HighlightedCode.tsx | 31 ++ app/components/code/index.ts | 2 + .../foundation/DocumentationPrimitives.tsx | 25 ++ app/components/foundation/index.ts | 1 + app/globals.css | 348 +++++++++++++----- .../protect-rest-effect.mdx | 1 + app/layout.tsx | 2 +- app/lib/code-blocks.ts | 12 + app/lib/code-theme.ts | 19 + app/lib/page-graph.ts | 21 ++ app/page.tsx | 2 +- contracts/docs-bundle.fixture.json | 8 + next.config.ts | 11 +- package-lock.json | 33 +- package.json | 8 +- public/images/auths_logo.svg | 68 ++++ schemas/docs-contract.ts | 56 +++ tools/build-page-model/check.mjs | 7 + tools/fetch-release/verify-bundle.mjs | 14 + tools/render-markdown/README.md | 5 + worker/index.ts | 3 +- 33 files changed, 818 insertions(+), 191 deletions(-) create mode 100644 .nvmrc create mode 100644 app/components/AuthsLogo.tsx create mode 100644 app/components/SearchDialog.tsx create mode 100644 app/components/code/CodeBlock.tsx create mode 100644 app/components/code/CodeBlockWithResult.tsx create mode 100644 app/components/code/HighlightedCode.tsx create mode 100644 app/components/code/index.ts create mode 100644 app/components/foundation/DocumentationPrimitives.tsx create mode 100644 app/components/foundation/index.ts create mode 100644 app/lib/code-blocks.ts create mode 100644 app/lib/code-theme.ts create mode 100644 app/lib/page-graph.ts create mode 100644 contracts/docs-bundle.fixture.json create mode 100644 public/images/auths_logo.svg create mode 100644 schemas/docs-contract.ts create mode 100644 tools/build-page-model/check.mjs create mode 100644 tools/fetch-release/verify-bundle.mjs create mode 100644 tools/render-markdown/README.md diff --git a/.gitignore b/.gitignore index 8e2987c..2013f90 100644 --- a/.gitignore +++ b/.gitignore @@ -21,6 +21,7 @@ # misc .DS_Store *.pem +*.tsbuildinfo # debug npm-debug.log* diff --git a/.nvmrc b/.nvmrc new file mode 100644 index 0000000..e222811 --- /dev/null +++ b/.nvmrc @@ -0,0 +1 @@ +22.19.0 diff --git a/README.md b/README.md index 9f4e17d..1d66426 100644 --- a/README.md +++ b/README.md @@ -1,16 +1,15 @@ -# Auths Documentation Prototype +# Auths Documentation -This repository is the visual and authoring prototype for `docs.auths.dev`. -It deliberately stops before AP-SPEC-040 implementation: no generated SDK -reference, release contract ingestion, cross-repository automation, search -index, or deployment qualification exists yet. +This repository builds the public `docs.auths.dev` experience from an immutable, +checksum-addressed release bundle produced by `auths-dev/auths-proof`. -The current template proves four things: +The product contract is: -- a concrete design language for Auths documentation; -- a product-led landing page with progressive disclosure; -- MDX as an authoring format for technical guides; and -- synchronized Rust, TypeScript, and Python examples on one semantic page. +- begin with outcomes and five stable verbs; +- progressively disclose protocol and operational depth; +- generate reference facts from installed SDK and runtime artifacts; +- synchronize Rust, TypeScript, and Python examples by scenario identity; and +- publish equivalent HTML and canonical Markdown for people and agents. ## Pages @@ -34,15 +33,14 @@ npm run lint npm test ``` -## Prototype decisions +## Architecture decisions Read: - [`docs/TOOLING.md`](docs/TOOLING.md) - [`docs/DESIGN_LANGUAGE.md`](docs/DESIGN_LANGUAGE.md) -This prototype uses Vinext/Vite for a fast preview and deploy loop while using -MDX for the representative guide. It does not silently replace AP-SPEC-040's -Astro/Starlight implementation decision. Before the full epic work begins, use -this prototype to decide which shell to carry forward; the design tokens, -components, MDX content, and interaction contract are intentionally portable. +The site is static-first and MDX-authored. Release facts enter only through a +strict bounded bundle parser. The site has no production database, no provider +credentials, and no runtime authority. Client JavaScript is reserved for search, +navigation state, synchronized language selection, and copy actions. diff --git a/app/components/AuthsLogo.tsx b/app/components/AuthsLogo.tsx new file mode 100644 index 0000000..0e6d345 --- /dev/null +++ b/app/components/AuthsLogo.tsx @@ -0,0 +1,3 @@ +export function AuthsLogo() { + return