Skip to main content

What you need to supply

The framework generates a help center, but it cannot invent your product. This page lists everything it needs from you, in the order you meet it, with what breaks if you skip it.

Collect the first two sections before you start — those are the ones that stall an adoption halfway through.

1. Identity​

One command writes all of these into site.config.ts:

npm run init-product -- --name "Acme Suite" --org "Acme Inc." \
--org-url https://acme.example --app-url http://localhost:3000 \
--docs-url https://docs.acme.example --tagline "Help center"
InputUsed forRequired
--nameProduct name in the navbar, page titles, social cardYes *
--orgFooter copyright lineYes *
--org-urlFooter "Website" linkYes *
--app-urlThe running app that screenshots and videos are taken fromYes *
--docs-urlCanonical URLs, sitemap, social card linksYes *
--taglineSits under the product nameNo

Leave --docs-url at its placeholder and the build warns you: canonical URLs and the sitemap would point at example.com.

2. Credentials​

Copy .env.example to .env (gitignored) and fill it in.

VariableUsed forRequired
APP_URLWhere capture and record pointYes *
DEMO_USER / DEMO_PASSSigning in for authenticated screenshotsOnly for gated screens
KB_BASE_URLYour platform API rootOnly for the KB export
KB_USER / KB_PASSAn account with support-triage rightsOnly for --write exports
warning

Use seeded demo data, never real customer accounts. Whatever is on screen ends up committed to a repository, and a screenshot cannot be unpublished.

3. How to sign in to your app​

Rewrite tools/flows/login.mjs — about fifteen lines of Playwright that fill your login form. It is the only app-specific code in the repo, by design.

Without it, npm run login cannot produce auth.json, and every screenshot of a signed-in screen fails.

4. The pipeline​

In docgen.config.json:

InputMeaning
sources[].repoPath to the repo the docs describe, for example ../acme-api
sources[].extract.specPath to the OpenAPI JSON inside that repo
sources[].outputWhere generated pages land
kb.apiBasePathPrefix for the knowledge-base API
kb.componentsYour product's category vocabulary

kb.components is the one people underestimate. Every guide page's category frontmatter must match an entry exactly, and the export skips any page that does not. Take the list from your product's own category list rather than inventing one.

npm run doctor reports sources still pointing at the ../your-api-repo placeholders.

5. Vocabulary​

Add your product name, brand names, and domain terms to .vale/styles/config/vocabularies/Docs/accept.txt, one regex per line, handling case like [Ww]ebhooks?.

Without it the prose gate reports your own product name as a spelling error.

6. Per module, as you document it​

Each module gets a manifest at tools/media/<module>.json:

InputMeaning
urlThe route to photograph
clicksSelectors to click first, for screens the URL alone cannot reach
highlightsWhat to ring, and in which colour — ::yellow fill this in, ::action press this, ::red careful
scrollBring a target below the fold into view
videos[].flowA Playwright flow file that drives the walkthrough

These come from your app's DOM. Stable data-testid attributes are worth adding to the app for this purpose — npm run audit:selectors then verifies every selector still exists, and tells you before a screenshot silently rots.

7. Deployment, if you use the containerised path​

The image is environment-neutral; everything that differs per environment is a runtime variable. Replace:

InputWhere
The app that verifies sessions and hosts the login (DOCS_APP_URL), the noindex robots header for staging (DOCS_ROBOTS_TAG)infra/compose/dev-vps.env, infra/compose/prod-vps.env
Where the session is verified on the shared network (DOCS_AUTH_UPSTREAM)the same two files (default http://server:3002)
Container image name and the product stack's network nameinfra/compose/prod.yml (image:, networks.default.name)
Image labels — vendor, source, licenceinfra/docker/Dockerfile
Hostnames, TLS, IP allowliststhe product stack's edge — not this repo (its edge proxies docs.<domain> to docs:80)

One more lives outside this repo: your app must issue its session cookie for the parent domain (SESSION_COOKIE_DOMAIN=.acme.example), or the auth gate sends every visitor to a login they have already passed.

8. Repository settings, if you want the scheduled checks​

Media drift detection ships disabled, because a hosted runner cannot reach your app. Set these to switch it on:

SettingKindMeaning
MEDIA_DRIFT_RUNNERVariableA runner label that can reach your app
APP_URLVariableWhere that runner finds it
APP_REPOVariableowner/name of the app, for the selector audit
DEMO_USER / DEMO_PASSSecretSigning in during the nightly run
APP_REPO_TOKENSecretOnly when the app repo is private

9. Optional​

Safe to leave empty — each stays switched off until you fill it in.

InputWhereEffect when set
repo.url / repo.editBasesite.config.tsAdds "Edit this page" and a footer link
analytics.gtagTrackingIdsite.config.tsAnalytics on production builds only
feedback.endpointsite.config.ts"Was this page helpful?" under every page
localessite.config.tsA language dropdown
announcementsite.config.tsA dismissible bar across the top

Decisions, not values​

Four things no default can choose for you:

  • Which modules to document first. Support volume beats feature order.
  • Your KB category vocabulary (section 4) — it has to match the product.
  • Whether the framework's own manual ships publicly. It is author documentation; on a customer help center mark those pages audience: internal and draft: true.
  • When to graduate. Run npm run drop-sample once your own content exists, and before the first public deploy.

Checking your work​

npm run doctor

It reports missing prerequisites, placeholder values still in place, unresolvable pipeline sources, and endpoint pages the manifest does not track — each with the exact command that fixes it. Run it first, and whenever anything misbehaves.