Skip to content

Open-source manufacturing ERP, MES and QMS. Quoting, MRP, inventory, shop floor, quality and lot/serial traceability on one Postgres schema, with a REST API and MCP server. Self-host or use Carbon Cloud.

fix: update docs theme

Sidwebworks6fbbeed7727f
diff --git a/.claude/launch.json b/.claude/launch.json
new file mode 100644
index 0000000000..fefa1c23da
--- /dev/null
+++ b/.claude/launch.json
@@ -0,0 +1,11 @@
+{
+ "version": "0.0.1",
+ "configurations": [
+ {
+ "name": "docs",
+ "runtimeExecutable": "pnpm",
+ "runtimeArgs": ["-C", "apps/docs", "dev"],
+ "port": 3002
+ }
+ ]
+}
diff --git a/.claude/skills/carbon-docs/SKILL.md b/.claude/skills/carbon-docs/SKILL.md
index 84b1fb54df..1dafa8374f 100644
--- a/.claude/skills/carbon-docs/SKILL.md
+++ b/.claude/skills/carbon-docs/SKILL.md
@@ -21,6 +21,12 @@ or change docs **in that system, in its house style, grounded in real Carbon cod
> not absorbed; fixed-asset disposal is scrapping-only). **Every claim is grounded in source.** See the
> prime directive below — it overrides everything.
+> **What Carbon is:** a manufacturing system — **ERP** (the office) + **MES** (the floor), one platform over
+> one data model. **Academy is *not* a third product pillar**: it just hosts training **video lessons**, not a
+> SaaS app a customer buys. Never frame Carbon as "ERP, MES, and training/Academy"; site, meta, and landing
+> copy stay **ERP + MES**. (The `academy` app can appear in an architecture/monorepo listing — fine; describe
+> it as video-lesson hosting, not a pillar.)
+
## The prime directive — ground everything in source
The **holy source of truth is the actual source code + the LATEST database migrations**
@@ -56,14 +62,16 @@ Guide for the story. (Guide chapters were given 12 cross-flow links — interlin
table/column/enum/transition names + `file:line`. Flag what a generic description would get wrong.
2. **Pick the surface + placement.** Guide flow + frontmatter, or Reference folder + `meta.json` order.
3. **Write in the house voice** with the surface's real components (below). Lead with a concrete example.
-4. **Verify (always).** Regenerate, typecheck, build, and grep the prerendered HTML:
+4. **Verify — against the user's running dev server, read-only.** They usually have `pnpm --filter docs dev`
+ up. **Never** `pkill`/restart it, run `next build`, or `rm .next` under it — verify by fetching pages:
```bash
cd apps/docs
- pnpm exec fumadocs-mdx # regen .source — REQUIRED after frontmatter/schema changes
- npx tsc --noEmit # or: pnpm --filter docs typecheck
- pnpm --filter docs build # expect "✓ Generating static pages (N/N)"
- grep -o "your new heading" .next/server/app/guides/<slug>.html # confirm it rendered
+ pnpm exec fumadocs-mdx # regen .source if a content/frontmatter change didn't HMR
+ curl -sS -X GET http://localhost:3002/docs/<slug> | grep -o "your new heading" # confirm it rendered
```
+ A green `pnpm --filter docs build` (`✓ Generating static pages N/N`) is the gold standard — but only in a
+ clean checkout / when no dev server is running. `tsc` is noisy (a React 18/19 `@types` skew that
+ `next.config` ignores) — grep your own files out of the errors rather than expecting zero.
## Guides — the flow architecture
@@ -112,13 +120,20 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
- **Nav = `meta.json` `pages` arrays** (ordered). Folders: `content/docs/{reference,platform,integrate}/`.
Root order in `content/docs/meta.json`; a folder's order + sidebar title in its own `meta.json`
(`{ "title": "Product reference", "defaultOpen": true, "pages": [...] }`). Add a page → add its slug to
- the folder's `pages`.
+ the folder's `pages`. **Don't list `index` in `pages`** — fumadocs treats `index.mdx` as the folder index
+ and the nav renders it as **"Overview"**; listing it duplicates the title as a sibling. Integrations are
+ their own top-level section (`content/docs/integrations/`) grouped by category — document only `active`
+ integrations (omit `active: false` placeholders + commented-out ones).
- **Components** (`components/editorial/reference-components.tsx` + `components/mdx.tsx`):
- `<Callout type="info|note|warn|warning|error|success|tip" title?>…</Callout>` — type → badge+tone
(`info/note`→NOTE/blue, `warn/warning/error`→HEADS UP/amber, `success/tip`→GOOD TO KNOW/green). Note this
is a **different Callout API** than the Guides one (type vs tone+badge).
- `<Cards><Card title href icon?>…</Card></Cards>` — link-card grid (cross-surface navigation).
- `<EnvVars><EnvVar name type? default? required?>…</EnvVar></EnvVars>` — field/parameter rows.
+ - `<PlanBadge plan="Business" />` — flags a paid-tier feature. Whole-page gate → set `plan: Business` in
+ frontmatter (renders inline with the page title); section gate → drop `<PlanBadge>` in-body. Gated
+ features = `packages/ee/src/plan.ts` (Business/Partner). **Don't** badge free ones (email, exchange-rates).
+ The gate is **Cloud-only** — self-hosted isn't plan-gated; note that where it matters.
- `<Steps>/<Step>`, `<Tabs>/<Tab>` (fumadocs-ui), markdown tables, and code fences (dark panel).
- Voice is more technical/scannable than the Guides — fields, constraints, tables — but still names the
gotcha and links back to the Guide for the narrative.
@@ -132,6 +147,12 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
why. ("Quotes are optional — the opportunity is the thread.")
- **Explain the why, name the mistake, point to the next step.** If a paragraph does none of those, cut it.
- **Interlink** at natural seams (`[make-to-order tour](/guides/order)`).
+- **Lead, don't label.** Don't open a page with a generic, repeated heading — no `## Introduction` on guide
+ chapters (the chapter title is rendered for you) and no `## Why it matters` on reference pages. Open with
+ 1–2 substantive lead sentences, then go straight to the real sections. A heading that's identical on every
+ page is filler. Landing/index pages are **"Overview"**, never "Introduction".
+- **Name things as they are now.** Use a feature's current name; never narrate rename/removal history
+ ("formerly item rules", "storage units used to…"). When an old name and the code disagree, the code wins.
## Design / styling
@@ -152,6 +173,8 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
- **Regen `.source` before typecheck** after any frontmatter/schema change (the schema is baked into
`.source/` at generate time).
- **Figure keys must exist** — see the list above; a typo renders nothing, silently.
+- **Bare `{…}` in MDX is a JS expression.** A token in prose like `{item.id}` (e.g. inside an example rule
+ message) fails the build with `item is not defined`. Wrap any literal braces/tokens in backticks: `` `{item.id}` ``.
- **`Write` blocks on existing files** — natural collision protection when a parallel session co-writes the
docs. Just write the next uncovered gap; don't pause to coordinate unless asked.
- **`curl` GET can 405 in this sandbox** (a method-less request reads as POST) — use the WebFetch tool for
@@ -172,7 +195,7 @@ Each `##` heading becomes a sidebar rail entry — so structure chapters as 3–
## Verification bar
-Never declare docs done without: a green `pnpm --filter docs build`, `tsc` clean, the new content present in
-the prerendered HTML, every internal link resolving, names matching real code, and a re-read that confirms
-each page says what matters / names the mistake / points onward. Then record progress (this loop tracks it in
-`llm/tasks/` and the `project_docs_guide_flows` memory; the live API-reference/search work tracks its own).
+Never declare docs done without: the new content rendering (in the user's running dev server, or a clean
+`pnpm --filter docs build`), every internal link resolving, names matching real code, **no generic repeated
+headings**, and a re-read that confirms each page says what matters / names the mistake / points onward. Then
+record progress (`llm/tasks/` + memory). **Don't kill or rebuild under the user's running dev server.**
diff --git a/apps/docs/app/api-reference/authentication/page.tsx b/apps/docs/app/api-reference/authentication/page.tsx
index 81bff8aef0..674ddc8344 100644
--- a/apps/docs/app/api-reference/authentication/page.tsx
+++ b/apps/docs/app/api-reference/authentication/page.tsx
@@ -189,7 +189,7 @@ export default async function AuthenticationPage() {
/>
</Table>
- <ContentFooter prev={{ label: "Introduction", url: "/api-reference" }} />
+ <ContentFooter prev={{ label: "Overview", url: "/api-reference" }} />
</DocPage>
);
}
diff --git a/apps/docs/app/api-reference/layout.tsx b/apps/docs/app/api-reference/layout.tsx
index 4ca7f9412b..4e23246895 100644
--- a/apps/docs/app/api-reference/layout.tsx
+++ b/apps/docs/app/api-reference/layout.tsx
@@ -2,8 +2,8 @@ import type { ReactNode } from "react";
import { ApiNav } from "@/components/api/api-nav";
import { ApiConfigProvider } from "@/components/api/config-context";
import { Configurator } from "@/components/api/configurator";
+import { TableOfContents } from "@/components/api/toc";
import { MainHeader } from "@/components/main-header";
-import { ReadingProgress } from "@/components/reading-progress";
import { navTree } from "@/lib/api-data";
export default function ApiReferenceLayout({
@@ -13,7 +13,15 @@ export default function ApiReferenceLayout({
}) {
return (
<div className="min-h-screen w-full bg-[#FBFBF9]">
- <MainHeader active="api" mobileNav={<ApiNav tree={navTree} />} />
+ <MainHeader
+ active="api"
+ mobileNav={
+ <>
+ <Configurator />
+ <ApiNav tree={navTree} />
+ </>
+ }
+ />
<ApiConfigProvider>
<div className="mx-auto flex w-full max-w-[1480px] pt-[64px]">
@@ -24,8 +32,8 @@ export default function ApiReferenceLayout({
<main className="min-w-0 flex-1 px-[24px] pb-[140px] pt-[40px] lg:px-[56px]">
{children}
</main>
- <aside className="hidden w-[72px] shrink-0 justify-end pl-[16px] xl:flex">
- <ReadingProgress top={88} />
+ <aside className="hidden w-[232px] shrink-0 px-[28px] pt-[40px] xl:block">
+ <TableOfContents />
</aside>
</div>
</ApiConfigProvider>
diff --git a/apps/docs/app/api-reference/page.tsx b/apps/docs/app/api-reference/page.tsx
index 7952ca5125..93ef059bee 100644
--- a/apps/docs/app/api-reference/page.tsx
+++ b/apps/docs/app/api-reference/page.tsx
@@ -43,7 +43,7 @@ export default async function ApiIntroPage() {
return (
<DocPage>
<DocEyebrow>REST API</DocEyebrow>
- <DocTitle>Introduction</DocTitle>
+ <DocTitle>Overview</DocTitle>
<Lead>
The Carbon API is a REST interface over your manufacturing data — every
table and view is an endpoint, with full read and write access.
diff --git a/apps/docs/app/docs/layout.tsx b/apps/docs/app/docs/layout.tsx
index 9e305b9e88..0f43fdaf6d 100644
--- a/apps/docs/app/docs/layout.tsx
+++ b/apps/docs/app/docs/layout.tsx
@@ -1,8 +1,8 @@
import type { ReactNode } from "react";
import { DocsNav, type DocsNavNode } from "@/components/api/docs-nav";
+import { TableOfContents } from "@/components/api/toc";
import { MainHeader } from "@/components/main-header";
import { NavScrollChevron } from "@/components/nav-scroll-chevron";
-import { ReadingProgress } from "@/components/reading-progress";
import { ScrollHints } from "@/components/scroll-hints";
import { source } from "@/lib/source";
import "../reference.css";
@@ -54,8 +54,8 @@ export default function ReferenceLayout({ children }: { children: ReactNode }) {
<main className="min-w-0 flex-1 px-[24px] pb-[140px] pt-[40px] lg:px-[56px]">
{children}
</main>
- <aside className="hidden w-[72px] shrink-0 justify-end pl-[16px] xl:flex">
- <ReadingProgress top={88} />
+ <aside className="hidden w-[232px] shrink-0 px-[28px] pt-[40px] xl:block">
+ <TableOfContents />
</aside>
</div>
diff --git a/apps/docs/app/global.css b/apps/docs/app/global.css
index 1c3c97ea9e..a7bb1db51c 100644
--- a/apps/docs/app/global.css
+++ b/apps/docs/app/global.css
@@ -147,6 +147,12 @@
}
@layer base {
+ /* Anchor + reader scrolls glide; the reduced-motion block below forces this back to
+ * `auto`, so motion-sensitive users get an instant jump without any JS branch. */
+ html {
+ scroll-behavior: smooth;
+ }
+
body {
background-color: hsl(var(--background));
color: hsl(var(--foreground));
diff --git a/apps/docs/app/mcp/authentication/page.tsx b/apps/docs/app/mcp/authentication/page.tsx
index f3e61f5d53..9dcc54903e 100644
--- a/apps/docs/app/mcp/authentication/page.tsx
+++ b/apps/docs/app/mcp/authentication/page.tsx
@@ -74,7 +74,7 @@ export default function McpAuthenticationPage() {
/>
</Table>
- <ContentFooter prev={{ label: "Introduction", url: "/mcp" }} />
+ <ContentFooter prev={{ label: "Overview", url: "/mcp" }} />
</DocPage>
);
}
diff --git a/apps/docs/app/mcp/layout.tsx b/apps/docs/app/mcp/layout.tsx
index fb64b0342e..790e2eb0a3 100644
--- a/apps/docs/app/mcp/layout.tsx
+++ b/apps/docs/app/mcp/layout.tsx
@@ -2,14 +2,22 @@ import type { ReactNode } from "react";
import { ApiConfigProvider } from "@/components/api/config-context";
import { Configurator } from "@/components/api/configurator";
import { McpNav } from "@/components/api/mcp-nav";
+import { TableOfContents } from "@/components/api/toc";
import { MainHeader } from "@/components/main-header";
-import { ReadingProgress } from "@/components/reading-progress";
import { toolsNavTree } from "@/lib/tools-data";
export default function McpLayout({ children }: { children: ReactNode }) {
return (
<div className="min-h-screen w-full bg-[#FBFBF9]">
- <MainHeader active="mcp" mobileNav={<McpNav tools={toolsNavTree} />} />
+ <MainHeader
+ active="mcp"
+ mobileNav={
+ <>
+ <Configurator />
+ <McpNav tools={toolsNavTree} />
+ </>
+ }
+ />
<ApiConfigProvider>
<div className="mx-auto flex w-full max-w-[1480px] pt-[64px]">
@@ -20,8 +28,8 @@ export default function McpLayout({ children }: { children: ReactNode }) {
<main className="min-w-0 flex-1 px-[24px] pb-[140px] pt-[40px] lg:px-[56px]">
{children}
</main>
- <aside className="hidden w-[72px] shrink-0 justify-end pl-[16px] xl:flex">
- <ReadingProgress top={88} />
+ <aside className="hidden w-[232px] shrink-0 px-[28px] pt-[40px] xl:block">
+ <TableOfContents />
</aside>
</div>
</ApiConfigProvider>
diff --git a/apps/docs/app/og/route.tsx b/apps/docs/app/og/route.tsx
index f2fcde0057..3c850c526a 100644
--- a/apps/docs/app/og/route.tsx
+++ b/apps/docs/app/og/route.tsx
@@ -49,7 +49,7 @@ export async function GET(request: Request) {
width: "100%",
height: "100%",
padding: "76px 80px",
- background: "#F5F5F2",
+ background: "#FBFBF9",
fontFamily: "DM Sans"
}}
>
diff --git a/apps/docs/components/api/api-nav.tsx b/apps/docs/components/api/api-nav.tsx
index ec1f13da6c..8fd416c193 100644
--- a/apps/docs/components/api/api-nav.tsx
+++ b/apps/docs/components/api/api-nav.tsx
@@ -20,7 +20,7 @@ const METHOD_ABBR: Record<string, string> = {
};
const REST_API = [
- { label: "Introduction", href: "/api-reference" },
+ { label: "Overview", href: "/api-reference" },
{ label: "Authentication", href: "/api-reference/authentication" },
];
diff --git a/apps/docs/components/api/mcp-nav.tsx b/apps/docs/components/api/mcp-nav.tsx
index e658a2951a..7094c1cf14 100644
--- a/apps/docs/components/api/mcp-nav.tsx
+++ b/apps/docs/components/api/mcp-nav.tsx
@@ -12,7 +12,7 @@ const CLASS_DOT: Record<string, string> = {
};
const MCP_LINKS = [
- { label: "Introduction", href: "/mcp" },
+ { label: "Overview", href: "/mcp" },
{ label: "Authentication", href: "/mcp/authentication" },
{ label: "Tools", href: "/mcp/tools" },
];
diff --git a/apps/docs/components/api/toc.tsx b/apps/docs/components/api/toc.tsx
new file mode 100644
index 0000000000..774675c07f
--- /dev/null
+++ b/apps/docs/components/api/toc.tsx
@@ -0,0 +1,78 @@
+"use client";
+
+import { usePathname } from "next/navigation";
+import { useEffect, useState } from "react";
+
+type Heading = { id: string; text: string; level: number };
+
+/** "On this page" rail. Scans the rendered <main> for section headings and
+ * scroll-spies the active one. Picks up standalone h2/h3[id] (reference + MCP/API
+ * overview pages) plus the id'd <section> wrappers the API endpoint pages use, whose
+ * heading lives inside the section instead of carrying the id itself. */
+export function TableOfContents() {
+ const pathname = usePathname();
+ const [headings, setHeadings] = useState<Heading[]>([]);
+ const [active, setActive] = useState("");
+
+ useEffect(() => {
+ const nodes = Array.from(
+ document.querySelectorAll<HTMLElement>(
+ "main h2[id], main h3[id], main section[id]"
+ )
+ );
+ const items = nodes
+ .map((n) => {
+ if (n.tagName === "SECTION") {
+ const heading = n.querySelector("h2, h3");
+ return { id: n.id, text: heading?.textContent ?? "", level: 2 };
+ }
+ return { id: n.id, text: n.textContent ?? "", level: n.tagName === "H3" ? 3 : 2 };
+ })
+ .filter((h) => h.text.trim());
+ setHeadings(items);
+ setActive(items[0]?.id ?? "");
+
+ if (nodes.length === 0) return;
+ const observer = new IntersectionObserver(
+ (entries) => {
+ const visible = entries.filter((e) => e.isIntersecting);
+ if (visible.length === 0) return;
+ const top = visible.reduce((a, b) =>
+ a.boundingClientRect.top < b.boundingClientRect.top ? a : b
+ );
+ setActive((top.target as HTMLElement).id);
+ },
+ { rootMargin: "-88px 0px -68% 0px", threshold: 0 }
+ );
+ for (const n of nodes) observer.observe(n);
+ return () => observer.disconnect();
+ }, [pathname]);
+
+ if (headings.length === 0) return null;
+
+ return (
+ <nav className="sticky top-[88px] max-h-[calc(100dvh-120px)] overflow-y-auto scrollbar-hidden-until-scroll">
+ <p className="m-0 mb-[10px] font-[family-name:var(--font-mono)] text-[11px] font-medium uppercase tracking-[0.08em] text-[rgba(38,35,35,0.5)]">
+ On this page
+ </p>
+ <ul className="m-0 list-none border-l border-[#E7E7E3] p-0">
+ {headings.map((h) => (
+ <li key={h.id}>
+ <a
+ href={`#${h.id}`}
+ className={`-ml-px block border-l py-[5px] text-[13.5px] leading-[140%] transition-colors ${
+ h.level === 3 ? "pl-[24px]" : "pl-[14px]"
+ } ${
+ active === h.id
+ ? "border-[#1E84B0] text-[#1E84B0]"
+ : "border-transparent text-[rgba(38,35,35,0.68)] hover:text-[#262323]"
+ }`}
+ >
+ {h.text}
+ </a>
+ </li>
+ ))}
+ </ul>
+ </nav>
+ );
+}
diff --git a/apps/docs/components/editorial/guide-context.tsx b/apps/docs/components/editorial/guide-context.tsx
index f7f89901ac..c831ba9c78 100644
--- a/apps/docs/components/editorial/guide-context.tsx
+++ b/apps/docs/components/editorial/guide-context.tsx
@@ -103,12 +103,20 @@ export function GuideProvider({
const isUserScrolling = useRef(false);
const guardTimer = useRef<ReturnType<typeof setTimeout> | null>(null);
+ // Smooth scrolls omit `behavior`, deferring to the `scroll-behavior: smooth` on <html>
+ // — so reduced-motion users get an instant jump for free (their media query forces it
+ // back to `auto`). Chapter swaps pass smooth=false to land instantly under the view
+ // transition, where a glide would just fight the crossfade.
const scrollToAnchor = useCallback((id: string, smooth: boolean) => {
if (!id) return;
const target = document.getElementById(id);
if (!target) return;
- const top = target.getBoundingClientRect().top + window.scrollY - CHROME - 16;
- window.scrollTo({ top: Math.max(0, top), behavior: smooth ? "smooth" : "auto" });
+ const top = Math.max(0, target.getBoundingClientRect().top + window.scrollY - CHROME - 16);
+ window.scrollTo(smooth ? { top } : { top, behavior: "auto" });
+ }, []);
+
+ const scrollToTop = useCallback((smooth: boolean) => {
+ window.scrollTo(smooth ? { top: 0 } : { top: 0, behavior: "auto" });
}, []);
const goTo = useCallback(
@@ -118,9 +126,13 @@ export function GuideProvider({
const prev = activeRef.current;
const isNewChapter = pos.chapter !== prev.chapter;
- const anchor = chapter.items[pos.item]?.id ?? "";
+ // Only an explicit deeper section (item > 0) is a scroll target. Item 0 is the
+ // chapter's opening — landing there means the top of the page (its title + intro),
+ // not the first ## heading. Flow switches, prev/next, and Home all pass item 0, so
+ // they start at the top, and only a real section puts a #hash in the URL.
+ const anchor = pos.item > 0 ? (chapter.items[pos.item]?.id ?? "") : "";
// Mirror the active section in the URL so a sidebar click is shareable: land on
- // /guides/<slug>#<section-id> (or bare /guides/<slug> for a chapter with no ##).
+ // /guides/<slug>#<section-id> (or bare /guides/<slug> for the chapter top).
const url = anchor ? `/guides/${chapter.slug}#${anchor}` : `/guides/${chapter.slug}`;
// Suppress the scrollspy while we drive the scroll programmatically.
@@ -131,17 +143,19 @@ export function GuideProvider({
}, 700);
if (!isNewChapter) {
- // Same chapter — just glide to the section, no transition.
+ // Same chapter — glide to the targeted section, or back up to the top.
setActive(pos);
window.history.replaceState(null, "", url);
- requestAnimationFrame(() => scrollToAnchor(anchor, true));
+ requestAnimationFrame(() => (anchor ? scrollToAnchor(anchor, true) : scrollToTop(true)));
return;
}
- // New chapter — swap content + jump to its top inside a view transition.
+ // New chapter — swap content inside a view transition and land instantly: at the
+ // targeted section, or the top of the page when no section is targeted.
const apply = () => {
flushSync(() => setActive(pos));
- scrollToAnchor(anchor, false);
+ if (anchor) scrollToAnchor(anchor, false);
+ else scrollToTop(false);
};
const reduce =
@@ -160,7 +174,7 @@ export function GuideProvider({
window.history.replaceState(null, "", url);
},
- [chapters, scrollToAnchor],
+ [chapters, scrollToAnchor, scrollToTop],
);
// The header wordmark fires `carbon:home` (a plain <Link href="/"> can't reset the
diff --git a/apps/docs/components/editorial/how-to-layout.tsx b/apps/docs/components/editorial/how-to-layout.tsx
index 333238e39e..f1f69813d8 100644
--- a/apps/docs/components/editorial/how-to-layout.tsx
+++ b/apps/docs/components/editorial/how-to-layout.tsx
@@ -54,9 +54,9 @@ function PanelIcon() {
}
/** Mobile-only context bar — takes the slot the flow subnav holds on desktop. Shows
- * where you are (flow / chapter) and opens the nav drawer the header hamburger uses,
- * so the whole guide is one tap away without a row of chips. */
-function MobileContextBar({ flowName, title }: { flowName: string; title: string }) {
+ * where you are (chapter / current section, the section tracking the scrollspy) and
+ * opens the nav drawer, so the whole guide is one tap away without a row of chips. */
+function MobileContextBar({ chapter, section }: { chapter: string; section?: string }) {
return (
<button
type="button"
@@ -69,9 +69,13 @@ function MobileContextBar({ flowName, title }: { flowName: string; title: string
<span className="mx-auto flex w-full max-w-[1440px] items-center gap-[11px] px-[24px]">
<PanelIcon />
<span className="min-w-0 flex-1 truncate text-left text-[14px] font-[460] tracking-[0.15px] text-ink-ui">
- <span className="text-ink-faint">{flowName}</span>
- <span className="mx-[7px] text-[rgba(38,35,35,0.3)]">/</span>
- {title}
+ <span className={section ? "text-ink-faint" : undefined}>{chapter}</span>
+ {section ? (
+ <>
+ <span className="mx-[7px] text-[rgba(38,35,35,0.3)]">/</span>
+ {section}
+ </>
+ ) : null}
</span>
<svg width="13" height="13" viewBox="0 0 14 14" fill="none" aria-hidden="true" className="shrink-0">
<path
@@ -116,8 +120,8 @@ export function HowToLayout({ bodies }: { bodies: ReactNode[] }) {
const nextInFlow = flowChapters[posInFlow + 1];
return (
- <main className="min-h-screen bg-[#F5F5F2]" style={{ paddingTop: "116px" }}>
- <MobileContextBar flowName={currentChapter.flowName} title={currentChapter.title} />
+ <main className="min-h-screen bg-[#FBFBF9]" style={{ paddingTop: "116px" }}>
+ <MobileContextBar chapter={currentChapter.title} section={currentChapter.items[active.item]?.title} />
<div className="mx-auto flex w-full max-w-[1440px] px-[20px]">
{/* Sidebar (desktop) — sticky, self-start so it tracks the page scroll instead
of stretching; scrolls internally only if it outgrows the viewport. */}
@@ -128,7 +132,7 @@ export function HowToLayout({ bodies }: { bodies: ReactNode[] }) {
{/* Content — natural document flow. The window scrolls, so the footer only
appears once the reader reaches the true end of the chapter. The big left
indent eases off at xl, where the right-rail TOC fills that space instead. */}
- <div className="min-w-0 flex-1 pb-[80px] pt-[28px] min-[476px]:pl-[32px] min-[640px]:pb-[120px] min-[640px]:pt-[44px] min-[1000px]:pl-[130px] min-[1000px]:pr-[20px] xl:pl-[80px] xl:pr-[40px]">
+ <div className="min-w-0 flex-1 pb-[80px] pt-[28px] min-[640px]:pl-[32px] min-[640px]:pb-[120px] min-[640px]:pt-[44px] min-[1000px]:pl-[130px] min-[1000px]:pr-[20px] xl:pl-[80px] xl:pr-[40px]">
<div className="max-w-[620px]">
<div className="flex flex-wrap items-center gap-[12px]">
<span
@@ -148,6 +152,10 @@ export function HowToLayout({ bodies }: { bodies: ReactNode[] }) {
</span>
</div>
+ <h1 className="mt-[18px] text-[32px] font-normal leading-[112%] text-ink md:text-[40px]">
+ {currentChapter.title}
+ </h1>
+
{/* MDX body for the active chapter */}
{bodies[active.chapter]}
diff --git a/apps/docs/components/editorial/mdx.tsx b/apps/docs/components/editorial/mdx.tsx
index de0cb097b9..e1b7f75ba3 100644
--- a/apps/docs/components/editorial/mdx.tsx
+++ b/apps/docs/components/editorial/mdx.tsx
@@ -118,7 +118,7 @@ function Paragraph(props: ComponentPropsWithoutRef<"p">) {
return (
<p
{...props}
- className="m-0 mt-[20px] text-[15px] font-[460] leading-[160%] tracking-[0.15px] text-[rgba(38,35,35,0.70)]"
+ className="m-0 mt-[20px] text-[0.97rem] font-normal leading-[1.72] tracking-[-0.32px] text-[rgba(38,35,35,0.78)]"
/>
);
}
@@ -131,7 +131,7 @@ function ListItem({ children, ...props }: ComponentPropsWithoutRef<"li">) {
return (
<li
{...props}
- className="flex gap-[12px] items-start text-[15px] font-[460] leading-[160%] tracking-[0.15px] text-[rgba(38,35,35,0.70)]"
+ className="flex gap-[12px] items-start text-[0.97rem] font-normal leading-[1.72] tracking-[-0.32px] text-[rgba(38,35,35,0.78)]"
>
<span className="mt-[8px] shrink-0 w-[8px] h-[8px] rounded-[24px] border-[1.5px] border-[rgba(190,190,190,0.50)] bg-[#F5F5F2] shadow-[0_1px_1px_0_#FFF,inset_0_0_0.357px_1.071px_#FFF,inset_0_0_0.357px_1.071px_rgba(255,255,255,0.35),inset_0_1.429px_0_0_#FFF]" />
<span className="flex-1">{children}</span>
diff --git a/apps/docs/components/editorial/zoomable.tsx b/apps/docs/components/editorial/zoomable.tsx
index 33c38eab5a..3556b90dc7 100644
--- a/apps/docs/components/editorial/zoomable.tsx
+++ b/apps/docs/components/editorial/zoomable.tsx
@@ -25,6 +25,8 @@ function ignoreAbort(t: ViewTransitionLike | undefined) {
export function Zoomable({ children }: { children: ReactNode }) {
const [open, setOpen] = useState(false);
const [mounted, setMounted] = useState(false);
+ // True only while a zoom open/close transition is in flight — see `set`.
+ const [morphing, setMorphing] = useState(false);
// useId() contains characters illegal in a CSS ident (":"); strip them.
const name = `zoom-${useId().replace(/[^a-zA-Z0-9_-]/g, "")}`;
@@ -36,7 +38,14 @@ export function Zoomable({ children }: { children: ReactNode }) {
const doc = document as DocWithVT;
const reduce = window.matchMedia?.("(prefers-reduced-motion: reduce)").matches;
if (!reduce && typeof doc.startViewTransition === "function") {
- ignoreAbort(doc.startViewTransition(() => flushSync(() => setOpen(next))));
+ // Attach the morph name only for the life of this transition. Left on permanently,
+ // the thumbnail is promoted into *every* view transition on the page — including the
+ // chapter-nav crossfade — where a named group paints in the top layer, above the
+ // fixed header. flushSync commits the name before the API captures the old snapshot.
+ flushSync(() => setMorphing(true));
+ const t = doc.startViewTransition(() => flushSync(() => setOpen(next)));
+ ignoreAbort(t);
+ t?.finished?.finally?.(() => setMorphing(false));
} else {
setOpen(next);
}
@@ -61,8 +70,9 @@ export function Zoomable({ children }: { children: ReactNode }) {
<button
type="button"
onClick={() => set(true)}
- // The morph target lives on whichever of the two is currently shown.
- style={{ viewTransitionName: open ? "none" : name, opacity: open ? 0 : 1 }}
+ // The morph name is present only mid-transition (and only on the visible one of the
+ // pair), so the thumbnail never joins unrelated transitions like the chapter swap.
+ style={{ viewTransitionName: morphing && !open ? name : "none", opacity: open ? 0 : 1 }}
className="group relative block w-full cursor-zoom-in appearance-none border-0 bg-transparent p-0 text-left"
>
{/* Accessible name; prefixing keeps any visible caption in the name (Label in Name). */}
diff --git a/apps/docs/content/docs/index.mdx b/apps/docs/content/docs/index.mdx
index 00aeeecac0..243706429b 100644
--- a/apps/docs/content/docs/index.mdx
+++ b/apps/docs/content/docs/index.mdx
@@ -1,11 +1,10 @@
---
-title: Introduction
-description: Carbon is a manufacturing system — ERP, MES, and training in one platform. These are the technical docs.
+title: Overview
+description: Carbon is a manufacturing system — ERP for the office, MES for the floor. These are the technical docs.
---
-Carbon is a manufacturing system: **ERP** for the office (orders, purchasing, planning, accounting),
-**MES** for the floor (jobs, operations, tracking), and **Academy** for training — one platform over one
-data model.
+Carbon is a manufacturing system: **ERP** for the office (orders, purchasing, planning, accounting) and
+**MES** for the floor (jobs, operations, tracking) — one platform over one data model.
These are the **technical docs**: exact behavior, fields, and operations. If you're new, start with the
narrated [**Guide**](/guides/order), which walks one order from the sales desk to a shipped, traceable robot.
diff --git a/apps/docs/content/docs/platform/architecture.mdx b/apps/docs/content/docs/platform/architecture.mdx
index b73af54666..c10c063a14 100644
--- a/apps/docs/content/docs/platform/architecture.mdx
+++ b/apps/docs/content/docs/platform/architecture.mdx
@@ -12,7 +12,7 @@ Postgres database.
| --- | --- | --- |
| `erp` | React Router 7 + Vite | The ERP — orders, purchasing, planning, accounting. Also hosts the API, the MCP server, and the OAuth endpoints. |
| `mes` | React Router 7 + Vite | The Manufacturing Execution System — shop-floor job execution. |
-| `academy` | React Router 7 + Vite | The training app. |
+| `academy` | React Router 7 + Vite | Hosts training video lessons. |
| `docs` | Next.js (Fumadocs) | This documentation site. |
## Packages
diff --git a/apps/docs/content/docs/reference/approvals.mdx b/apps/docs/content/docs/reference/approvals.mdx
new file mode 100644
index 0000000000..87baa2e227
--- /dev/null
+++ b/apps/docs/content/docs/reference/approvals.mdx
@@ -0,0 +1,91 @@
+---
+title: Approvals
+description: Route purchase orders, quality documents, and suppliers for sign-off before they take effect — with amount-tiered approval rules.
+---
+
+An **approval** holds a document in a pending state until someone authorized signs off. Carbon decides
+whether a document needs approval — and who may grant it — from per-company **approval rules**. A rule
+exists per document type; for purchase orders it can also carry an amount tier, so a small order goes
+through untouched while a large one waits for the right person.
+
+Say you set a purchase-order rule at **$25,000** with the purchasing managers as approvers: a $4,000 order
+finalizes straight to **"To Receive"**, but a $40,000 order lands in **"Needs Approval"** and can't move
+until a manager approves it.
+
+## What can be approved
+
+Three document types support approval, each with its own pending status:
+
+| Document | Pending status | Approved → | Rejected → | Amount-tiered? |
+| --- | --- | --- | --- | --- |
+| Purchase order | "Needs Approval" | recomputed (e.g. "To Receive") | "Rejected" | Yes — the order total |
+| Quality document | "Draft" | "Active" | stays "Draft" | No |
+| Supplier | "Pending" | "Active" | "Rejected" | No |
+
+<Callout type="info">
+Only **purchase orders** use the amount threshold. Quality documents and suppliers match a single rule (its
+minimum is 0), so for them approval is simply on or off.
+</Callout>
+
+## Approval rules
+
+Rules live under **Settings → Approval Rules**, grouped by document type. Each rule:
+
+| Field | Description |
+| --- | --- |
+| Minimum amount | The tier floor — approval applies at or above this, up to the next rule's minimum. (Purchase orders only.) |
+| Who can approve | Groups **and/or** individual users eligible to decide. |
+| Default approver | A named fallback approver for the tier. |
+| Enabled | Whether the rule is live. |
+
+For purchase orders, several rules form **amount tiers** — each band runs from its minimum up to the next
+rule's minimum, and the top tier is "over $X". An order matches the single highest tier its total clears.
+
+<Callout type="note">
+There's **no global "require approval" switch.** A document type needs approval only while an **enabled**
+rule exists for it — disable or delete the rule and those documents finalize directly.
+</Callout>
+
+## Who can approve
+
+A user may decide a request if they're the tier's **default approver**, are listed directly under **who can
+approve**, or belong to one of the groups listed there. Authority is otherwise governed by ordinary module
+permissions — purchase-order and supplier decisions need purchasing access, quality decisions need quality
+access; editing rules needs settings access.
+
+<Callout type="warn">
+Approval authority flows **upward only.** Someone assigned to the $25k tier can approve a $4k order, but a
+$4k-tier approver cannot approve a $250k one. Higher tiers cover everything beneath them; lower tiers don't
+reach up.
+</Callout>
+
+## The decision
+
+The pending document shows **Approve** and **Reject** on its header, each opening a confirm dialog with an
+optional note. Approving runs the document's transition in one step; rejecting moves it to its rejected
+state (a quality document simply stays in **"Draft"**). The person who raised the request can also **cancel**
+it while it's still pending.
+
+Carbon notifies the resolved approvers when a request is raised, and the requester when it's decided — over
+**email, Slack, and in-app**. For purchase orders, approvers of lower tiers are also notified so they can see
+spend that cleared above their level.
+
+<Callout type="warn">
+Approval is **single-step, not a chain.** One matching rule is selected and **one** approver's decision
+finalizes the document — there are no sequential stages, parallel sign-offs, quorums, or delegation. The
+amount tiers choose *which rule applies*, not a series of steps a request walks through.
+</Callout>
+
+## Related
+
+<Cards>
+ <Card title="Purchase orders" href="/docs/reference/purchase-orders">
+ The one document whose approval is gated by an amount — the order total.
+ </Card>
+ <Card title="Quality" href="/docs/reference/quality">
+ Quality documents move from Draft to Active on approval.
+ </Card>
+ <Card title="Suppliers & customers" href="/docs/reference/suppliers-and-customers">
+ A new supplier can be held at Pending until approved.
+ </Card>
+</Cards>
diff --git a/apps/docs/content/docs/reference/items.mdx b/apps/docs/content/docs/reference/items.mdx
index d69fa399c0..3d2062b48c 100644
--- a/apps/docs/content/docs/reference/items.mdx
+++ b/apps/docs/content/docs/reference/items.mdx
@@ -5,8 +5,6 @@ description: The master record for everything you make, buy, or stock — parts,
An **item** is the master record for anything Carbon tracks: a finished part, a raw material, a tool, a consumable. Orders, methods, jobs, and inventory all point back to it. Its human-facing **part number** is the readable id — the underlying id is an internal key you rarely see.
-## Why it matters
-
An item's type, how it's replenished, and how it's tracked decide how it behaves everywhere downstream — whether it can be made or only bought, whether stock is counted, whether each unit needs a serial. Get the item right and the rest of the system follows.
## Fields
diff --git a/apps/docs/content/docs/reference/jobs.mdx b/apps/docs/content/docs/reference/jobs.mdx
index db398a51ec..86c896920f 100644
--- a/apps/docs/content/docs/reference/jobs.mdx
+++ b/apps/docs/content/docs/reference/jobs.mdx
@@ -5,8 +5,6 @@ description: One run of production — a single item, a quantity to make, and it
A **job** is the unit of production work in Carbon. It pins down one item, how many to make, where, and by when — and carries its own copy of the manufacturing method (the materials and operations) so the floor always builds from a fixed recipe, even as the part master changes underneath it.
-## Why it matters
-
Everything on the shop floor hangs off a job: the schedule board places its operations, material is issued against it, time is logged to it, and cost accumulates into its work-in-process. A sales order line that's made to order becomes a job; planning turns a stock shortfall into one. It's the bridge between demand and the floor.
## Fields
diff --git a/apps/docs/content/docs/reference/meta.json b/apps/docs/content/docs/reference/meta.json
index 54a6d0b625..4a44511577 100644
--- a/apps/docs/content/docs/reference/meta.json
+++ b/apps/docs/content/docs/reference/meta.json
@@ -13,6 +13,7 @@
"quotes",
"sales-orders",
"purchase-orders",
+ "approvals",
"shipments",
"receipts",
"invoices",
diff --git a/apps/docs/content/docs/reference/planning.mdx b/apps/docs/content/docs/reference/planning.mdx
index 277ced7559..370ca5d534 100644
--- a/apps/docs/content/docs/reference/planning.mdx
+++ b/apps/docs/content/docs/reference/planning.mdx
@@ -5,8 +5,6 @@ description: How demand turns into suggested jobs and purchase orders — and wh
Planning answers one question: *what should we make or buy, and how much?* Carbon's MRP looks at everything you owe and everything you have coming, and turns the gap into suggested orders — which you choose to act on.
-## Why it matters
-
Without planning you'd reorder by hand. MRP nets demand against supply across the whole bill of materials, so a shortfall on a top-level robot surfaces as the right quantity of every component, offset for its lead time — before you're caught short.
## Two stages
diff --git a/apps/docs/content/docs/reference/purchase-orders.mdx b/apps/docs/content/docs/reference/purchase-orders.mdx
index 59c206a9da..b35ff15628 100644
--- a/apps/docs/content/docs/reference/purchase-orders.mdx
+++ b/apps/docs/content/docs/reference/purchase-orders.mdx
@@ -5,8 +5,6 @@ description: A commitment to a supplier — what to receive, and what you'll be
A **purchase order** is a commitment to buy from a supplier. It may come from comparing supplier quotes or be raised directly, and it's the document receipts and supplier invoices reconcile against.
-## Why it matters
-
Like a sales order in reverse, a purchase order line keeps two independent counters — how much has been received, and how much has been invoiced — and only closes when both are satisfied. Receiving and billing advance the same order along separate axes.
## Line fields
@@ -45,4 +43,7 @@ The status is computed from the state of its lines, never set by hand.
<Card title="Receipts" href="/docs/reference/receipts">
How goods are received against a purchase order.
</Card>
+ <Card title="Approvals" href="/docs/reference/approvals">
+ Orders at or above a set amount wait for sign-off before they can be sent.
+ </Card>
</Cards>
diff --git a/apps/docs/content/docs/reference/quality.mdx b/apps/docs/content/docs/reference/quality.mdx
index 8b8516b89e..2a3a79d9b9 100644
--- a/apps/docs/content/docs/reference/quality.mdx
+++ b/apps/docs/content/docs/reference/quality.mdx
@@ -42,4 +42,7 @@ The module also covers **gauges and calibration** (with calibration-due tracking
<Card title="Receipts" href="/docs/reference/receipts">
How received goods are posted — and held for inspection.
</Card>
+ <Card title="Approvals" href="/docs/reference/approvals">
+ A quality document can require sign-off before it goes Active.
+ </Card>
</Cards>
diff --git a/apps/docs/content/docs/reference/quotes.mdx b/apps/docs/content/docs/reference/quotes.mdx
index 15648ffa37..65f14697df 100644
--- a/apps/docs/content/docs/reference/quotes.mdx
+++ b/apps/docs/content/docs/reference/quotes.mdx
@@ -5,8 +5,6 @@ description: A priced offer to a customer — the front of the sales flow.
A **quote** is a priced offer to a customer: the line items they asked about, what each costs, and for how long. It's where a sale begins, before there's any commitment to build or ship. Accept it and it becomes a sales order; let it lapse and it closes on its own.
-## Why it matters
-
A quote is where pricing is negotiated and recorded. Lines support quantity breaks, so the price for ten can differ from the price for a hundred, and the number you settle on is what carries forward to the order. Quotes are optional — an order can be raised directly — but when used, a quote and its eventual order are tied together through a shared opportunity rather than a rigid link.
## Fields
diff --git a/apps/docs/content/docs/reference/receipts.mdx b/apps/docs/content/docs/reference/receipts.mdx
index a642a60379..5ac7f22a93 100644
--- a/apps/docs/content/docs/reference/receipts.mdx
+++ b/apps/docs/content/docs/reference/receipts.mdx
@@ -5,8 +5,6 @@ description: Goods coming in — receiving against a purchase order and posting
A **receipt** brings goods in. Like shipments, one receipt model serves several sources — most often a purchase order, but also inbound transfers — and posting is what turns a delivery into stock on hand.
-## Why it matters
-
A receipt line soft-links back to the purchase order line it fulfills. Posting adds the quantity to inventory, raises the order line's received quantity, and advances the order — and, when accounting is enabled, debits inventory (or work-in-process, for outside processing) against a goods-received-not-invoiced accrual that the supplier invoice later clears.
## Fields
diff --git a/apps/docs/content/docs/reference/routings.mdx b/apps/docs/content/docs/reference/routings.mdx
index 3e6070d6c3..c8e153de13 100644
--- a/apps/docs/content/docs/reference/routings.mdx
+++ b/apps/docs/content/docs/reference/routings.mdx
@@ -7,8 +7,6 @@ A **routing** is the recipe the shop floor follows to make a part: the ordered l
the work center each one runs on. It's what turns "we have an order" into "here's exactly what happens,
in what order, where."
-## Why it matters
-
Without a routing, a job can't be scheduled or costed — there's nothing to place on the board and
nothing to estimate run time from. The routing is the bridge between *what* you're making (the item) and
*how* it gets made (the schedule).
diff --git a/apps/docs/content/docs/reference/sales-orders.mdx b/apps/docs/content/docs/reference/sales-orders.mdx
index f2d8e17a8d..46da99246c 100644
--- a/apps/docs/content/docs/reference/sales-orders.mdx
+++ b/apps/docs/content/docs/reference/sales-orders.mdx
@@ -5,8 +5,6 @@ description: A confirmed customer commitment — what to ship and invoice, track
A **sales order** is a confirmed commitment to deliver items to a customer. It may begin as a quote, or be entered directly; either way it's the document the rest of fulfillment keys off — shipments, invoices, and any make-to-order jobs all trace back to its lines.
-## Why it matters
-
The order line is where fulfillment is scored. Each line tracks how much was sold against how much has shipped and how much has been invoiced, and it stays open until both are complete — which is what lets one order be delivered and billed in batches without losing the remainder.
## Line fields
diff --git a/apps/docs/content/docs/reference/shipments.mdx b/apps/docs/content/docs/reference/shipments.mdx
index fa048d1df2..2fea1c658a 100644
--- a/apps/docs/content/docs/reference/shipments.mdx
+++ b/apps/docs/content/docs/reference/shipments.mdx
@@ -5,8 +5,6 @@ description: Goods going out — one posting model serving sales orders, returns
A **shipment** moves goods out the door. One shipment model serves several source documents — a sales order, a purchase return, an outbound transfer — each tagged by what it came from, so the same posting logic handles them all.
-## Why it matters
-
Creating a shipment changes nothing on hand. **Posting** it is the event that matters: it relieves inventory, advances the source document, and — when accounting is enabled — books the cost of what left. A shipment can be partial, so an order can go out in several.
## Fields
diff --git a/apps/docs/content/docs/reference/suppliers-and-customers.mdx b/apps/docs/content/docs/reference/suppliers-and-customers.mdx
index 31e8e624d9..d90a265931 100644
--- a/apps/docs/content/docs/reference/suppliers-and-customers.mdx
+++ b/apps/docs/content/docs/reference/suppliers-and-customers.mdx
@@ -34,4 +34,7 @@ Both records carry the same satellite shape: **contacts**, **locations/addresses
<Card title="RFQ to bill" href="/guides/rfq-to-po">
How a supplier quote becomes a purchase order.
</Card>
+ <Card title="Approvals" href="/docs/reference/approvals">
+ A new supplier can be held at Pending until approved.
+ </Card>
</Cards>
diff --git a/apps/docs/content/docs/reference/work-centers.mdx b/apps/docs/content/docs/reference/work-centers.mdx
index 741bacd740..dfd5003aeb 100644
--- a/apps/docs/content/docs/reference/work-centers.mdx
+++ b/apps/docs/content/docs/reference/work-centers.mdx
@@ -5,8 +5,6 @@ description: Where operations run — the stations and machines, their rates, an
A **work center** is a place on the floor where operations run — a station, a machine, a cell — tied to a location. It carries the rates used to cost and schedule work, and performs one or more **processes** (the capabilities, like *cut* or *weld*).
-## Why it matters
-
Routing operations are scheduled onto work centers, and a work center's rates price the labor and machine time logged against it. It's the link between an operation in the abstract and a real place with a cost and a calendar.
## Fields
diff --git a/apps/docs/content/guides/build.mdx b/apps/docs/content/guides/build.mdx
index e7483338aa..c56560b15a 100644
--- a/apps/docs/content/guides/build.mdx
+++ b/apps/docs/content/guides/build.mdx
@@ -5,8 +5,6 @@ label: "(II)"
index: 1
---
-## Introduction
-
Open the job you just released and look at what it actually takes to build a robot. This is where the product structure you set up in PLM meets the reality of the floor.
> PLM specifies the parts. The method adds the clarity: how each part is obtained, and whether it's built, bought, or pulled from the shelf.
diff --git a/apps/docs/content/guides/fixed-assets-acquire.mdx b/apps/docs/content/guides/fixed-assets-acquire.mdx
index 617849a4cb..5041eb0577 100644
--- a/apps/docs/content/guides/fixed-assets-acquire.mdx
+++ b/apps/docs/content/guides/fixed-assets-acquire.mdx
@@ -8,8 +8,6 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-## Introduction
-
Job costing followed the money a job spends. The books also carry the machines that do the building — Carbon tracks those as **fixed assets**: a press, a CNC, a forklift, anything you capitalize and depreciate rather than expense. These last two chapters follow one asset from the day it lands on the books to the day it leaves them.
A fixed asset is an accounting record, not a production resource. It belongs to an **asset class**, which carries the general-ledger accounts every asset of that kind posts to — the asset account, accumulated depreciation, depreciation expense, and the accounts used when it's written off.
diff --git a/apps/docs/content/guides/fixed-assets-sell.mdx b/apps/docs/content/guides/fixed-assets-sell.mdx
index ebb45b78fe..3ba6def7d5 100644
--- a/apps/docs/content/guides/fixed-assets-sell.mdx
+++ b/apps/docs/content/guides/fixed-assets-sell.mdx
@@ -8,8 +8,6 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-## Introduction
-
Eventually an asset leaves the books. There are two ways out, and Carbon treats them as genuinely different actions — handled by different teams, with different effects. You **sell** an asset to a buyer, or you **dispose** of it when it's done. Both start from an asset that's **"Active"** or **"Fully Depreciated"**.
The number that anchors both is **net book value** — what the asset is still worth on the books: its acquisition cost minus the depreciation accumulated against it.
diff --git a/apps/docs/content/guides/floor.mdx b/apps/docs/content/guides/floor.mdx
index 8549c851a2..25a0e65ed4 100644
--- a/apps/docs/content/guides/floor.mdx
+++ b/apps/docs/content/guides/floor.mdx
@@ -5,8 +5,6 @@ label: "(IV)"
index: 3
---
-## Introduction
-
Time to build. You release the first production job — the first 30 robots — to the shop floor, along with the subassembly jobs for the parts that feed it. This is the handoff most shops fumble; in Carbon it's a single, traceable step.
<Figure illustration="shopfloor-loop" caption="On the floor, every operation reports back: material consumed, labor logged, parts scanned." />
diff --git a/apps/docs/content/guides/job-costing.mdx b/apps/docs/content/guides/job-costing.mdx
index b2ce6b6648..706670949f 100644
--- a/apps/docs/content/guides/job-costing.mdx
+++ b/apps/docs/content/guides/job-costing.mdx
@@ -8,8 +8,6 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-## Introduction
-
The [make-to-order tour](/guides/order) built robots. This flow follows the money those jobs spend. As a job is worked, Carbon accumulates its cost — materials consumed, labor and machine time — into work-in-process, then releases that cost into finished-goods inventory when the job completes. Every figure here is grounded in real ledger postings, so it's worth being precise about what posts, when, and to which account.
## Accounting is a switch
diff --git a/apps/docs/content/guides/job-finish-close.mdx b/apps/docs/content/guides/job-finish-close.mdx
index 8b26c4e1ee..cd34e2cbdd 100644
--- a/apps/docs/content/guides/job-finish-close.mdx
+++ b/apps/docs/content/guides/job-finish-close.mdx
@@ -8,8 +8,6 @@ flowName: Manufacturing accounting
flowIndex: 3
---
-## Introduction
-
A job has been collecting cost in work-in-process. Three events turn that running balance into a settled set of books: the job **finishes** into inventory, the goods are **sold** out of inventory, and the job is **closed**. Each is a distinct posting, and the order matters.
## Finish into inventory
diff --git a/apps/docs/content/guides/order-to-cash.mdx b/apps/docs/content/guides/order-to-cash.mdx
index 145d60307a..a9527f3668 100644
--- a/apps/docs/content/guides/order-to-cash.mdx
+++ b/apps/docs/content/guides/order-to-cash.mdx
@@ -8,8 +8,6 @@ flowName: Quote to cash
flowIndex: 1
---
-## Introduction
-
You have a sales order sitting at **"To Ship and Invoice"**. Cash is four moves away: fulfill the lines, post a shipment, raise an invoice, record payment. None of them auto-chain — each is a discrete, posted step you take when the work is actually ready.
## The line stays open
diff --git a/apps/docs/content/guides/order.mdx b/apps/docs/content/guides/order.mdx
index fda8e44698..c234f8359d 100644
--- a/apps/docs/content/guides/order.mdx
+++ b/apps/docs/content/guides/order.mdx
@@ -5,8 +5,6 @@ label: "(I)"
index: 0
---
-## Introduction
-
Meet the shop we'll follow through this guide: an OEM that builds humanoid robots. One customer just placed an order for 90 units. By the end, you'll have followed that order all the way from the sales desk to a finished robot on the shipping dock — and seen most of Carbon along the way.
Carbon spans the office and the floor: ERP for orders, purchasing, and planning; MES for the people actually building. The thread that ties them together is a single order, so that's where we start.
diff --git a/apps/docs/content/guides/plan.mdx b/apps/docs/content/guides/plan.mdx
index afe37edbb5..e8a0127e4d 100644
--- a/apps/docs/content/guides/plan.mdx
+++ b/apps/docs/content/guides/plan.mdx
@@ -5,8 +5,6 @@ label: "(III)"
index: 2
---
-## Introduction
-
Creating that first job created demand — Carbon now knows it needs arm parts, motors, and machine time. But your sales orders only show part of the picture. The pipeline says more robots are coming, even though no order exists yet.
Planning on confirmed orders alone means you're always reacting. Carbon lets you plan on what you expect, too — and lets each part decide for itself how aggressively to replenish.
diff --git a/apps/docs/content/guides/quote-to-cash.mdx b/apps/docs/content/guides/quote-to-cash.mdx
index 770a876086..1098cd30b7 100644
--- a/apps/docs/content/guides/quote-to-cash.mdx
+++ b/apps/docs/content/guides/quote-to-cash.mdx
@@ -8,8 +8,6 @@ flowName: Quote to cash
flowIndex: 1
---
-## Introduction
-
The make-to-order tour started at a confirmed sales order. This flow rewinds to where that order comes from: a customer asking for a price, a quote that answers it, an acceptance that turns it into work. Quote to cash is the commercial spine that runs alongside the build — pricing on one end, a settled invoice on the other.
We'll follow one inquiry from a blank quote all the way to an order Carbon is ready to ship.
diff --git a/apps/docs/content/guides/receive-and-bill.mdx b/apps/docs/content/guides/receive-and-bill.mdx
index fd9049d762..bb505daad4 100644
--- a/apps/docs/content/guides/receive-and-bill.mdx
+++ b/apps/docs/content/guides/receive-and-bill.mdx
@@ -8,8 +8,6 @@ flowName: RFQ to bill
flowIndex: 2
---
-## Introduction
-
The order is placed and sitting at **"To Receive and Invoice"**. Two things now happen on their own schedules: the goods show up, and the supplier's bill shows up. They rarely arrive together, and Carbon is built around that fact — receiving and invoicing are separate posted steps that reconcile against the order, not against each other directly.
## The line keeps score
diff --git a/apps/docs/content/guides/rfq-to-po.mdx b/apps/docs/content/guides/rfq-to-po.mdx
index 84306a4d83..5bf751ff66 100644
--- a/apps/docs/content/guides/rfq-to-po.mdx
+++ b/apps/docs/content/guides/rfq-to-po.mdx
@@ -8,8 +8,6 @@ flowName: RFQ to bill
flowIndex: 2
---
-## Introduction
-
Every robot the shop builds is mostly parts it buys. RFQ to bill is the procurement side of the house — the mirror image of quote to cash, run from the buyer's chair. You ask suppliers for a price, you place an order, the goods arrive, and a supplier bill lands that you reconcile against what you actually ordered and received.
We'll follow one purchased part from a blank request all the way to a posted supplier invoice.
diff --git a/apps/docs/content/guides/ship.mdx b/apps/docs/content/guides/ship.mdx
index ff4d549657..b210d46b42 100644
--- a/apps/docs/content/guides/ship.mdx
+++ b/apps/docs/content/guides/ship.mdx
@@ -5,8 +5,6 @@ label: "(V)"
index: 4
---
-## Introduction
-
Building the robot is most of the work, but it isn't the whole job. You still have to prove it was built right, and close the loop with the customer and your books.
## Raise an issue