# dyte-io/ui-kit architecture

> Architecture diagram of the GitHub repository dyte-io/ui-kit, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-04-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/dyte-io/ui-kit
- Repository: https://github.com/dyte-io/ui-kit

## Overview

- Core – the main source code built with Stencil for web components (found under packages/core)
- Framework-specific wrapper libraries – React (packages/react-library), Angular (packages/angular-library), and Vue (packages/vue-library)
- Support files – configuration files (.prettierrc, .eslint, Husky hooks, GitHub workflows, etc.) that handle building, testing, linting, and deployments, as well as tools like Lerna for multi-package management.

##### Main components
- Developer & Build Environment: Include CI/CD pipelines (GitHub workflows for deploy, lint, test, release) and configuration tools (Lerna, Husky, TypeScript configs).
- Core UI Components: Represent the packages/core which houses Stencil-based web components, utilities, themes, and assets. This is the heart where all UI components are built.
- Framework-specific Wrappers: Show the React (react-library), Angular (angular-library), and Vue (vue-library) packages, which wrap the core web components to provide easier integration and idiomatic usage in each framework.
- Web-Core Dependency: Although not explicitly in the monorepo, the README makes note that the UI kit depends on the web-core package (handles low-level meeting logic and communications with Dyte servers). Indicate that as an external dependency feeding into the use of the UI kit (the meeting object initialization is performed via web-core).

##### Relationships and Dataflow
- That the Core package exposes the complete library of components.
- That client applications (end-user projects) integrate the UI kit by installing both the web-core (for meeting/business logic) and the relevant UI kit wrapper.
- Optionally, highlight the dependency from the wrapper packages back to the Core package.

##### Architectural Patterns and Design Principles
- Monorepo Management: Use Lerna (and the file structure) to emphasize that all packages share common configuration and CI/CD tooling.
- Separation of Concerns: Separate the core UI component logic from framework-specific integration, plus clear demarcation of build/test/deployment pipelines.
- Component-based Architecture: Note that the Core package organizes components, utilities, assets, themes, and design tokens.
- Abstraction & Reusability: The wrappers abstract integration details and enable direct usage in respective frameworks.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Developer & Build Environment"
        B["CI/CD Pipeline & Config Tools"]:::build
    end

    subgraph "Monorepo Packages"
        C["Core UI Components (Stencil)"]:::core
        R["React Wrapper"]:::wrapper
        A["Angular Wrapper"]:::wrapper
        V["Vue Wrapper"]:::wrapper
    end

    E["External Web-Core Dependency"]:::external
    CL["Client Application"]:::client

    B -->|"triggers build/test/deploy"| C
    B -->|"triggers build/test/deploy"| R
    B -->|"triggers build/test/deploy"| A
    B -->|"triggers build/test/deploy"| V

    C -->|"wrappedBy"| R
    C -->|"wrappedBy"| A
    C -->|"wrappedBy"| V

    R -->|"integratesWith"| CL
    A -->|"integratesWith"| CL
    V -->|"integratesWith"| CL

    E -->|"providesMeetingLogic"| CL

    click B "https://github.com/dyte-io/ui-kit/tree/main/.github/workflows"
    click C "https://github.com/dyte-io/ui-kit/tree/main/packages/core"
    click R "https://github.com/dyte-io/ui-kit/tree/main/packages/react-library"
    click A "https://github.com/dyte-io/ui-kit/tree/main/packages/angular-library"
    click V "https://github.com/dyte-io/ui-kit/tree/main/packages/vue-library"

    classDef build fill:#f9d423,stroke:#333,stroke-width:2px;
    classDef core fill:#8be9fd,stroke:#333,stroke-width:2px;
    classDef wrapper fill:#50fa7b,stroke:#333,stroke-width:2px;
    classDef external fill:#ff79c6,stroke:#333,stroke-width:2px;
    classDef client fill:#bd93f9,stroke:#333,stroke-width:2px;
```
