Factory Design System

The shared brand & UI rules for every Factory service — PFactory, AIFactory, TFactory, and the CFactory cockpit. Follow these so the suite looks like one product, not four. CFactory is the reference implementation; when in doubt, match what ships in CFactory/apps/frontend-web/src/index.css.

The goal: each service is instantly recognizable as part of the Factory family, while the cockpit (CFactory) remains the place where all three converge. One palette, one type system, one set of component shapes, one motion language.


1. Principles

  1. Tell the truth about now. Never show a number the data doesn’t support — no “100%” when work failed, no fabricated percentages, no lifetime totals dressed as live state. A status the operator can’t trust is worse than no status.
  2. Terminal-cockpit voice. This is operator tooling, not marketing. Monospace is the dominant UI voice; data is first-class; chrome is quiet.
  3. Calm until it isn’t. Idle UI is still and low-contrast. Trouble (failures, anomalies) is loud and unmissable. Don’t spend attention on decoration; spend it on state changes.
  4. One accent, sharp stage colors. A single chrome accent (aqua) carries interactivity; the three stage colors mean exactly one thing each; red means alarm.
  5. Accessible by default. Every animation honors prefers-reduced-motion; dialogs trap focus and announce themselves; nothing relies on color alone; text floors at 0.7rem.

2. Color tokens (gruvbox)

Copy this :root block verbatim into every service’s stylesheet — it is the shared foundation. Reference tokens, never raw hex, in component CSS.

:root {
  /* Surfaces */
  --bg: #282828;          /* page background (bg0) */
  --sidebar: #1d2021;     /* sidebar / deepest chrome (bg0_h) */
  --panel: #32302f;       /* cards & panels (bg0_s) */
  --panel-2: #3c3836;     /* raised / hover surface (bg1) */
  --border: #504945;      /* card & control borders (bg2) */
  --border-soft: #3c3836; /* hairline dividers (bg1) */

  /* Text */
  --text: #ebdbb2;        /* primary text (fg1) */
  --muted: #a89984;       /* secondary text / labels (fg4) */
  --faint: #7c6f64;       /* tertiary / disabled (gray) */

  /* Accent — the ONE chrome accent. Interactivity only. */
  --cyan: #83a598;        /* nav active, focus, links, primary actions */
  --brand: linear-gradient(135deg, #83a598, #8ec07c);

  /* Stage identity — reserved; never use these for chrome */
  --plan: #d3869b;        /* PFactory  (purple) */
  --code: #fabd2f;        /* AIFactory (yellow) */
  --test: #b8bb26;        /* TFactory  (green)  */

  /* Semantic */
  --green: #b8bb26;       /* success */
  --amber: #fabd2f;       /* warning */
  --yellow: #fabd2f;      /* alias of --amber */
  --red: #fb4934;         /* failure / alarm */
  --violet: #d3869b;      /* = --plan; kept for legacy */
}

Rules


3. Typography

Three faces, three jobs. Loaded via one Google Fonts @import:

@import url("https://fonts.googleapis.com/css2?family=Archivo:wght@600;700;800;900&family=Hanken+Grotesk:wght@400;500;600;700&family=JetBrains+Mono:wght@400;500;600;700&display=swap");

:root {
  --font-display: "Archivo", system-ui, sans-serif;   /* H1s + wordmark ONLY */
  --font-mono: "JetBrains Mono", ui-monospace, monospace; /* dominant chrome + data */
  --font-ui: "Hanken Grotesk", system-ui, sans-serif; /* prose / long copy */
}
Role Face Notes
Wordmark, page H1 Archivo 800–900, expanded, UPPERCASE, tracked The only place the display face appears. ≥2rem for H1.
Nav, tabs, chips, labels, buttons, table text, stats, numbers JetBrains Mono The cockpit’s voice. Uppercase + letter-spacing for labels.
Paragraphs, descriptions, copilot prose, docs Hanken Grotesk Only where there’s real running text.

Rules


4. Spacing, radius, elevation


5. Components

Shared shapes. Build these the same way in every service.


6. Iconography


7. Motion


8. Adopting this in a service — checklist


9. Source of truth

The living implementation is CFactory/apps/frontend-web/src/index.css (tokens, type, components) and its React components (PipelineStrip, App shell, TaskDetail, CopilotPanel). When this document and the cockpit disagree, the cockpit wins — then update this document. Changes to the shared tokens or type system are brand-level and should be reviewed across services, not made unilaterally in one repo.