# arco-design/arco-design-vue architecture

> Architecture diagram of the GitHub repository arco-design/arco-design-vue, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-03-31). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/arco-design/arco-design-vue
- Repository: https://github.com/arco-design/arco-design-vue

## Overview

This project is a monorepo containing a comprehensive Vue UI component library based on the Arco Design system. The primary purpose is to offer a modern, highly customizable, TypeScript‐friendly UI components collection that developers can integrate directly into Vue applications. Additionally, the project provides supporting packages for documentation, changelog generation, build scripts, and even storybook setups for interactive demos.

##### Main Components/Packages
- UI Component Library (packages/web-vue):
– This package contains the core Vue components. Within its “components” folder, you have distinct subdirectories for nearly every UI element (e.g., Button, Input, Modal, Table, Dropdown, etc.), each following a component-based pattern.
– Emphasize the usage of TypeScript and theming customization via extensive theme tokens.
- Documentation Website (packages/arco-vue-docs):
– Acts as the public documentation and demo site for the UI components. It includes pages, assets, components, and i18n support.
- Developer Utilities and Scripts (packages/arco-vue-scripts):
– Contains build configurations, scripts for testing, packaging, changelog generation (packages/arco-changelog), and other automation-related tasks.
- Plugins for Build and Development Tools (packages/vite-plugin-arco-vue-docs):
– Provides assistance for integrating the documentation and UI components with Vite.
- Interactive Demos/Storybook (packages/web-vue-storybook):
– A separate package to showcase the components and their variations through Storybook stories.

##### Interrelationships and Data Flow
– The UI component library is consumed by the documentation website and the storybook demo.
– The developer utilities and scripts interact with both the core library and documentation, automating tasks like building, testing, and changelog generation.
– Plugins (vite-plugin-arco-vue-docs) extend the build tools and integrate with the docs site.

##### Important Architectural Patterns
- Modular Architecture: The system is broken down into discrete packages (each handling its own concern) that are managed under a monorepo. Highlight this separation to indicate clarity in responsibilities.
- Component-Based Design: For the UI library, show that every component (e.g., button, form, modal) is organized into its own subfolder, following a structure that includes demos, styles, tests, and documentation.
- Build and Development Pipeline: Include elements like GitHub workflows (in .github/workflows) for CI/CD (deploy-site-preview, issue management, release workflows, etc.) that automate tasks. This infrastructure supports testing, code formatting (eslint, prettierrc), commit message linting (commitlint.config.js), and more.

##### Technology and Tooling Stack
- Vue and TypeScript: Emphasize that the UI components are built using Vue (Vue 3 likely) and are strongly typed with TypeScript.
- CSS Pre-/Post-processing: The theming system is built using Less (for theme tokens and style customization) plus support for pre-configured style configurations.
- Build tooling using Vite and other scripts – the presence of vite.config.ts files and various build settings indicates custom configurations.
- Development ecosystem includes ESLint, Prettier, commitlint, etc., as suggested by the configuration files in the root and in each package.

## Diagram (Mermaid)

```mermaid
graph TD
    %% Monorepo Container
    Monorepo["Monorepo (pnpm-workspace.yaml)"]:::monorepo

    %% Subgraph: Core Packages
    subgraph "Core Packages"
        UIComponent["UI Component Library (packages/web-vue)"]:::core
    end

    %% Subgraph: Documentation
    subgraph "Documentation"
        Docs["Documentation Website (packages/arco-vue-docs)"]:::doc
        DocsNavbar["Documentation Navbar (packages/arco-vue-docs-navbar)"]:::doc
    end

    %% Subgraph: Developer Tools
    subgraph "Developer Tools"
        DevTools["Developer Utilities & Scripts (packages/arco-vue-scripts)"]:::dev
        Changelog["Changelog Generation (packages/arco-changelog)"]:::dev
    end

    %% Subgraph: Integration Tools
    subgraph "Integration Tools"
        Plugin["Build/Development Plugin (packages/vite-plugin-arco-vue-docs)"]:::plugin
        Storybook["Interactive Demos/Storybook (packages/web-vue-storybook)"]:::demo
    end

    %% Relationships
    Monorepo -->|"contains"| UIComponent
    Monorepo -->|"contains"| Docs
    Monorepo -->|"contains"| DocsNavbar
    Monorepo -->|"contains"| DevTools
    Monorepo -->|"contains"| Changelog
    Monorepo -->|"contains"| Plugin
    Monorepo -->|"contains"| Storybook

    %% Inter-component Dependencies
    UIComponent -->|"consumed_by"| Docs
    UIComponent -->|"consumed_by"| Storybook
    UIComponent -->|"interacts_with"| DevTools

    Docs -->|"contains"| DocsNavbar
    DevTools -->|"automates"| UIComponent
    DevTools -->|"automates"| Docs
    DevTools -->|"triggers"| Changelog
    Plugin -->|"integrates_with"| Docs

    %% Click Events
    click UIComponent "https://github.com/arco-design/arco-design-vue/tree/main/packages/web-vue"
    click Docs "https://github.com/arco-design/arco-design-vue/tree/main/packages/arco-vue-docs"
    click DocsNavbar "https://github.com/arco-design/arco-design-vue/tree/main/packages/arco-vue-docs-navbar"
    click DevTools "https://github.com/arco-design/arco-design-vue/tree/main/packages/arco-vue-scripts"
    click Changelog "https://github.com/arco-design/arco-design-vue/tree/main/packages/arco-changelog"
    click Plugin "https://github.com/arco-design/arco-design-vue/tree/main/packages/vite-plugin-arco-vue-docs"
    click Storybook "https://github.com/arco-design/arco-design-vue/tree/main/packages/web-vue-storybook"

    %% Styles
    classDef core fill:#f9e79f,stroke:#b9770e,stroke-width:2px;
    classDef doc fill:#aed6f1,stroke:#2e86c1,stroke-width:2px;
    classDef dev fill:#a9dfbf,stroke:#239b56,stroke-width:2px;
    classDef plugin fill:#f5cba7,stroke:#d35400,stroke-width:2px;
    classDef demo fill:#d2b4de,stroke:#8e44ad,stroke-width:2px;
    classDef monorepo fill:#fad7a0,stroke:#d35400,stroke-width:2px;
```
