A production-ready monorepo template with a minimal design system, built with pnpm, Turborepo, React, and Tailwind CSS.
- pnpm Workspaces - Efficient dependency management
- Turborepo - Fast, smart build system
- TypeScript - Type safety across packages
- Design Tokens - Colors, typography, spacing, shadows, radius
- React Components - 15+ reusable UI components
- Tailwind Theme - Shared configuration
- ESLint & Prettier - Code quality and formatting
- Storybook - Component documentation and development
- Hot Module Replacement - Fast development feedback
- Pre-commit Hooks - Automatic linting and type checking before commit
- Node.js >= 18.0.0
- pnpm >= 8.0.0
# Install pnpm globally
npm install -g pnpm# Install dependencies
pnpm install
# Setup git hooks (husky)
pnpm prepare# Run Storybook (component development)
pnpm storybook
# Format code
pnpm format
# Lint code
pnpm lint
# Type check
pnpm type-check
# Run all checks (type-check + lint + format)
pnpm check
# Auto-fix issues
pnpm check:fix
# Build all packages
pnpm buildmonorepo-design-system-template/
โโโ apps/
โ โโโ storybook/ # Component documentation
โโโ packages/
โ โโโ tokens/ # Design tokens (colors, spacing, etc.)
โ โโโ components/ # React UI components
โ โโโ theme/ # Tailwind CSS preset
โโโ docs/ # Documentation
โโโ package.json # Root workspace config
โโโ pnpm-workspace.yaml # pnpm workspace config
โโโ turbo.json # Turborepo config
Design tokens for consistent styling across applications.
import {
colors,
typography,
spacing,
shadows,
radius,
} from '@design-system/tokens';Features:
- Colors (Minimal black & white with functional accents)
- Typography (font family, size, weight, line height)
- Spacing (consistent spacing scale)
- Shadows (elevation system)
- Border Radius (rounded corners)
React UI component library with minimal design.
import { Button, Input, Card, Badge, Alert } from '@design-system/components';Components:
- Button, Input, TextArea, Select
- Card, Badge, Alert
- Modal, Toast
- Checkbox, Radio
- Typography, Divider, Stack
- Spinner
Tailwind CSS preset with design tokens.
// tailwind.config.js
module.exports = {
presets: [require('@design-system/theme')],
content: ['./src/**/*.{ts,tsx}'],
};Based on shadcn/ui and Tailwind CSS color palette.
import { colors } from '@design-system/tokens';
// Pure colors
colors.white; // '#FFFFFF'
colors.black; // '#000000'
// Neutral colors (Slate - primary)
colors.slate[50]; // '#F8FAFC' - Lightest
colors.slate[500]; // '#64748B' - Medium
colors.slate[900]; // '#0F172A' - Darkest
// Alternative neutrals
colors.gray[500]; // '#6B7280'
colors.zinc[500]; // '#71717A'
// Semantic colors
colors.success.DEFAULT; // '#10B981' - Emerald-500
colors.error.DEFAULT; // '#EF4444' - Red-500
colors.warning.DEFAULT; // '#F59E0B' - Amber-500
colors.info.DEFAULT; // '#3B82F6' - Blue-500
// Chart colors (data visualization)
colors.chart[1]; // Slate-900
colors.chart[2]; // Blue-500
colors.chart[3]; // Emerald-500
// ... up to colors.chart[10]- Create component in
packages/components/src/YourComponent/ - Export from
packages/components/src/index.ts - Build the package:
cd packages/components && pnpm build - Add Storybook story in
apps/storybook/stories/
- Create app folder:
apps/your-app/ - Add to
pnpm-workspace.yaml - Install dependencies:
pnpm install - Use design system packages:
{
"dependencies": {
"@design-system/components": "workspace:*",
"@design-system/tokens": "workspace:*",
"@design-system/theme": "workspace:*"
}
}# ๋ฐฐํฌ
docker-compose up -d
# ํ์ธ
curl http://localhost/health์ ์: http://localhost
./deploy/scripts/deploy.sh๋ฐฑ์ /๋ณต๊ตฌ:
./deploy/scripts/backup.sh
./deploy/scripts/restore.sh [backup_file]๋ชจ๋ํฐ๋ง:
./deploy/scripts/monitoring-setup.sh
docker-compose -f docker-compose.monitoring.yml up -d- Grafana: http://localhost:3001
- Prometheus: http://localhost:9090
๋ ์์ธํ ๋ด์ฉ์ ์ํคํ ์ฒ ๊ฐ์ด๋ ์ฐธ๊ณ
์ด ํ๋ก์ ํธ๋ Husky์ lint-staged๋ฅผ ์ฌ์ฉํ์ฌ ์ปค๋ฐ ์ ์๋์ผ๋ก ์ฝ๋ ํ์ง์ ๊ฒ์ฌํฉ๋๋ค:
- ESLint: ์ฝ๋ ๋ฆฐํ
- Prettier: ์ฝ๋ ํฌ๋งทํ
- TypeScript: ํ์ ์ฒดํฌ
์ปค๋ฐ ์ ์๋์ผ๋ก ์คํ๋๋ฉฐ, ์ค๋ฅ๊ฐ ์์ผ๋ฉด ์ปค๋ฐ์ด ์ฐจ๋จ๋ฉ๋๋ค.
# ๋ชจ๋ ์ฒดํฌ ์คํ
pnpm check
# ์๋ ์์
pnpm check:fix
# ๊ฐ๋ณ ์คํ
pnpm type-check # TypeScript ํ์
์ฒดํฌ
pnpm lint # ESLint ๋ฆฐํ
pnpm format # Prettier ํฌ๋งทํ
์ด ํ ํ๋ฆฟ์ ํ๋ก์ ํธ์ ๋ง๊ฒ ์ปค์คํฐ๋ง์ด์งํ๋๋ก ์ค๊ณ๋์์ต๋๋ค.
- ๋ธ๋๋ ์์์ผ๋ก ๋์์ธ ํ ํฐ ๋ณ๊ฒฝ (
packages/tokens) - ์ปค์คํ
์ปดํฌ๋ํธ ์ถ๊ฐ (
packages/components) - ์ ์ฑ ์ถ๊ฐ (
apps/- ๊ฐ์ด๋ ์ฐธ๊ณ ) - ์ํ ๊ด๋ฆฌ ๋ผ์ด๋ธ๋ฌ๋ฆฌ ํตํฉ
- ํ ์คํธ ํ๋ ์์ํฌ ์ถ๊ฐ
MIT License - feel free to use this template for your projects!
- Built with pnpm and Turborepo
- UI components powered by Tailwind CSS
์ด ๋์์ธ ์์คํ ์ ๋ชจ๋ ํ ํฐ์ Figma๋ก ๋ด๋ณด๋ผ ์ ์์ต๋๋ค.
# Figma Tokens Studio ํ์์ผ๋ก export
pnpm export:figma์์ฑ๋ figma-tokens.json ํ์ผ์ Figma์์ ์ฌ์ฉํ ์ ์์ต๋๋ค.
-
Figma Tokens Studio ํ๋ฌ๊ทธ์ธ ์ค์น
- Figma โ Plugins โ Browse plugins
- "Tokens Studio for Figma" ๊ฒ์ ๋ฐ ์ค์น
-
ํ ํฐ Import
- ํ๋ฌ๊ทธ์ธ ์ด๊ธฐ
- Settings โ Load from JSON/File
figma-tokens.jsonํ์ผ ์ ํ- "Apply to document" ํด๋ฆญ
-
๊ฒฐ๊ณผ
- โ ๋ชจ๋ ์์์ด Figma Color Styles๋ก ์์ฑ๋จ
- โ Typography๊ฐ Text Styles๋ก ์์ฑ๋จ
- โ Spacing, Shadows, Radius๊ฐ ํ ํฐ์ผ๋ก ์ ์ฉ๋จ
Figma์์ ํ ํฐ์ ์์ ํ ํ, JSON์ ๋ค์ exportํ์ฌ ์ฝ๋์ ๋ฐ์ํ ์ ์์ต๋๋ค.
์ํฌํ๋ก์ฐ:
์ฝ๋ โ figma-tokens.json โ Figma
Figma โ figma-tokens.json โ ์ฝ๋
Happy coding!