# mathuo/dockview architecture

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

- Interactive diagram: https://gitdiagram.com/mathuo/dockview
- Repository: https://github.com/mathuo/dockview

## Overview

##### Project type and purpose
- This is an open-source, monorepo library (“dockview”) providing a zero-dependency layout manager core and multi-framework adapters (React, Vue, Angular, vanilla TypeScript), plus a documentation website and example sandboxes.

##### File structure
- Top-level: Lerna configuration and package.json orchestrate multiple packages under “packages/”.
- packages/dockview-core: the engine implementing panels, drag-and-drop, serialization, theming, etc., built with Gulp/Rollup and tested with Jest.
- packages/dockview, dockview-react, dockview-vue, dockview-angular: framework-specific adapters wrapping the core and exposing framework-native APIs. They share build scripts (Rollup, Gulp or custom scripts), TypeScript configs, and Jest tests.
- packages/docs: Docusaurus-based documentation site, example sandboxes, templates and API docs generated via TypeDoc.
- scripts/: custom utility scripts (docs generation, version management).
- .github/workflows: CI pipelines for build, test, code analysis, doc deploy, and npm publish.

##### README insights
- Core features: split‐views, grid‐views, tabs/groups, pop‐outs, floating windows, serialization, theming, Shadow DOM support.
- Emphasis on zero runtime dependencies, high test coverage, and transparent CI/CD with GitHub Actions.
- Live examples hosted on the docs site, version badges, and npm publishing.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Monorepo Root
    subgraph "Monorepo Root"
        direction TB
        lerna["lerna.json"] 
        pkgjson["package.json"] 
        tsconfig["tsconfig.base.json / tsconfig.json"]
        scripts["scripts/"] 
    end

    %% Core Engine
    subgraph "Core Engine"
        direction TB
        Core["Dockview Core"] 
    end

    %% Framework Adapters
    subgraph "Framework Adapters"
        direction TB
        VanilaTS["dockview (Vanilla TS)"]
        ReactAdapter["dockview-react"]
        VueAdapter["dockview-vue"]
        AngularAdapter["dockview-angular"]
    end

    %% Documentation Site
    subgraph "Documentation Site"
        direction TB
        Docs["Docusaurus Docs & Examples"]
    end

    %% CI/CD Pipelines
    subgraph "CI/CD Pipelines"
        direction TB
        CI["GitHub Actions Workflows"]
    end

    %% External Services
    subgraph "External Services"
        direction TB
        GitHub["GitHub (Source & Actions)"]
        NPM["npm Registry"]
        GHPages["GitHub Pages"]
    end

    %% Relationships
    VanilaTS -->|"depend on"| Core
    ReactAdapter -->|"depend on"| Core
    VueAdapter -->|"depend on"| Core
    AngularAdapter -->|"depend on"| Core

    Docs -->|"imports API"| Core
    Docs -->|"imports API"| VanilaTS
    Docs -->|"imports API"| ReactAdapter
    Docs -->|"imports API"| VueAdapter
    Docs -->|"imports API"| AngularAdapter

    lerna -->|"orchestrates build/test/publish"| Core
    lerna -->|"orchestrates build/test/publish"| VanilaTS
    lerna -->|"orchestrates build/test/publish"| ReactAdapter
    lerna -->|"orchestrates build/test/publish"| VueAdapter
    lerna -->|"orchestrates build/test/publish"| AngularAdapter
    lerna -->|"orchestrates build/test/publish"| Docs

    CI -->|"triggers build/test"| lerna
    CI -->|"publishes to"| NPM
    CI -->|"deploys docs to"| GHPages

    GitHub -->|"hosts workflows & code"| CI
    CI ---|"integrates with"| GitHub

    %% Click Events
    click lerna "https://github.com/mathuo/dockview/blob/master/lerna.json"
    click pkgjson "https://github.com/mathuo/dockview/blob/master/package.json"
    click tsconfig "https://github.com/mathuo/dockview/blob/master/tsconfig.base.json"
    click scripts "https://github.com/mathuo/dockview/tree/master/scripts/"
    click Core "https://github.com/mathuo/dockview/tree/master/packages/dockview-core/"
    click VanilaTS "https://github.com/mathuo/dockview/tree/master/packages/dockview/"
    click ReactAdapter "https://github.com/mathuo/dockview/tree/master/packages/dockview-react/"
    click VueAdapter "https://github.com/mathuo/dockview/tree/master/packages/dockview-vue/"
    click AngularAdapter "https://github.com/mathuo/dockview/tree/master/packages/dockview-angular/"
    click Docs "https://github.com/mathuo/dockview/tree/master/packages/docs/"
    click CI "https://github.com/mathuo/dockview/tree/master/.github/workflows/"

    %% Styles
    classDef monorepo fill:#f0f0f0,stroke:#333,stroke-width:1px
    classDef core fill:#1f78b4,stroke:#005a9c,stroke-width:2px,color:#fff
    classDef vanilla fill:#888888,stroke:#555,stroke-width:2px,color:#fff
    classDef react fill:#33a02c,stroke:#1b5e20,stroke-width:2px,color:#fff
    classDef vue fill:#17becf,stroke:#0e545b,stroke-width:2px,color:#fff
    classDef angular fill:#ff7f00,stroke:#b35900,stroke-width:2px,color:#fff
    classDef docs fill:#6a3d9a,stroke:#472763,stroke-width:2px,color:#fff
    classDef cicd fill:#fb9a99,stroke:#c74f58,stroke-width:2px,color:#000
    class lerna,pkgjson,tsconfig,scripts monorepo
    class Core core
    class VanilaTS vanilla
    class ReactAdapter react
    class VueAdapter vue
    class AngularAdapter angular
    class Docs docs
    class CI cicd
```
