Maintaining these docs
How this site is built, how to write a page in both languages, add a diagram or a screenshot, publish illustrations, and deploy.
This site is Astro with MDX, built to static files, with Pagefind for search. It holds two products: the public user guide, and this internal Developers tab, which only the internal build contains. Every page exists in English and Vietnamese. Screenshots are captured from a throwaway copy of the app filled with a fictional workspace, and illustrations are published from master images kept in the repository. The docs folder’s README is the reference for every command and component.
- 1 Write An MDX page in English and Vietnamese
- 2 Capture Screenshots from a throwaway stack
- 3 Assets Illustrations published as WebP
- 4 Build Static pages and the search index
- 5 Deploy The script swaps the new build in
Running the site
cd docs
bun install
bun run dev # live reload on http://localhost:4321
bun run build # the public site, plus the search index
bun run build:internal # the same with the Developers tab
bun run preview # serves the last build
bun run lint # Biome
bun run check # astro checkSearch reads the index that a build writes, so run a build once before you test search under dev. The dev stack also runs this site with the Developers tab on port 7005.
Files you create
| To add | Create or edit |
|---|---|
| A page | src/content/docs/<lang>/<tab>/<slug>.mdx, served at /<lang>/<tab>/<slug> |
| A diagram | A file in src/components/diagrams/, prefixed with your section |
| Screenshots | The section’s spec file in capture/shots/ |
| An illustration | A master PNG in .superdesign/docs-assets/ at the repository root |
An index.mdx is the landing page of its tab or folder.
Writing a page
Every page starts with frontmatter, which the build validates; a bad field fails the build.
---
title: Local development # quote it if it contains a colon
description: One sentence.
group: Contributing # the left-nav group
groupOrder: 1 # the group's place in the tab
order: 1 # the page's place in the group
audience: [engineers] # sales-reps, managers, workspace-admins, engineers, everyone
type: how-to # tutorial, how-to, concept, reference, overview
readingTime: 6 # minutes
updated: 2026-11-12 # the day you last checked the page against the app
internal: true # true for every Developers page
related: ["/en/developers/architecture"]
---Write links and images from the site root (/en/developers/architecture, /img/sec-use.png). When the site is built under a path prefix, the build adds the prefix.
Describe the app as it is today and use its words: Person and People, Channel, Audience, Step, Draft, Knowledge, Fit score, Unassigned pool and Claim. Developers pages explain what each part does and why, and how data moves between parts, with a flow diagram wherever there is a flow. They do not cite file paths, class or function names, setting names or line numbers; the commands a reader types stay. No page carries secrets, server addresses or customer data, internal ones included.
Every page, in both languages, is checked with the humanizing-writing skill’s script. With the skill installed, run it on each page you write or change and fix what it reports:
python3 ~/.claude/skills/humanizing-writing/ai-tells.py --stats <page>.mdxComponents
Pages use the MDX components without imports: Callout, Steps and Step, Shot, Tabs and Tab, Cards and Card, Prereqs, KeyRules, Accordion and AccordionGroup, UI, Term, Kbd, Glossary. Their props are in the README. A Term that is not in the glossary fails the build.
Write on-screen labels with UI, in English as the app shows them, in both languages: <UI>Run campaign</UI>.
Diagrams
For a row of numbered stages, use DiagramFlow straight from the page; it needs no new file. Give it a title and a list of stages, each with a title and optionally a body, an icon and a detail. With stepper, Play and Step walk the stages and show each stage’s detail, and on a phone the row of stages turns into a column.
A diagram that needs its own drawing is a file in the diagrams folder, and the file becomes a global component named after it: a file called developers-architecture is <DevelopersArchitecture />. Prefix the name with your section so names cannot collide. A diagram that does not compile breaks the build of every page, so build after you add one and keep a half-written one out of the folder.
Such a diagram sits inside the shared diagram frame, which gives it the header, the Play and Step buttons and full screen. It takes its colours only from the site’s theme tokens, which is what makes it work in light and dark, and carries its English and Vietnamese text side by side. The architecture diagram is a complete example: a fixed-size canvas that scrolls sideways on a phone, boxes as buttons, and details shown on hover or focus.
Screenshots
A page shows a capture with <Shot code="inbox-drafts" alt="..." caption="..." points={["...", "..."]} />. Codes are kebab-case and start with the section that owns them (inbox-, people-, campaigns-). Until a code has been captured, the page shows a dashed placeholder with the code and the alt text, and the build prints a warning but succeeds.
A spec names the code, the page to open, the account that is signed in, an optional step that opens a menu or dialog first, the crop, and the points to number, in the order the page’s labels follow. Point at elements by role and the accessible name you can see in the app, so a restyle does not move the numbers.
The run builds the same backend and web app images a release ships.
cd docs
bun run capture # build, start, seed, capture every code, stop
bun run capture --keep # the same, and leave the stack running
bun run capture --reuse inbox-drafts # rewrite named codes against a kept stackThe run uses the database tool from the backend’s dependencies, so run bun install in the backend folder first.
Illustrations and brand
Master images are PNGs in the .superdesign folder at the repository root. bun run assets publishes WebP copies into the site, 512 px on the longest side and 960 px for the home page hero. A page uses the path /img/<name>.png. Commit the published files. A missing image prints a warning and leaves an empty space of the same size. The logo files are copies of the app’s own brand images.
Vietnamese pages
Every page has a Vietnamese twin at the same path under vi, with the same slug and the same frontmatter keys. Translate title, description and group; keep commands and UI labels as they are; point links at /vi/.... A page with no Vietnamese file shows the English one under /vi/... with a banner saying it is not translated yet, so a missing translation never breaks a link.
Publishing
The deploy script builds the site on the server and swaps it in; with the internal flag it publishes this Developers tab too. What it checks and how to roll back is on Deployment and operations.