A shared component library for MiniSource admin panels.
| Package | Description |
|---|---|
@minisource/tokens |
Design tokens (CSS variables, Tailwind config) |
@minisource/ui |
Core UI primitives (28 components) |
@minisource/auth-ui |
Auth presentation components (12 components) |
@minisource/rhf |
React Hook Form integration layer |
@minisource/app-shell |
Shared admin panel shell layout (6 components) |
@minisource/tokens ← Design tokens (no deps)
↓
@minisource/ui ← Core primitives (depends on tokens)
↓ ↓
@minisource/auth-ui @minisource/app-shell ← Feature packages
↓
@minisource/rhf ← Form integration (depends on ui)
Design System = Presentation Only. All business logic stays in consuming apps:
| Belongs in Design System | Belongs in App |
|---|---|
| Button, Card, Layout | API calls, mutations |
| Form field layout | Session, auth, tokens |
| Loading/Empty/Error states | Permission checks |
| Table structure | Route guards |
| Theme, RTL support | Tenant switching |
- Node.js 18+
- pnpm 8+
# Install dependencies
pnpm install
# Build all packages
pnpm build
# Run all tests
pnpm test
# Typecheck all packages
pnpm typecheck# Build design system
pnpm --dir C:\ActiveProjects\MiniSource\design-system build
# Link packages into auth/front
cd C:\ActiveProjects\MiniSource\auth\front
pnpm link C:\ActiveProjects\MiniSource\design-system\packages\tokens
pnpm link C:\ActiveProjects\MiniSource\design-system\packages\ui
pnpm link C:\ActiveProjects\MiniSource\design-system\packages\auth-ui
pnpm link C:\ActiveProjects\MiniSource\design-system\packages\rhf
pnpm link C:\ActiveProjects\MiniSource\design-system\packages\app-shell
# Watch mode (auto-rebuild on changes)
pnpm --dir C:\ActiveProjects\MiniSource\design-system --filter @minisource/ui devIf you see two copies of React, ensure both the design system and consuming app use the same React version. Use pnpm.overrides in the consuming app if needed:
{
"pnpm": {
"overrides": {
"react": "^19.0.0",
"react-dom": "^19.0.0"
}
}
}cd C:\ActiveProjects\MiniSource\auth\front
pnpm unlink C:\ActiveProjects\MiniSource\design-system\packages\ui
pnpm install# Run all tests
pnpm test
# Run tests for a specific package
pnpm --filter @minisource/ui test
# Watch mode
pnpm --filter @minisource/ui test:watchUses Changesets for versioning.
# Create a changeset (describes your changes)
pnpm changeset
# Version packages (update changelogs and versions)
pnpm version-packages
# Publish to registry
pnpm release
# Dry-run publish
pnpm release:dry- Create
packages/my-package/withpackage.json,tsconfig.json,tsup.config.ts - Add to
pnpm-workspace.yaml(already usespackages/*) - Add
@minisource/uias dependency if needed - Add test script:
"test": "vitest run" - Create
vitest.config.tsandvitest.setup.ts - Add README.md
design-system/
├── .changeset/ # Changeset config
├── packages/
│ ├── tokens/ # Design tokens
│ ├── ui/ # Core components
│ ├── auth-ui/ # Auth components
│ ├── rhf/ # React Hook Form integration
│ └── app-shell/ # Admin panel shell
├── package.json # Root scripts
├── pnpm-workspace.yaml # Workspace config
├── tsconfig.base.json # Shared TS config
└── vitest.config.ts # Shared test config