Skip to content
Toolkit

Cardsite Toolkit

The internal hub for taking Cardsite to launch: one static site in six sections (Overview, Readiness, QA, Staging, Release, Library), built from the repository's own documents, data and design system. Hub pages compose Studio 2.2's own components (st-*, copied in from design/studio at build time); Library pages use Studio's docs layout. Icons are Cardsite Icons, inlined.

The same build, with the same shell (lib/layout.mjs, lib/public.mjs), writes the repository's public surface: public/index.html, public/docs/, public/design/index.html, public/system/index.html, public/llm.txt, public/assets/ (except favicon.svg) and the root index.html. Those link into apps/toolkit/dist/ by relative path and open from disk. scripts/build-public.mjs owns the rest of public/design/.

Start

node apps/toolkit/build.mjs          # build into apps/toolkit/dist/ (Node 22, no dependencies)
cd apps/toolkit
npm run check                        # rebuild in memory; exit 1 if dist/ has drifted
npm test                             # unit tests: renderer, OpenAPI, readiness, links, tokens
npm run links                        # every relative link and asset in dist/ resolves
npm run serve                        # http://localhost:4900

dist/index.html also opens straight from disk.

What it reads

SourceBecomes
docs/**/*.md, root *.md, .station/, apps/apple/docs/launch/, apps/apple/AppStore/Pages; links between them are rewritten, a file with no page renders as code
data/readiness.jsonReadiness and the Overview's counts: owner, five-word status, evidence per item; optional short title per item and title/note per area
shared/contracts/openapi.yamlThe API reference: every operation, grouped by tag
docs/gtm/qa/, docs/gtm/release/The QA page (from the matrix), the usability, accessibility and filing pages, and the Release page's checklists
src/wip/*.htmlThe three working audits, on Studio's tokens and fonts
design/studio/packages/system/ and the Studio site's assets/Tokens, type, fonts, base, component and Home CSS, site.css and Portico, copied into dist/assets/
design/icons/build/svg/regular/Icons, inlined into each page

Output

dist/ and the public surface are committed and drift-checked (--check), except dist/studio/ and dist/icons/: copies of design/studio/public/ and design/icons/public/, made by every build, ignored by git and skipped by --check. public/ is not mounted: its pages are generated, not copied.

At run time the Overview and Staging pages read ./config.json (environment, apiUrl, webUrl, marketingUrl, toolkitUrl, release). The container entrypoint writes it; dist/config.json is the local staging-parity default (web :18080, API :18081, marketing :18082, Toolkit :18083). They probe the API's /health and /ready (through statusProxy when the container sets it), the web app's /healthz and the marketing site; a CORS refusal is reported as reachable, an unset or silent API as not deployed. Release ticks are kept in the browser's localStorage.

Rules

  • Change a status in data/readiness.json, with its evidence; never in a page.
  • Every value in src/assets/*.css is a Studio token (npm test holds it); toolkit.css only places Studio's components, it does not restyle them.
  • Generated files carry a header; nothing reads the clock.

Source: apps/toolkit/README.md

Library