How carbon-design-system/carbon-components-vue works
Project type and purpose
• This is a full-stack open-source frontend library (monorepo) implementing Carbon Design System components in Vue 3.
• Provides dozens of reusable Vue single-file components, a Storybook for visual testing, a local Docker-based npm registry for publishing tests, and CI/CD via GitHub Actions.
Top-level structural analysis
• Monorepo managed by Lerna (lerna.json) and Yarn v3 (.yarnrc.yml, .yarn/).
• src/ contains component packages (each under components/ plus shared global/, use/ directories).
• storybook/ holds the standalone Storybook application.
• local-dev/ runs a Docker-compose npm registry for test publishes.
• .github/workflows/ defines CI, release, deploy Storybook, and stale-issue actions.
• Developer Workstation
• Git clone, local Yarn bootstrap & Lerna bootstrap
• Local build and test commands (Jest, Storybook serve)
• GitHub
• Source repository, PRs, issue management
• GitHub Actions: CI (lint/build/test), Storybook deploy, release publish
• Monorepo Packages
• Core Vue components under src/components
• Shared utilities under src/global, src/use
• Root package (package.json) & per-component entry points
• Build Tools & Scripts
• Yarn v3, Lerna CLI, Babel, TypeScript definitions
• Custom scripts (postinstall.js, release.sh)
• Jest for unit tests, Storybook for UI explorations
• Registries & Publishing
• Docker-Compose local registry (local-dev/npm-registry)
• npm public registry (via yarn publish or Lerna publish)
• Consumers
• External Vue 3 applications or Nuxt projects importing @carbon/vue
Relationships and workflows
• Data/Code flow: Developer → GitHub → CI → Build → Storybook & Tests → Registry
• Publishing flow: Build (packages) → Local-Dev registry → QA → Public npm registry
• Consumption flow: Consumer apps pull versions from npm registry → integrate with Vue app
Architectural patterns & principles
• Monorepo modularity (Lerna for multi-package repo)
• Single-File Component (SFC) pattern for Vue 3 composition API
• CI/CD pipelines for continuous integration and automated release
• Docker-based local registry for safe publish tests
• Storybook-driven development for visual component documentation
Key technologies & frameworks
• Vue 3, Composition API, Single File Components
• Yarn v3 Plug-and-Play, Lerna
• Jest & Vue Testing Library
• Storybook
• GitHub Actions
• Docker & Docker-Compose (npm registry)
• Babel, TypeScript declaration generation