The public site for AgentBox: the marketing landing page and the Fumadocs documentation. Deployed on Vercel as a single Next.js app.
- A Next.js 16 App Router app (
@agentbox/web), pnpm workspace member. - Docs are authored as
.mdfiles undercontent/docs/and rendered by Fumadocs (fumadocs-ui/fumadocs-core/fumadocs-mdx) at/docs. - The marketing home is a hand-authored static page (the "Home v4" design),
served at
public/home.htmlat/(see rewrites below). It keeps its inline<style>and inline<script>(the hero app/terminal mockup, the animated orchestration-loop grid, the provisioning manifest, the access switcher) — that's why it stays a static document instead of being ported to React. The design source lives in the sibling../agentbox-designrepo (AgentBox Home v4.html+feature-widgets.css/feature-widgets.js, which are inlined intohome.htmlhere); the agent glyphs live inpublic/assets/agent-*.png. - Theme matches the AgentBox Docs design mockup (
AgentBox Docs.html, kept in this folder as a non-served reference): light, green accent#128a4f, IBM Plex Sans/Mono.
app/— root layout (RootProvider+ IBM Plex fonts),app/docs/**(docs shell +[[...slug]]renderer),app/api/version(version JSON endpoint).app/global.css— imports the Fumadocs preset, then maps the Fumadocs--color-fd-*variables onto the AgentBox design tokens. Edit theme here.content/docs/— the.mddocs sources +meta.json(sidebar order).lib/—source.ts(Fumadocs loader),layout.shared.tsx(nav/brand/badge),version.ts(npm-registry fetch + fallback), generatedversion-fallback.json.components/version-badge.tsx— the version pill (docs nav).components/figure.tsx—<Figure src? caption />: a docs screenshot/diagram; renders a dashed placeholder until asrcis added.public/— Next public root:home.html(the marketing page) + assets (logo.svg, favicons,cover.jpg, …) + generatedschema/+screenshots/(docs figure images).scripts/copy-schema.mjs— prebuild step (see Build).next.config.mjs—createMDX()+ rewrites.images.md— how to (re)capture every docs figure: the one test environment to provision (boxes across docker/hetzner/vercel fromexamples/express-ready, with example prompts), the inline render + window-capture tooling, and the image catalog ordered by capture phase.
next.config.mjs adds two beforeFiles rewrites:
/→/home.html— serves the static marketing page at the site root./public/:path*→/:path*— the marketing markup references assets with a legacy/public/prefix; this maps them to Next's public root, so the HTML needs no asset-path edits.
Latest AgentBox version, shown on both home and docs. Source of truth is
apps/cli/package.json.
lib/version.tsfetchesregistry.npmjs.org/@madarco/agentbox/latestwith hourly ISR (revalidate: 3600); on failure falls back tolib/version-fallback.json, snapshotted fromapps/cli/package.jsonat build.- Docs:
<VersionBadge/>(Server Component) in the nav. - Home: the static page fetches
/api/versionclient-side and fills the pill.
pnpm dev/pnpm buildrunscripts/copy-schema.mjsfirst (predev/prebuild): copiesagentbox.schema.json+user-config.schema.jsonintopublic/schema/, and writeslib/version-fallback.jsonfrom the CLI version.postinstallrunsfumadocs-mdxto generate the.sourcetypes.
- Next.js is auto-detected; set the Vercel project Root Directory to
apps/web. Novercel.jsonneeded (the old static one was removed; its schema copy now lives inprebuild).
- Theme via the
--color-fd-*overrides +--agb-*tokens inapp/global.css; reuse the existing tokens, don't invent new colors. - New docs pages: add a
.mdundercontent/docs/and list it inmeta.json. - Docs figures: use
<Figure caption="…" />(placeholder) and fillsrcfrompublic/screenshots/; capture/recapture perimages.md. - No emojis in output unless asked.