The Docusaurus site serves two audiences from one source tree:
- Community explains current Green Goods flows for gardeners, stewards, evaluators, and funders.
- Builders explains architecture, package boundaries, integrations, testing, and agent workflows.
- Reference holds the shared glossary, formal ontology, design rationale, FAQ, brand kit, and credits.
A page's sidebar can differ from its folder. The FAQ (served at /faq) and glossary live in docs/reference/ and are listed in the Community sidebar. The same sidebar groups Voice and Kit under Brand. Brand Kit and Credits are also linked from the footer. The formal ontology lives in the reference folder and is listed under Builders. sidebars.ts owns placement.
Implementation facts come from code and configuration. Authored pages explain flows and stable rationale; generated pages project routes, exports, deployment artifacts, ontology, workflows, and QA scenarios from their owning sources.
Run commands from the repository root:
bun run dev -- docsThe docs server listens on port 3003. Before handing off a change, run the docs checks selected by the validation planner:
node docs/scripts/docs-audit.mjs --ci
bun run check --only docs-generated
bun run --cwd docs test
bun run --cwd docs build
bun run --cwd docs check:search-indexThe static build is written to docs/build/site. bun run --cwd docs build also fails unless the generated
search index contains every live documentation source route.
TinaCMS edits all authored Community pages, including the Welcome, How It Works and Why We Build pages, every role guide and nested task page, plus FAQ, Brand Voice and Brand Kit. Generated pages, including the glossary, are excluded. Existing pages can be edited; creating or deleting pages stays in the repository workflow so navigation and source ownership remain reviewed.
Page bodies use Tina's rich-text editor for prose, headings, lists, links, tables and images. Image captions, callouts, next-step links and FAQ answers have content forms under each block's Edit menu. The form exposes only the title, description and page content. Navigation, layout, ownership, status and verification metadata stay hidden and are retained on save.
Community components are registered globally in src/theme/MDXComponents, so pages do not need
imports. GuideImage, Callout, InlineLabel and ContentLink retain the site's presentation
while exposing content. AnchoredHeading keeps existing fragment links; the content-elements
remark plugin restores real headings before Docusaurus generates its table of contents. The
same plugin supplies FAQ disclosure controls. Keep last_verified as a quoted date string so
saves preserve YYYY-MM-DD rather than converting it to a timestamp.
The collection save hook assigns fragment IDs to new FAQ and heading blocks; existing IDs stay unchanged.
The media root covers all of static/img, including Community photos, screenshots and Builder
images, so saving a page preserves every existing image path.
For local editing, stop the ordinary docs server first, then run from the repository root:
bun run --cwd docs cms:devOpen http://localhost:3003/admin/index.html. Local mode saves directly to this checkout.
The Tina API uses port 4001; its local data layer uses port 9000. Check port ownership before
starting another server. The public documentation continues to use Docusaurus's file content.
Production editing uses https://docs.greengoods.app/admin/index.html after deployment.
TinaCloud's project must use Path to Tina = docs, allow the local and production URL origins,
and grant each editor access as a project collaborator. The client ID is public configuration.
Configure the read-only TINA_TOKEN in the green-goods-docs Vercel project's production and
preview environment settings; never commit it. For local cloud builds, supply it through the
process environment. Do not create package-level environment files.
TINA_BRANCH explicitly selects the content branch when set; otherwise the Vercel deployment's
Git branch is used, with develop as the local fallback. Saves commit to that branch. Publishing
follows its existing Git/Vercel deployment workflow. The free plan does not include Tina's built-in
editorial approval workflow. An editor's save is not a substitute for repository review.
The production editor uses TINA_BRANCH=feature/community-content in Vercel. Editor saves go to
that review branch; publish them through a pull request to develop. Keep the content branch
available after merging. If GitHub deletes it, recreate it from the merged develop commit
before editing again.
The Vercel entrypoint runs the existing docs checks, then cms:build, then the Docusaurus build.
Cloud schema checks stay enabled. Commit tina/tina-lock.json after schema changes so TinaCloud
can index the branch; generated clients and editor bundles remain ignored. Verify editor changes
with bun run --cwd docs test tina/collections.test.ts, bun run --cwd docs typecheck, and the
selected docs build/audit checks. Official setup: https://tina.io/docs/guides/docusaurus.
docs/
├── docs/
│ ├── community/ current user flows by role
│ ├── builders/ technical explanations and generated projections
│ └── reference/ shared public reference material
├── src/ Docusaurus theme and interactive components
├── static/ directly consumed public assets
├── docusaurus.config.ts
├── sidebars.ts
└── vercel.json
Every live page must be reachable from a sidebar or its role/category index. Do not use unlisted: true as an archive. Historical text remains recoverable through Git history.
Use authored pages for user goals, prerequisites, steps, recovery, stable concepts, rationale, and navigation. Keep changing inventories out of prose. Link to the owning package guide, code, configuration, ontology, workflow, or generated page instead.
Frontmatter must name the audience, owner, status, and exact source_of_truth paths. The docs audit treats broken local authority paths and links as errors, and on a hand-written page so is a repository path in a code span that does not exist (a package page's directory table is read relative to its package).
A community guide page covers one job. It follows the same order on every page, modeled on Submit Work:
- Title: a verb phrase naming the job.
- Purpose: one or two sentences in the reader's words.
- Before you start: a short list, including physical needs such as being at the garden.
- Steps: numbered Markdown lists that use the exact on-screen labels in bold.
- How you know it worked: what the screen shows.
- What happens next: who acts next, and what the reader sees when they do.
- If something goes wrong: each problem beside its fix, then one support path.
- Next step: exactly one primary link.
Each page must make sense when opened directly from a message or a search result. Concept pages (Welcome, How It Works, Why We Build) use a one-line definition, an everyday comparison, a short story, and a plain "what it is not" instead.
Check every label against the owning view or packages/shared/src/i18n/en.json, and every statement about review, rewards, privacy, or money against the code that enforces it, before it goes on a page.
Every community guide opens with its title, a short purpose and a contextual visual before prerequisites. Editorial illustrations fill the article width. Center standalone screenshots at a readable width; keep a side-by-side layout only when the adjacent text explains the image. Preserve detailed captures beside their steps. Use distinct opening artwork for each guide, with page-specific scenes or meaningful variants. Generated artwork must not show human faces, including background figures, portraits or reflections. Use tools, places, completed work or carefully framed hands to ground the task; inspect the full image and its opening crop.
Screenshots support the text and never carry a step alone. Capture the real interface from a Storybook fixture, demo or public page, never a live garden's private member records or photos. Keep useful alt text.
Contextual opening photos do not need captions unless identifying a real example adds meaning. Screenshot captions are optional: use a short sentence to explain one choice, state or result that is worth noticing. Keep instructions and consequential warnings in the guide text before the relevant action; a caption may reinforce them.
Capture date, fixture, viewport and revision belong in the asset ledger, not repeated in page captions. New generated artwork and its prompts are recorded in the illustration ledger. Preserve third-party attribution and licenses. Verify every new image path, intrinsic dimensions and opening crop on phone and desktop.
The Community glossary is generated from selected human_concepts; formal definitions and
technical vocabulary live in the generated Builders ontology. Both use the canonical ontology
and its projection data. Former glossary anchors remain useful links to their formal destination.
Update sources and run both generators, then docs-generated and ontology checks. Never copy
formal definitions into authored pages. The ontology gate locks definitions/surfaces and checks
public links; deterministic check mode rejects stale outputs. Authored explanations still need
source review when business meaning or availability changes.
reference/faq.mdx uses the docs-owned FaqQuestions and FaqQuestion components. Each question
keeps an explicit published ID. Native disclosures support keyboard use; direct links reveal
answers, and highlighted search visits open them. Open all answers provides a browser-find path.
The Markdown twin exposes every question and complete answer, without the interaction wrappers.
Keep important privacy and funding warnings visible in the relevant task guide as well.
Generated formal table destinations use TermAnchor, which registers the real DOM target with
Docusaurus's link checker. The twin emits a native HTML anchor. Test preserved destinations and
regenerate through the owning renderer; do not silence broken-anchor checking to make a move pass.
Community and Builders pages share one voice:
- Second person, active voice, plain words, about an 8th-grade reading level.
- Why before what, condition before instruction, one idea per sentence.
- The product's own labels are the vocabulary. Explain "garden" as a community doing regenerative work together, so nobody reads it as gardening only.
- Community pages leave out protocol names, standards, and network names, except where a reader paying or signing with their own wallet has to choose one. Technical depth belongs on Builders.
- No em dashes, sentence-case section headings, and no superlatives.
- Reassure where people hesitate. Be firm only where the integrity of the record is at stake: your own photos, real dates, real places.
- Money and privacy statements describe what the contracts and code do. They never repeat a guarantee from interface copy.
The Brand kit page lives at /brand-kit. static/brand/index.html forwards the old /brand URL so the page does not collide with its download directory. Keep the /brand/v2/ and /brand/v3/ asset URLs stable.
docs/reference/brand.mdx owns the public /brand-kit page. Original exports remain in
static/brand/v2/; canonical dark-green icons, palette, fonts, graphics and templates live in
static/brand/v3/, with complete and focused ZIPs in static/brand/. src/data/brand-kit-v3.json owns the current
file inventory, dimensions, source node IDs, colors, and public URLs.
src/components/docs/BrandAssets.tsx reads it to show a visual gallery with downloads beside each preview. Keep its public
copy, static/brand/v3/export-manifest.json, and the manifest inside the ZIP in sync. Original
vectors, preview sheets, and the export README are bundled in the ZIP rather than served separately.
The docs-owned src/components/docs/BrandAssets.tsx is the closest existing implementation.
Its original size selectors and disclosures hid available variants and downloads. Its current
catalog focuses on dark green, white and black: paired standard/enlarged logo previews, one
symbol framing, and direct SVG/512/1024/2048 PNG links. AssetPreview shares the existing preview
behavior between LogoCard's framing comparison and the single-asset AssetCard; download rules
stay local to this docs catalog. Favicons and home-screen files share one Website files section.
Other colors, landscape/original framing and uncommon sizes remain in the unchanged complete kit
and family ZIPs. Keep these bundles beside their relevant sections and avoid selectors or
disclosures. Fonts come from the existing vendored social-card fonts;
their license travels with the public downloads and ZIPs. New graphics and SVG templates reuse
the recorded Figma vector shapes and identify themselves as kit compositions.
Keep the /brand route and existing versioned download paths stable when adding a new export.
Dark green (#367D44) is the canonical brand color, confirmed by the owner on 4 October 2026.
Brand artwork and the downloadable CSS do not override application or docs UI tokens. Keep
original Figma green and optional recolors labeled as reference colors. Preserve v2 downloads,
including static/brand/green-goods-brand-kit-v2.zip and static/brand/v2/website-ready/ files.
Generated MDX is committed and reviewed, but never edited directly. Each page declares its generator, source list, and source digest.
node scripts/docs/generate.mjs
node scripts/docs/generate.mjs --scope package
node scripts/docs/generate.mjs --scope integration
node scripts/docs/generate.mjs --scope ontology
node scripts/docs/generate.mjs --scope workflow
node scripts/docs/generate.mjs --scope qa
node scripts/docs/generate.mjs --scope agenticbun run check --only docs-generated renders every projection in memory and fails when an output is missing, extra, or stale.
Vercel Git integration is the only deployment owner. Configure the green-goods-docs project with Root Directory docs, enable source access outside that directory for the monorepo authorities, use main as the production branch, and create previews for other branches. docs/vercel.json installs from the repository lockfile and runs the same authority, generation, test, and build checks used locally. Do not link this configuration to the Admin, QA, or Storybook Vercel projects that share the repository.
GitHub's Docs workflow validates changes but does not deploy them. Production uses https://docs.greengoods.app after the custom domain is attached to the READY main deployment.