# visactor/vtable architecture

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

- Interactive diagram: https://gitdiagram.com/visactor/vtable
- Repository: https://github.com/visactor/vtable

## Overview

##### And Highlight the Main Components
- Core Library (packages/vtable): This is the heart of VTable. It contains the underlying engine and functionality for rendering and data processing.
- Specialized Components:
- Gantt Chart Component (packages/vtable-gantt): Implements Gantt chart functionalities.
- Editors (packages/vtable-editors): Supplies editing components for in-cell editing and advanced input.
- Export (packages/vtable-export): Provides utilities and tools to export table data (e.g., CSV/Excel).
- Search (packages/vtable-search): Implements search functionalities within tables.
- Framework Integration Wrappers:
- React Version (packages/react-vtable) and Vue Version (packages/vue-vtable): These provide framework-specific adaptations of the core component.
- Documentation and Website (docs): Contains tutorials, demos, API documentation, and multilingual guides that tie together the system usage.
- Build/Infrastructure Tools:
- Tools/ Scripts (tools/, common/, share/): Include bundler configurations, custom scripts, and common configuration (e.g., Rush configuration, ESLint/TS config).
- GitHub workflows and CI/CD (".github" folder): For automation of testing, releases, and documentation.

##### Interactions and Data Flow
- The central engine (VTable core) communicates with external visual rendering engine VRender (mentioned as a dependency in the README) and integrates with the charting library (VChart).
- The specialized packages extend the core functionality. For example, the Gantt package depends on the core to render timelines and dependencies.
- Both the React and Vue wrappers serve as integration layers that receive properties and then pass them to the core components, ensuring that they are adapted to the corresponding framework’s paradigms.
- The documentation directory ties into the overall project but also serves as an independent “site” that uses the code libraries to generate demos and tutorials.

##### Architectural Patterns & Design Principles to Emphasize
- Modularity and separation of concerns: Each package (core, gantt, editors, export, search, react, vue) is maintained independently yet shares common utilities and configurations.
- Dependency inversion and integration: Core functionalities are abstracted and then wrapped by framework-specific packages.
- Monorepo coordination: Use of Rush along with shared configuration files (in “common”, “share”, “tools”) ensures consistency across packages.

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "VTable Monorepo"
        %% Core and Specialized Components
        subgraph "Core & Specialized"
            VTableCore["VTable Core"]
            Gantt["Gantt Component"]
            Editors["Editors"]
            Export["Export"]
            Search["Search"]
        end

        %% Framework Wrappers
        subgraph "Framework Wrappers"
            ReactWrapper["React Wrapper"]
            VueWrapper["Vue Wrapper"]
        end

        %% External Dependencies
        subgraph "External Dependencies"
            VRender["VRender (External)"]
            VChart["VChart (External)"]
        end

        %% Documentation
        subgraph "Documentation"
            Docs["Documentation & Website"]
        end

        %% Build & Infrastructure
        subgraph "Build & Infrastructure"
            Tools["Tools & Scripts"]
            CI["GitHub Workflows (CI/CD)"]
        end
    end

    %% Relationships between Core & Specialized Components
    VTableCore -->|"extends"| Gantt
    VTableCore -->|"extends"| Editors
    VTableCore -->|"extends"| Export
    VTableCore -->|"extends"| Search

    %% Framework Wrapper interactions
    ReactWrapper -->|"wraps"| VTableCore
    VueWrapper -->|"wraps"| VTableCore

    %% External Dependencies integration
    VTableCore -->|"renders_via"| VRender
    VTableCore -->|"charts_via"| VChart

    %% Documentation relationship
    VTableCore -->|"documented_in"| Docs

    %% Build/Infrastructure support connections
    Tools -->|"builds"| VTableCore
    CI -->|"tests_deploys"| VTableCore
    CI -->|"tests_deploys"| Docs

    %% Click Events for Component Mapping
    click VTableCore "https://github.com/visactor/vtable/tree/develop/packages/vtable"
    click Gantt "https://github.com/visactor/vtable/tree/develop/packages/vtable-gantt"
    click Editors "https://github.com/visactor/vtable/tree/develop/packages/vtable-editors"
    click Export "https://github.com/visactor/vtable/tree/develop/packages/vtable-export"
    click Search "https://github.com/visactor/vtable/tree/develop/packages/vtable-search"
    click ReactWrapper "https://github.com/visactor/vtable/tree/develop/packages/react-vtable"
    click VueWrapper "https://github.com/visactor/vtable/tree/develop/packages/vue-vtable"
    click Docs "https://github.com/visactor/vtable/tree/develop/docs"
    click Tools "https://github.com/visactor/vtable/tree/develop/tools/"
    click CI "https://github.com/visactor/vtable/blob/develop/.github"

    %% Styles
    classDef core fill:#b3cde0,stroke:#03396c,stroke-width:2px;
    classDef specialized fill:#ccebc5,stroke:#006400,stroke-width:2px;
    classDef wrapper fill:#fbb4ae,stroke:#800000,stroke-width:2px;
    classDef external fill:#decbe4,stroke:#5a3d6a,stroke-width:2px;
    classDef docs fill:#ffcc99,stroke:#ff8c00,stroke-width:2px;
    classDef infra fill:#d9d9d9,stroke:#666666,stroke-width:2px;

    class VTableCore core;
    class Gantt,Editors,Export,Search specialized;
    class ReactWrapper,VueWrapper wrapper;
    class VRender,VChart external;
    class Docs docs;
    class Tools,CI infra;
```
