Skip to content

Site D: arc42 architecture docs on the site (client-side Mermaid) - #50

Merged
OliEder merged 12 commits into
mainfrom
feat/site-d-arc42
Aug 29, 2026
Merged

OliEder merged 12 commits into
mainfrom
feat/site-d-arc42

Conversation

@OliEder

@OliEder OliEder commented Aug 28, 2026

Copy link
Copy Markdown
Contributor

Plan D — the final piece of the site redesign. Base is main (not stacked). Pulls the validator's arc42 architecture docs onto the site under Build.

What

  • arc42 on the site — a build step fetches the 13 arc42 Markdown files from opencoachingformat/ocf-validator at a pinned commit (OCF_ARC42_COMMIT, separate from the validator pin), renders them with marked, and publishes them under Build → Architecture: an overview TOC + one page per section via getStaticPaths.
  • Mermaid renders client-side. Verified fact: @mermaid-js/mermaid-cli (mmdc) is a fragile heavyweight build dep — its install downloads headless Chromium and failed outright here, and the deploy workflow has no browser. So arc42's Mermaid blocks become <pre class="mermaid"> + a mermaid@11 ESM module script (jsDelivr, 200/CORS *) that renders in the visitor's browser. PlantUML (spec page, Plan A) stays build-time Kroki SVG. Design doc updated to reflect this fact-driven revision.
  • Build hub gains an Architecture card.

Verified

  • npm run build: 35 pages; /build/architecture/ overview + 13 section pages resolve.
  • 3 sections carry <pre class="mermaid"> + the mermaid module script; overview is mermaid-free; no leftover raw ```mermaid fences.
  • Unit tests: mermaid-marked 7/7 (mermaid fences → raw-source <pre>, non-mermaid stays escaped; index sort). No network in tests.
  • Generated arc42 HTML is gitignored (built in CI, not committed).
  • a11y: /build/architecture/ added to axe (mermaid-free overview); section pages excluded to avoid flaky client-render timing.
  • Independent review: clean. XSS surface via set:html of remote markdown is bounded by the trusted repo + pinned commit (no <script> in output) — noted as accepted risk.

Leaving the merge to you. This completes the 4-plan redesign (A diagrams, B nav/homepage, C Try-it+sports, D arc42).

🤖 Generated with Claude Code

Oliver-Marcus Eder and others added 12 commits August 28, 2026 22:57
…d-time

Verified: @mermaid-js/mermaid-cli install fails (headless Chromium), deploy
workflow has no browser. mermaid@11 ESM loads from jsDelivr (200, CORS *).
So arc42 Mermaid renders client-side; PlantUML stays Kroki build-time SVG.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…pi@1.11.3)

The marked-added lock was inconsistent (nested @emnapi 1.11.1 but missing the
top-level 1.11.3 that npm ci on Linux resolves). Rebuilt the lock from scratch;
npm ci now passes and the build is unchanged (35 pages).
@OliEder
OliEder merged commit 719836f into main Aug 29, 2026
1 check passed
@OliEder
OliEder deleted the feat/site-d-arc42 branch August 29, 2026 05:17
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant