Repository avatar
AI Tools
v0.6.0
active

ui-forge

io.github.lemuayala/ui-forge

Compile DESIGN.md specs, OKLch/Tailwind v4/W3C tokens, and WCAG AA fixes across 24 brands.

Documentation


UIForge

Design systems your AI won't break — tuned in OKLch, verified for WCAG AA, and compiled to DESIGN.md.


Explore 24 canonical brand systems and 9 visual presets across 8 full-page archetypes in a live playground,
then ship exact tokens into your repo via the CLI, an official MCP server, or a 9-section DESIGN.md spec.


Live Demo Playground npm core npm mcp
Next.js React Tailwind CSS TypeScript MCP Registry License PRs Welcome


UIForge 3-column playground previewing a Glassmorphism dashboard alongside live DESIGN.md output



UIForge landing page with live Brand DNA inspector and OKLch WCAG AA readout

Why UIForge · Get started · AI agents · Systems & screens · DESIGN.md & exports · How it works · What's new · Roadmap · Contributing


Why UIForge

Ask a coding agent to "build a clean dashboard" and you get the same purple gradients, mismatched radii, and unreadable muted text every time. Style guides live in Figma or scattered docs, so the model invents hex codes and spacing on every file it touches.

UIForge turns a visual direction into a single deterministic contract: DESIGN.md. You start from one of 24 real brand systems (Linear, Stripe, Anthropic, Apple HIG, Vercel, Supabase, Spotify, and others) or 9 style presets, tune perceptual OKLch hue, spacing, font scale, and surface opacity across iPhone, iPad, and Desktop frames, fix any WCAG 2.1 AA contrast failure in one click, and export the spec alongside :root CSS, Tailwind v4 @theme, or W3C Design Tokens JSON.

Everything runs off one zero-dependency core package (@lemuayala/ui-forge-core), so the web workbench, the CLI, and the MCP server always produce identical tokens and rules.

Get started

Pick whichever workflow fits how you build. They all compile from the same engine.

I want to…Do this
Tune a system visually across devicesOpen the playground
Initialize DESIGN.md + tokens.css in my reponpx @lemuayala/ui-forge-core init --brand linear
Connect my coding agent over MCPclaude mcp add ui-forge -- npx -y @lemuayala/ui-forge-mcp
Audit and fix contrast from the terminalnpx @lemuayala/ui-forge-core audit "#93c5fd" "#ffffff" --fix
Browse 137 reference brand cardsOpen design-systems/

CLI

The CLI inspects package.json in your working directory to detect your stack (next, tailwind, react, vue, svelte, or html-css) and writes DESIGN.md plus your chosen token file. No config file required.

# Compile Linear's system for a dashboard, export Tailwind v4 @theme, and add Cursor rules
npx @lemuayala/ui-forge-core init --brand linear --ui dashboard --tokens tailwind-v4 --auto-fix-aa --agent-rules

# Export W3C Design Tokens JSON (tokens.json) for Stripe
npx @lemuayala/ui-forge-core init --brand stripe --tokens w3c-json --force

# List all 24 brand systems, 9 presets, 8 screen archetypes, and 6 target stacks
npx @lemuayala/ui-forge-core list

Other flags: --preset <id>, --stack <id>, --name <BrandName>, --dark <true|false|both>, --density <compact|normal|spacious>, --hue <0-360>, --dir <path>.

Use it with your AI agent

@lemuayala/ui-forge-mcp is an official Model Context Protocol server registered in the MCP Registry as io.github.lemuayala/ui-forge. Once connected, your agent queries real brand palettes, audits WCAG contrast in OKLch, and writes DESIGN.md directly instead of guessing colors.

Claude Code

claude mcp add ui-forge -- npx -y @lemuayala/ui-forge-mcp

Cursor, Windsurf, Antigravity (add to mcp.json)

{
  "mcpServers": {
    "ui-forge": {
      "command": "npx",
      "args": ["-y", "@lemuayala/ui-forge-mcp"]
    }
  }
}

What the server exposes to your agent:

Tool / ResourceWhat it does
list_design_systemsSearch and filter the 24 brand systems, 9 presets, 8 UI archetypes, and 6 stacks
compile_design_mdCompile a 9-section DESIGN.md, Quick Prompt, and WCAG 2.1 AA report (with autoFixContrast)
export_design_tokensGenerate :root CSS, Tailwind v4 @theme inline, or W3C Design Tokens JSON
audit_and_fix_contrastCompute WCAG 2.1 contrast and return the nearest passing HEX + OKLch lightness adjustment
uiforge://catalog/systemsFull JSON catalog of presets, brand systems, archetypes, and defaults
uiforge://spec/rulesCanonical anti-slop, state matrix, and accessibility rules sent on agent initialization

When you choose the glassmorphism preset, UIForge also links directly to @lemuayala/glass-ui-core so agents can pair system-wide tokens with typed React and Expo glass primitives.

Systems and screens

9 style presets

glassmorphism · neobrutalism · minimalist · cyberpunk · corporate-saas · retro-80s · nature-organic · editorial · aurora-dark

24 interactive brand design systems

CategoryBrand systems
SaaS & ProductivityLinear, Notion, Slack, Atlassian, Raycast, Cal.com
Payments & CommerceStripe, Shopify, Airbnb, Wise
Devtools & CloudVercel, Supabase, GitHub Primer, Tailwind UI, shadcn/ui, Cloudflare, Sentry
AI & ResearchAnthropic, OpenAI
Design & UIApple HIG, Figma, Material 3, Framer
Media & SocialSpotify, Netflix, Discord

An extended reference folder in design-systems/ holds 137 Markdown cards with computed HEX and oklch() tables.

8 responsive page archetypes

KeyArchetypeIncluded layout sections
1LandingNavigation bar, hero, social proof, feature grid, pricing preview, CTA
2DashboardCollapsible sidebar, KPI cards, revenue chart, filterable activity table
3E-commerceCategory header, product grid, badges, ratings, cart summary
4AuthSplit brand panel, OAuth buttons, credentials form, validation states
5ProfileWorkspace header, avatar settings, domain inputs, danger zone
6PricingBilling toggle, 3-tier comparison cards, highlighted Pro plan, FAQ
7BlogEditorial masthead, featured story, metadata, multi-column article list
8ComponentsButtons, inputs, badges, alerts, tabs, and token specimen cards

DESIGN.md and token exports

Every DESIGN.md compiled by UIForge follows a deterministic 9-section layout:

  1. Meta & Brand Context — product name, target framework, voice tone, density, theme strategy.
  2. Perceptual Color System — semantic roles in HEX and oklch(), plus live contrast ratios.
  3. Typography Scale — heading, body, and monospace stacks with rem fluid sizing.
  4. Spacing & Layout Grid — base unit (4px / 8px / 12px), section rhythm, breakpoints.
  5. Shape & Elevation — border-radius scale, backdrop blur, and shadow hierarchy.
  6. Component Inventory — required anatomy for the selected page archetype and brand rules.
  7. 9-State Matrix — Default, Hover, Focus-visible, Active, Disabled, Loading, Empty, Error, Success.
  8. Accessibility (WCAG 2.1 AA) — contrast floors, 44×44px hit targets, keyboard and motion rules.
  9. Tokens — copy-paste :root custom properties with companion .dark / [data-theme="light"] blocks.

From the Tokens tab (or CLI / MCP), the same resolved state exports to:

  • :root CSS (tokens.css) — standard CSS custom properties with light/dark companion selectors.
  • Tailwind CSS v4 (tailwind-theme.css) — @import "tailwindcss" + @theme inline token mapping.
  • W3C Design Tokens (tokens.json) — $value / $type JSON schema with oklch() extensions for Figma and Style Dictionary.
  • Standalone HTML, PNG & PDF — self-contained preview markup and visual snapshots from the stage toolbar.

How it works

@lemuayala/ui-forge-core is the single source of truth. It has zero runtime dependencies and no Node-only globals in its main entry, so every surface shares the exact same code:

packages/core  (OKLch math, WCAG AA solver, presets, 24 brands, HTML templates, DESIGN.md & token builders)
   ├── CLI            npx @lemuayala/ui-forge-core init | list | audit
   ├── packages/mcp   @lemuayala/ui-forge-mcp (stdio MCP server for coding agents)
   └── web app        Landing (/) and 3-column Playground (/play) on Next.js 16

