# nuva-org/react-table architecture

> Architecture diagram of the GitHub repository nuva-org/react-table, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2025-09-24). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/nuva-org/react-table
- Repository: https://github.com/nuva-org/react-table

## Overview

##### Project Type and Purpose
- This is an open-source, monorepo library (“TanStack Table v8”) providing a headless table core plus first-class framework adapters (React, Vue, Solid, Angular, Lit, Qwik) and utility packages.
- It ships a core pipeline for table data modeling and features (filtering, sorting, grouping…), plus framework bindings, DevTools, examples, docs, and a CI/CD pipeline for building, testing, and publishing.

##### File-Structure Analysis
- Top-level config: pnpm-workspace.yaml, nx.json, GitHub workflows (.github/workflows), build/test configs (vitest.config.ts, rollup.config, tsconfig.json), scripts/ for publish & config.
- packages/: each named package has its own src/, tests/, package.json, and rollup/Vite/Nx configs. Key packages:
- table-core: the heart of the data pipeline & feature modules
- match-sorter-utils: helper functions shared with core
- adapter packages: react-table, vue-table, solid-table, angular-table, lit-table, qwik-table
- react-table-devtools: interactive explorer for React
- examples/: framework-specific demo apps that consume the adapters.
- docs/: markdown API docs, framework guides, installation, overview.
- CI/CD: GitHub Actions workflows for linting, unit tests, build, publish. Nx orchestrates tasks & caching across packages.

##### README Insights
- Confirms “headless UI” core, framework adapters, Team workflow: fully TypeScript, no plugin system, 100% custom markup.
- Installation instructions per adapter; features list (filtering, sorting, grouping…).
- Encourages contribution to docs, tests, examples.

a. Components
- Monorepo Codebase (hosted on GitHub)
- Nx Task Orchestrator & pnpm Workspace
- Package: table-core (JS/TS agnostic core engine)
- Utility Package: match-sorter-utils
- Adapters: react-table, vue-table, solid-table, angular-table, lit-table, qwik-table
- DevTools: react-table-devtools
- Example Applications (per framework)
- Documentation Site (docs folder + static site generator)
- CI/CD Pipeline (GitHub Actions)
- NPM Registry (publishing endpoint)

b. Relationships & Data Flow
1. Developer pushes code → GitHub → triggers CI/CD
2. CI jobs:
- Lint/format
- Nx graph analysis → run unit tests (vitest) per package
- Build step: rollup/Vite compile packages
- Docs generation (static site)
- Publish step: packages → NPM registry
3. table-core exports core API → adapters consume core → example apps import adapters
4. match-sorter-utils is a shared dependency imported by table-core and adapters as needed
5. react-table-devtools consumes react-table API to provide runtime inspection

c. Architectural Patterns & Principles
- Monorepo with pnpm/Nx: single workspace, cross-package caching, dependency graph
- Headless core + framework bindings: inversion of control, functions over components
- Feature modules: each feature (filtering, sorting…) is a standalone module under table-core/src/features
- Shared utilities: match-sorter-utils decoupled for reuse
- CI/CD as code: GitHub Actions workflows define test/build/publish pipelines

