better-design
Health Pass
- License Γ’β¬β License: MIT
- Description Γ’β¬β Repository has a description
- Active repo Γ’β¬β Last push 0 days ago
- Community trust Γ’β¬β 147 GitHub stars
Code Pass
- Code scan Γ’β¬β Scanned 12 files during light audit, no dangerous patterns found
Permissions Pass
- Permissions Γ’β¬β No dangerous permissions requested
No AI report is available for this listing yet.
π¨ Open-source design MCP server + shadcn/ui registry β AI design systems for Claude Code, Cursor, Codex, GitHub Copilot & any MCP client. 31 brand-grade themes (Linear, Stripe, Vercel, Notion, Apple, Supabase, Figmaβ¦) + design tokens, UI principles & WCAG rules. Install any component with one command.
Better Design: Open source Claude Design
Turn your AI coding IDE into a design engineer. Better Design works with MCP-compatible agents and editors like Claude Code, Cursor, VS Code/GitHub Copilot, Claude Desktop, and claude.ai. It is a design MCP server, AI design-system registry, and UI review layer for generating polished product interfaces from prompts.
Website Β· Design systems Β· Setup Β· Architecture
What is Better Design?
Better Design gives AI coding agents the design context they usually miss: design tokens, component code, UI principles, icon direction, accessibility checks, and visual-design review rules.
Think of it as a Claude Design-style workflow for your own codebase:
- Pick the product direction: Linear, Supabase, Vercel, Airbnb, Stripe, Apple, Notion, Figma, or another curated design system.
- Feed your AI agent the right
globals.css, semantic tokens, component overrides, icon set, spacing, typography, shadows, radius, and motion language. - Ask Claude Code, Cursor, VS Code/GitHub Copilot, Claude Desktop, claude.ai, or another MCP-compatible coding agent to build the interface.
- Have the MCP review the output against accessibility and design principles before you ship it.
Instead of βAI-looking UI,β you get interfaces that look like they were built from a real product design system.
Why Better Design?
- Claude Design-style workflow, open MCP. Bring the artifact-first design loop people expect from Claude Design into Claude Code, Cursor, VS Code/GitHub Copilot, Claude Desktop, claude.ai, and any MCP-compatible client.
- Design systems, not vague vibes. Each system includes semantic CSS tokens plus production component code, so generated UI uses real implementation details instead of guessed colors.
- AI UI generation with guardrails. The MCP can load principles for hierarchy, spacing, typography, depth, motion, forms, and accessibility exactly when the agent needs them.
- Self-review before handoff.
get-review-rulesgives your agent a WCAG and visual-design checklist so it can catch missing focus states, weak hierarchy, bad contrast, and inconsistent spacing. - Built for AI coding workflows. Better Design speaks the language agents already use to build modern product UI: tokens, components, accessibility, hierarchy, spacing, and motion.
How it works
Better Design has two layers: an always-on Design Intelligence layer and an on-demand Scaffold layer.
1. Design Intelligence β always active for UI work
When your agent builds UI, Better Design can load the relevant product-design principles and review rules:
You: "Add a settings page with a form"
AI: calls get-ui-principle("spacing") + get-ui-principle("hierarchy")
β writes the page
β calls get-review-rules("accessibility") + get-review-rules("visual-design")
β fixes contrast, labels, focus states, spacing, and hierarchy
Result: A settings page with accessible inputs, clear grouping, visible states, and consistent rhythm.
2. Scaffold β design-system matching for new UI
When starting a product, page, or component set, say "use better-design" and the MCP finds a matching design system:
You: "Build a fintech dashboard in the style of Stripe. use better-design"
AI: calls resolve-design-system("fintech dashboard, Stripe")
β loads design-system docs, CSS tokens, and component code
β resolves a matching icon library
β builds with semantic tokens instead of raw colors
Result: Indigo accents, premium shadows, fintech typography, consistent cards, inputs, buttons, and charts.
What the MCP gives your agent
| Tool | What it does | Why it matters |
|---|---|---|
resolve-design-system |
Semantically matches the right design system for a prompt | Stops agents from guessing a visual direction |
get-design-system-docs |
Loads tokens, components, usage notes, and install context | Gives the agent implementation-ready design context |
get-ui-principle |
Fetches focused guidance for hierarchy, spacing, typography, depth, motion, forms, and more | Makes UI decisions principled instead of random |
get-review-rules |
Returns accessibility and visual-design review checklists | Helps the agent critique and fix its own output |
resolve-icon-library |
Picks an icon family that matches the design personality | Keeps icon style consistent with the UI |
search-icons |
Finds specific icons through Iconify | Speeds up implementation without mixing icon styles |
Available Design Systems
Better Design ships with curated design systems for common product categories: developer tools, fintech dashboards, marketplaces, productivity apps, consumer apps, media products, and enterprise software.
| System | Theme | Vibe | Best For |
|---|---|---|---|
| Linear | Dark | Minimal, professional, purple accents | Developer tools, productivity apps |
| Linear Quality | Dark | Precision-crafted, multi-layer shadows | High-polish developer tools |
| Supabase | Dark | Technical, modern, green accents | Backend dashboards, dev portals |
| Vercel | Dark | Pure black, Geist font, minimal | Deployment, developer platforms |
| Airbnb | Light | Warm, friendly, coral primary | Marketplaces, consumer apps |
| Notion | Light | Minimal, flat blue, rgba shadow | Productivity, note-taking apps |
| Stripe | Light | Fintech, indigo accents, premium shadows | Payments, financial products |
| Apple | Light | Premium, SF Pro, pill buttons | Consumer apps, marketing sites |
| Figma | Light | Design tool, electric violet, purple glow | Design/creative tooling |
| Light Marketplace | Light | Charcoal buttons, flat cards, no shadows | E-commerce, listings |
| Precision Light | Light | Charcoal primary, precision layered shadows | B2B SaaS, enterprise |
| Minimal Light | Light | Black primary, no shadows, border-only cards | Clean utilities, productivity |
| Dark Orange | Dark | Brand orange, 10px radius, layered shadows | Modern SaaS, dashboards |
| Vibrant Dark | Dark | Vibrant blue, color-bloom shadows | Consumer apps, social |
| Neutral Monochrome | Dark | White on near-black, no color | Understated, data-heavy tools |
| Cinematic Dark | Dark | Ultra-dark, content-first media | Streaming, media platforms |
| Editorial Dark | Dark | Serif display, flat, content-first | Publishing, editorial |
| Corporate Fintech | Light | Blue accents, data-dense layouts | Banking, enterprise, fintech |
Each design system includes a full globals.css token layer plus overriding component code.
Architecture
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Your AI agent or IDE: Claude Code / Cursor / GitHub Copilot β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β MCP Server (packages/shared/src/mcp) β
β β
β Design Intelligence, always active for UI work: β
β β’ get-ui-principle β load relevant design principles β
β β’ get-review-rules β accessibility + visual design checklist β
β β
β Scaffold, on demand with "use better-design": β
β β’ resolve-design-system β semantic search with embeddings β
β β’ get-design-system-docs β fetch tokens + component code β
β β’ resolve-icon-library β match icon set to design personality β
β β’ search-icons β find specific icons via Iconify β
βββββββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββ΄ββββββββββββ
βΌ βΌ
ββββββββββββββββββββββββ ββββββββββββββββββββββββ
β Stdio Transport β β Remote Transport β
β Claude Desktop, β β /api/mcp β
β Claude Code, Cursor,β β claude.ai, cloud β
β VS Code/Copilot β β β
ββββββββββββββββββββββββ ββββββββββββββββββββββββ
Setup
Prerequisites
- Bun for local development
- A Neon Postgres database (free tier works)
- Gemini API key for design-system embeddings
1. Clone and install
git clone https://github.com/marvkr/better-design.git
cd better-design
bun install
2. Configure environment
cp packages/web/.env.example packages/web/.env
DATABASE_URL=postgresql://[email protected]/...?sslmode=require
GEMINI_API_KEY=your-gemini-key
3. Push the database schema
cd packages/web && bun db:push
4. Run the dev server
bun dev
5. Optional: connect the stdio MCP to Claude Desktop
cd packages/mcp && bun run build
Add the local MCP server to ~/Library/Application Support/Claude/claude_desktop_config.json:
{
"mcpServers": {
"better-design": {
"command": "node",
"args": ["/absolute/path/to/better-design/packages/mcp/dist/index.js"]
}
}
}
Restart Claude Desktop. You can now ask Claude to use Better Design while building UI.
Remote MCP: The web app also exposes a remote MCP endpoint at
/api/mcp. Connect any MCP-compatible AI tool or coding IDE with an API key from/settingswhen you do not want local stdio setup.
Usage examples
Once connected, ask your agent for design help directly:
"Use better-design. Build a Linear-style project settings page with billing, team members, and API keys."
"Find a design system for a developer tools startup, then build the dashboard with matching components."
"Review this form with Better Design's accessibility and visual-design rules, then fix the issues."
Your AI assistant can search design systems, load implementation details, choose matching icons, scaffold components, and self-review generated UI before presenting the final code.
Web App Architecture
The web app (packages/web) provides an interactive UI for generating styled components. Here's the full workflow:
flowchart TD
subgraph Frontend["Frontend (React)"]
A[User submits message] --> B[Create message in DB]
B --> C{Trigger Inngest event}
P[Poll every 2s] --> Q[Show currentStep]
end
subgraph Inngest["Inngest (Background Jobs)"]
C --> D[design-system/recommend]
D --> E[Semantic search design systems]
E --> F{Match score >= 85%?}
F -->|Yes| G[Auto-select & trigger code-agent]
F -->|No| H[Show recommendations to user]
H --> I[User selects design system]
I --> G
G --> J[code-agent/run]
end
subgraph CodeAgent["Code Agent"]
J --> K[Create E2B sandbox]
K --> L[Set status: GENERATING]
L --> M[Load design system context]
M --> N[Apply globals.css]
N --> O[scaffoldDesignSystemComponents]
subgraph Scaffolding["Component Scaffolding"]
O --> O1[Update currentStep: Button...]
O1 --> O2[Write component to sandbox]
O2 --> O3[Next component...]
O3 --> O1
end
O --> R[Build user's request]
R --> S[Generate page.tsx]
S --> T[Save fragment & files]
T --> U[Set status: COMPLETED]
end
subgraph Database["PostgreSQL"]
V[(projects)]
W[(messages)]
X[(fragments)]
Y[(design_systems)]
Z[(components)]
end
L -.-> V
O1 -.-> V
T -.-> W
T -.-> X
M -.-> Y
O -.-> Z
P -.-> V
Key Components
| Component | Purpose |
|---|---|
inngest/functions.ts |
Background job definitions (code-agent, design-system-recommender) |
lib/design-systems/ |
Design system search & formatting |
lib/foundational-docs/ |
UI guidance search (animations, spacing, colors, etc.) |
prompt.ts |
AI agent system prompt |
modules/projects/ |
Frontend project views & components |
UI Design Guidance Flow
The code agent discovers relevant design guidelines via semantic searchβno hardcoded rules:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β User: "Build a modal with smooth open/close animations" β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent analyzes task β identifies: "modal + animation" β
β β
β Calls: getUIGuidance({ topic: "modal animation interruptible" }) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Semantic Search (pgvector) β
β β
β Searches ALL foundational_docs by embedding similarity: β
β βββ animation-patterns.md β Interruptible animations with Motion β
β βββ animation.md β Easing curves, duration, springs β
β βββ depth.md β Shadows, layering β
β βββ ... other relevant docs β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Returns top matches with scores: β
β β
β 1. Animation Patterns (92% match) β
β β Make animations interruptible with Motion's delay() β
β β Cancel pending animations on close β
β β
β 2. Animation Guidelines (88% match) β
β β Use spring animations, 200-300ms duration β
β β ease-out for entering, ease-in-out for movement β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Agent builds modal WITH: β
β β delay() from motion with cancelDelayRef β
β β Interruptible open/close states β
β β Spring transitions (stiffness: 400, damping: 25) β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Adding new guidelines:
- Create a markdown file in
docs/(e.g.,docs/accessibility.md) - Add it to
packages/mcp/src/lib/seed.ts:{ file: "accessibility.md", id: "accessibility", title: "Accessibility Guidelines" } - Run
bun run seedinpackages/mcp
The agent discovers new guidelines automatically via semantic searchβno prompt changes needed.
Component Catalog Pattern
The catalog pattern ensures the AI generates complete, production-ready design systems with all required components:
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Code Agent receives user request β
β "Build a Linear-style dashboard" β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β System Prompt includes Component Catalog β
β β
β π 77 Required shadcn Components: β
β βββ Layout: Accordion, Card, Collapsible, ScrollArea... β
β βββ Navigation: Breadcrumb, Tabs, Pagination... β
β βββ Forms: Button, Input, Select, Checkbox... β
β βββ Data Display: Avatar, Badge, Table, Chart... β
β βββ Feedback: Alert, Toast, Dialog... β
β βββ Overlays: Modal, Drawer, Tooltip... β
β β
β β¨ Custom Component Templates: β
β βββ Voice (Card + Animation) β
β βββ BentoGrid (Grid + Cards) β
β βββ MetricCard (Card + Typography + Icon) β
β βββ ... based on user's use case β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β AI generates Storybook-like documentation site with 3 sections: β
β β
β app/ β
β βββ layout.tsx # Root layout with sidebar β
β βββ page.tsx # Homepage/introduction β
β βββ components/ β
β β βββ sidebar.tsx # Three-section navigation β
β β βββ code-block.tsx # Code display with copy β
β β β
β βββ foundations/ # Section 1: Basic elements β
β β βββ colors/page.tsx # Color palette showcase β
β β βββ surfaces/page.tsx # Shadows, borders, depth β
β β βββ typography/page.tsx # Font scales, weights β
β β β
β βββ primitives/ # Section 2: All 77 shadcn components β
β β βββ accordion/page.tsx β
β β βββ alert/page.tsx β
β β βββ button/page.tsx β
β β βββ ... (77 component pages) β
β β β
β βββ custom/ # Section 3: Icons + custom componentsβ
β βββ icons/page.tsx # Icon library showcase (required) β
β βββ metric-card/page.tsx β
β βββ dashboard-grid/page.tsx β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β
βΌ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β Validation Step (packages/web/src/lib/validate-design-system.ts) β
β β
β β Documentation site structure complete β
β β All 77 primitive component pages generated β
β β All 3 foundation pages present β
β β Icons page exists (required) β
β β Identify custom components created β
β β
β Console Output: β
β Generated 82 component pages: β
β - 77 primitive components β
β - 5 custom components (including icons) β
β β
β β Custom component pages: β
β - icons (icon library showcase) β
β - metric-card β
β - dashboard-grid β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Key Benefits:
- Completeness: All 77 shadcn components generated every time
- Browsable Interface: Storybook-like sidebar navigation
- Live Examples: Each component page shows variants and code
- Custom Components: AI creates domain-specific components by remixing base components
- Validation: Automatically checks for missing components
Implementation Files:
packages/web/src/lib/catalogs/shadcn-catalog.ts- Complete catalog of 77 componentspackages/web/src/lib/validate-design-system.ts- Validation utilitiespackages/web/src/prompt.ts- System prompt with catalogpackages/web/src/inngest/functions.ts- Validation integration
Status Flow
stateDiagram-v2
[*] --> PENDING: User submits message
PENDING --> SELECTED: Design system chosen
SELECTED --> GENERATING: Code agent starts
GENERATING --> COMPLETED: Success
GENERATING --> ERROR: Failure
COMPLETED --> [*]
ERROR --> [*]
Project Structure
better-design/
βββ design-systems/ # Source of truth for each design system
β βββ linear/
β β βββ globals.css # CSS variables (colors, spacing, radius)
β β βββ components/ # Component TSX overrides
β β βββ utils.ts # cn() helper
β βββ supabase/
β βββ airbnb/
β βββ ... # 31 systems total
βββ docs/ # Design foundations (colors, animation, principles)
βββ packages/
β βββ shared/ # Shared MCP server definition (tools, instructions, types)
β β βββ src/mcp/ # createMcpServer() + DataProvider interface
β βββ mcp/ # Stdio transport (Cursor, Claude Code)
β βββ web/ # Next.js app + remote MCP transport (claude.ai)
β βββ src/
β βββ app/ # App Router pages
β βββ db/schema.ts # Drizzle schema
β βββ inngest/ # Background job functions
β βββ lib/ # Design system search, catalogs, validation
β βββ server/api/ # Hono routes (/api/v1, /api/mcp, /api/projects...)
βββ README.md
Adding a Design System
Create a folder in
design-systems/:design-systems/my-system/ βββ globals.css # CSS variables βββ components/ # TSX component files βββ utils.ts # cn() helperAdd metadata in
packages/mcp/src/lib/seed.tsSeed:
cd packages/mcp && npm run seed
Why Keep Full Component Code?
Design nuances live in the components, not just CSS variables:
- Shadow layers (Linear's subtle stacked shadows)
- Focus states (ring vs glow vs color shift)
- Border thickness per component type
- Hover/active transitions
- Radius variations by context
CSS variables alone can't capture these details.
License
MIT
Reviews (0)
Sign in to leave a review.
Leave a reviewNo results found