Token priority is strictly deterministic:

User manual overrides  >  Selected Brand System  >  Base Style Preset  +  Live sliders (Hue, Spacing, Scale, Opacity)

What's new

Full release notes live in CHANGELOG.md and GitHub Releases.

  • 0.6: Monorepo extraction (@lemuayala/ui-forge-core + ui-forge CLI and @lemuayala/ui-forge-mcp), published to npm and the official MCP Registry with OIDC provenance and automated release versioning on main.
  • 0.5: 1-click OKLch WCAG 2.1 AA contrast auto-fix (ensureContrastOklch), Tailwind v4 @theme and W3C JSON exports, localStorage project profile persistence, Vercel Analytics + Speed Insights, dynamic OpenGraph image, and Vitest CI coverage gate.
  • 0.4: Dedicated Landing page (/) with scroll-driven zoom and reveal scenes, /play route split, URL state sharing, and bilingual EN / ES interface.

Roadmap

Done:

  • 9 style presets, 24 interactive brand systems, 8 responsive screen archetypes, and 137 reference .md cards
  • Perceptual OKLch color engine with 1-click WCAG 2.1 AA contrast auto-fix
  • 9-section DESIGN.md, :root CSS, Tailwind v4 @theme, and W3C Design Tokens JSON exports
  • @lemuayala/ui-forge-core zero-config CLI published on npm
  • @lemuayala/ui-forge-mcp server published on npm and listed in the official MCP Registry

Next:

  • Custom URL / website palette extractor to bootstrap a DESIGN.md from an existing domain
  • Figma Variables import/export plugin synced with UIForge W3C JSON tokens
  • Playwright visual regression suite across all 8 page archetypes and viewports

Have a brand system or workflow you'd like supported? Open an issue.

Run it locally

Requires Node 20.9+ (CI runs on Node 22) and pnpm.

git clone https://github.com/lemuayala/Ui-design-md.git
cd Ui-design-md
pnpm install
pnpm dev

The landing page runs at localhost:3000 and the playground at localhost:3000/play. Optional public URL variables are documented in .env.example.

CommandWhat it does
pnpm devBuild workspace packages and start Next.js dev server
pnpm buildBuild workspace packages and production Next.js app
pnpm lintRun ESLint 9 flat config
pnpm typecheckType-check core, mcp, and the Next.js app
pnpm testRun Vitest unit and in-memory MCP protocol tests
pnpm test:coverageRun tests enforcing v8 coverage thresholds
pnpm release:packDry-run npm tarballs for packages/*
pnpm version:bumpSynchronize version across packages, MCP manifest, UI, and CHANGELOG.md
pnpm generate:design-systemsRegenerate design-systems/*.md cards with computed OKLch values
Playground keyboard shortcuts
ShortcutAction
1–8Switch page archetype (Landing through Components)
P / Cmd+KOpen Presets & Brand Systems menu
DCycle preview theme (Light / Dark / System)
TToggle playground shell theme
LSwitch UI language (EN / ES)
SCopy shareable /play?... URL
?Open keyboard shortcuts dialog
EscClose active menu or dialog

Tech stack

LayerTechnology
FrameworkNext.js 16 (App Router, Turbopack)
UIReact 19
StylingTailwind CSS v4.3 + gg-glass design tokens
LanguageTypeScript (strict mode across monorepo)
Color & AccessibilityCustom zero-dependency sRGB ↔ OKLab ↔ OKLch & WCAG 2.1 AA solver
AI Agent ProtocolModel Context Protocol SDK + Zod
Testing & QualityVitest (v8 coverage), ESLint 9, GitHub Actions CI
Publishing & Supply Chainnpm OIDC Trusted Publishing (--provenance) + Sigstore Cosign MCP Registry
Hosting & TelemetryVercel (@vercel/analytics + @vercel/speed-insights)

Contributing

Contributions of any size are welcome: bug fixes, new brand systems, page archetypes, token exporters, documentation improvements, or tests.


NPM
@lemuayala/ui-forge-mcp
Install Command
npm install @lemuayala/ui-forge-mcp