d. Key Technologies
- TypeScript (100%)
- Build tools: Rollup (bundling), Vite (dev server for examples), Nx (task orchestration)
- Testing: Vitest
- Package manager: pnpm workspaces
- CI: GitHub Actions
- Documentation: Markdown + static site pipeline under docs/

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Top-level flow
    Dev["Developer"]:::actor
    Dev -->|"push code"| GH["GitHub Repository"]:::external
    GH -->|"trigger"| CI["CI/CD Pipeline"]:::ci

    %% Monorepo Configuration
    subgraph "Monorepo Config" 
        PNPM["pnpm-workspace.yaml"]:::config
        NX["nx.json & .nx/workflows"]:::config
        ROOTCONFIG["rollup.config.*, vitest.config.ts, tsconfig.json"]:::config
        SCRIPTS["scripts/"]:::config
    end
    click PNPM "https://github.com/nuva-org/react-table/blob/main/pnpm-workspace.yaml"
    click NX "https://github.com/nuva-org/react-table/blob/main/nx.json"
    click NX "https://github.com/nuva-org/react-table/tree/main/.nx/workflows/"
    click ROOTCONFIG "https://github.com/nuva-org/react-table/blob/main/vitest.config.ts"
    click ROOTCONFIG "https://github.com/nuva-org/react-table/blob/main/tsconfig.json"
    click SCRIPTS "https://github.com/nuva-org/react-table/blob/main/scripts/config.js"
    click SCRIPTS "https://github.com/nuva-org/react-table/blob/main/scripts/getRollupConfig.js"
    click SCRIPTS "https://github.com/nuva-org/react-table/blob/main/scripts/publish.js"
    click SCRIPTS "https://github.com/nuva-org/react-table/blob/main/scripts/verify-links.ts"

    CI -->|"orchestrates via pnpm & Nx"| PNPM
    CI --> NX
    CI --> ROOTCONFIG

    %% Core and Utilities Layer
    subgraph "Core Packages" 
        direction TB
        CORE["table-core (headless engine)"]:::core
        FEATURES["feature modules"]:::core
        UTIL["match-sorter-utils"]:::utility
    end
    click CORE "https://github.com/nuva-org/react-table/tree/main/packages/table-core/src/"
    click FEATURES "https://github.com/nuva-org/react-table/tree/main/packages/table-core/src/features/"
    click UTIL "https://github.com/nuva-org/react-table/tree/main/packages/match-sorter-utils/src/"

    %% Adapters Layer
    subgraph "Framework Adapters"
        direction TB
        REACT["@tanstack/react-table"]:::adapter
        VUE["@tanstack/vue-table"]:::adapter
        SOLID["@tanstack/solid-table"]:::adapter
        ANGULAR["@tanstack/angular-table"]:::adapter
        LIT["@tanstack/lit-table"]:::adapter
        QWIK["@tanstack/qwik-table"]:::adapter
        SVELTE["@tanstack/svelte-table"]:::adapter
    end
    click REACT "https://github.com/nuva-org/react-table/tree/main/packages/react-table/src/"
    click VUE "https://github.com/nuva-org/react-table/tree/main/packages/vue-table/src/"
    click SOLID "https://github.com/nuva-org/react-table/tree/main/packages/solid-table/src/"
    click ANGULAR "https://github.com/nuva-org/react-table/tree/main/packages/angular-table/src/"
    click LIT "https://github.com/nuva-org/react-table/tree/main/packages/lit-table/src/"
    click QWIK "https://github.com/nuva-org/react-table/tree/main/packages/qwik-table/src/"
    click SVELTE "https://github.com/nuva-org/react-table/tree/main/packages/svelte-table/src/"

    CORE -->|imports| FEATURES
    UTIL -->|shared with| CORE
    UTIL -->|shared with| REACT
    UTIL -->|shared with| VUE
    UTIL -->|shared with| SOLID
    UTIL -->|shared with| ANGULAR
    UTIL -->|shared with| LIT
    UTIL -->|shared with| QWIK
    UTIL -->|shared with| SVELTE
    CORE -->|consumed by| REACT
    CORE -->|consumed by| VUE
    CORE -->|consumed by| SOLID
    CORE -->|consumed by| ANGULAR
    CORE -->|consumed by| LIT
    CORE -->|consumed by| QWIK
    CORE -->|consumed by| SVELTE

    %% DevTools
    DEVTOOLS["React DevTools"]:::devtools
    click DEVTOOLS "https://github.com/nuva-org/react-table/tree/main/packages/react-table-devtools/src/"
    REACT -->|provides API to| DEVTOOLS

    %% Examples and Docs Layer
    subgraph "Examples & Documentation"
        direction TB
        EXAMPLES["Example Applications"]:::example
        DOCS["Documentation Site"]:::docs
    end
    click EXAMPLES "https://github.com/nuva-org/react-table/tree/main/examples/"
    click DOCS "https://github.com/nuva-org/react-table/tree/main/docs/"

    REACT -->|import| EXAMPLES
    VUE -->|import| EXAMPLES
    SOLID -->|import| EXAMPLES
    ANGULAR -->|import| EXAMPLES
    LIT -->|import| EXAMPLES
    QWIK -->|import| EXAMPLES
    SVELTE -->|import| EXAMPLES
    DOCS -->|renders from| ROOTCONFIG

    %% Publishing
    CI -->|"publish packages"| NPM["NPM Registry"]:::registry

    %% Styles
    classDef actor fill:#fffae6,stroke:#e6a700;
    classDef external fill:#e8f0fe,stroke:#4285f4;
    classDef ci fill:#fff3e0,stroke:#fb8c00,stroke-dasharray: 5 5;
    classDef config fill:#f3e5f5,stroke:#8e24aa;
    classDef core fill:#e3f2fd,stroke:#1e88e5;
    classDef utility fill:#e8f5e9,stroke:#43a047;
    classDef adapter fill:#f1f8e9,stroke:#7cb342;
    classDef devtools fill:#ede7f6,stroke:#5e35b1;
    classDef example fill:#eceff1,stroke:#607d8b;
    classDef docs fill:#fffde7,stroke:#fdd835;
    classDef registry fill:#e0f7fa,stroke:#00acc1;
```
