# pubg/vlossom architecture

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

- Interactive diagram: https://gitdiagram.com/pubg/vlossom
- Repository: https://github.com/pubg/vlossom

## Overview

##### Project type and purpose
- This is a monorepo hosting a Vue 3 UI component library (“vlossom”), plus a documentation site (“docs”) and Storybook playground.
- The primary deliverable is an installable npm package of UI components, with supporting sites for docs and interactive examples.

##### File structure
- Top-level:
- .github/workflows – CI/CD definitions (chromatic, ci, release).
- packages/docs – standalone Vue+Vite–powered documentation site.
- packages/vlossom – the component library with source, tests, Storybook config, playground and build configs.
- Within packages/vlossom:
- src/components – all Vue components, each with its own folder, tests and Storybook stories.
- src/composables, stores, plugins, utils – shared logic modules.
- src/storybook – global Storybook configuration and custom decorators.
- vite.config.ts, tsconfig – build and type definitions.
- package.json – library entry, peer dependencies, build scripts.
- The monorepo uses npm workspaces (package.json top-level) and standard Vue tooling (Vite, TypeScript).

##### README for additional insights
- Confirms Vue 3 library, installable via npm or CDN.
- Provides “playground” and “storybook” scripts for local development.
- CI includes Chromatic for visual regression.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Developer and Repo
    Dev[("Developer")]:::dev
    GitHub[("GitHub Repo")]:::cloud
    Dev -->|commits code| GitHub

    %% GitHub Actions Workflows
    subgraph "GitHub Actions" 
        CIYml["ci.yml"]:::ci
        CHTYml["chromatic.yml"]:::ci
        RLYml["release.yml"]:::ci
    end
    GitHub -->|triggers| CIYml --> CHTYml --> RLYml

    %% CI/CD Pipeline
    subgraph "CI/CD Processes"
        LintTest["Lint & Test"]:::ci
        BuildBundle["Build & Bundle"]:::ci
        StorybookTest["Storybook & Visual Tests"]:::ci
        ReleasePublish["Release & Publish"]:::ci
    end
    CIYml --> LintTest --> BuildBundle --> StorybookTest --> ReleasePublish
    StorybookTest -->|snapshots| Chromatic[("Chromatic")]:::cloud
    ReleasePublish -->|npm publish| NPM[("npm Registry")]:::db
    ReleasePublish -->|create release| GHRel[("GitHub Releases")]:::db

    %% Monorepo Workspace
    subgraph "Monorepo Workspace"
        WS["package.json (npm workspaces)"]:::code
        subgraph "packages/docs"
            DocsSite["docs site"]:::code
            DocsVC["vite.config.ts"]:::code
            DocsTS["tsconfig.json"]:::code
            DocsSrc["src/"]:::code
        end
        subgraph "packages/vlossom"
            subgraph "Source"
                Index["src/index.ts"]:::code
                subgraph "Components"
                    Components["src/components"]:::code
                    VsAccordion["vs-accordion"]:::code
                end
                Composables["src/composables"]:::code
                Stores["src/stores"]:::code
                Plugins["src/plugins"]:::code
                Utils["src/utils"]:::code
                Styles["src/styles/index.scss"]:::code
                Icons["src/icons"]:::code
                Models["src/models"]:::code
                Declaration["src/declaration"]:::code
                TestSetup["src/test/setup.ts"]:::code
            end
            subgraph "Storybook"
                SBMain[".storybook/main.ts"]:::code
                SBPreview[".storybook/preview.ts"]:::code
                SBTestRunner[".storybook/test-runner.ts"]:::code
            end
            subgraph "Chromatic Overrides"
                CHMain[".storybook-chromatic/main.ts"]:::code
                CHPreview[".storybook-chromatic/preview.ts"]:::code
            end
            subgraph "Playground"
                PIndex["playground/index.ts"]:::code
                PApp["playground/App.vue"]:::code
                PPlay["playground/Playground.vue"]:::code
            end
            subgraph "Build & Config"
                ViteLib["vite.config.ts"]:::code
                TSLib["tsconfig.json\ntsconfig.node.json"]:::code
                PackageLib["package.json"]:::code
            end
        end
    end

    %% Development Flow
    Dev -->|develops locally| WS
    WS --> DocsSite
    WS --> Components
    WS --> Index

    DocsSite -->|imports| Index
    PApp -->|imports| Index

    %% Consumption by End Users
    Users[("End Users")]:::user
    Users -->|install via npm| NPM
    Users -->|load via CDN| CDN[("CDN")]:::db

    %% Click Events
    click WS "https://github.com/pubg/vlossom/blob/main/package.json"
    click CIYml "https://github.com/pubg/vlossom/blob/main/.github/workflows/ci.yml"
    click CHTYml "https://github.com/pubg/vlossom/blob/main/.github/workflows/chromatic.yml"
    click RLYml "https://github.com/pubg/vlossom/blob/main/.github/workflows/release.yml"
    click DocsSite "https://github.com/pubg/vlossom/tree/main/packages/docs"
    click DocsVC "https://github.com/pubg/vlossom/blob/main/packages/docs/vite.config.ts"
    click DocsTS "https://github.com/pubg/vlossom/blob/main/packages/docs/tsconfig.json"
    click DocsSrc "https://github.com/pubg/vlossom/tree/main/packages/docs/src/"
    click Components "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/components"
    click VsAccordion "https://github.com/pubg/vlossom/blob/main/packages/vlossom/src/components/vs-accordion/VsAccordion.vue"
    click Composables "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/composables"
    click Stores "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/stores"
    click Plugins "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/plugins"
    click Utils "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/utils"
    click Styles "https://github.com/pubg/vlossom/blob/main/packages/vlossom/src/styles/index.scss"
    click Icons "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/icons"
    click Models "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/models"
    click Declaration "https://github.com/pubg/vlossom/tree/main/packages/vlossom/src/declaration"
    click TestSetup "https://github.com/pubg/vlossom/blob/main/packages/vlossom/src/test/setup.ts"
    click SBMain "https://github.com/pubg/vlossom/blob/main/packages/vlossom/.storybook/main.ts"
    click SBPreview "https://github.com/pubg/vlossom/blob/main/packages/vlossom/.storybook/preview.ts"
    click SBTestRunner "https://github.com/pubg/vlossom/blob/main/packages/vlossom/.storybook/test-runner.ts"
    click CHMain "https://github.com/pubg/vlossom/blob/main/packages/vlossom/.storybook-chromatic/main.ts"
    click CHPreview "https://github.com/pubg/vlossom/blob/main/packages/vlossom/.storybook-chromatic/preview.ts"
    click PIndex "https://github.com/pubg/vlossom/blob/main/packages/vlossom/playground/index.ts"
    click PApp "https://github.com/pubg/vlossom/blob/main/packages/vlossom/playground/App.vue"
    click PPlay "https://github.com/pubg/vlossom/blob/main/packages/vlossom/playground/Playground.vue"
    click ViteLib "https://github.com/pubg/vlossom/blob/main/packages/vlossom/vite.config.ts"
    click TSLib "https://github.com/pubg/vlossom/blob/main/packages/vlossom/tsconfig.json"
    click PackageLib "https://github.com/pubg/vlossom/blob/main/packages/vlossom/package.json"

    %% Styles
    classDef code fill:#D0E8FF,stroke:#005B96,color:#000
    classDef ci fill:#D4F5D4,stroke:#2E7D32,color:#000
    classDef cloud fill:#FFE0B2,stroke:#EF6C00,color:#000
    classDef db fill:#FFF3E0,stroke:#FB8C00,color:#000
    classDef dev fill:#EEEEEE,stroke:#757575,color:#000
    classDef user fill:#F3E5F5,stroke:#8E24AA,color:#000
```
