# devexpress/devextreme-ui-template-gallery architecture

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

- Interactive diagram: https://gitdiagram.com/devexpress/devextreme-ui-template-gallery
- Repository: https://github.com/devexpress/devextreme-ui-template-gallery

## Overview

##### Project Context and Purpose
- The project is a UI template gallery aimed at showcasing responsive, DevExtreme-based UI templates for Line-of-Business (LOB) applications.
- It provides separate implementations for Angular, React, and Vue so that users can choose the framework that best fits their needs.
- The templates are “dumb” UI examples intended to be embedded in or used as starting points for business applications, with sample data and no backend business logic.

##### Key Components and Their Roles
- Frontend Applications: There are three separately maintained packages:
- Angular (located in packages/angular)
- React (located in packages/react)
- Vue (located in packages/vue)
- Supporting Packages:
- dx-template-gallery-data: Contains sample data used across the templates.
- metadata: Provides descriptions, themes, and content configuration for both Angular, React, and Vue implementations.
- shell: Likely provides a container or shared layout project (possibly an orchestrator or alternative presentation layer).
- testing: Holds end-to-end, UI, or integration tests (using TestCafe or similar frameworks) ensuring that the UI templates are functioning as expected.
- Utilities and Configuration:
- There are script files and config files (e.g., ESLint, Prettier, stylelint, tsconfig, and GitHub workflows) that establish common coding, build, and deployment practices.
- The “utils” folder contains scripts for building embedded modes, resizing listeners, and theme settings.
- CI/CD automation is in place with GitHub workflows (deploy, lint, test, etc.), emphasizing an automated build/test pipeline.

##### Relationships and Interactions
- Each frontend application uses the shared sample data and metadata to render the UI templates.
- The utilities and configuration scripts support consistency and enforce code quality across all packages.
- The testing suite interacts with each of the frontend packages to verify UI functionality.
- External dependencies come via npm packages (including the DevExtreme UI library) that provide the component set and styling guidelines for the templates.
- Build tools and CI/CD pipelines (GitHub Actions) monitor changes, run tests, and deploy the individual apps.

##### Architectural Patterns and Design Principles
- Modular Monorepo Structure: The system is organized as a monorepo containing multiple “packages” for each framework. This allows independent development and testing while sharing configuration and utility scripts.
- Separation of Concerns: Distinct folders for UI code (pages, components, layouts) and supporting assets (themes, metadata, sample data) indicate a separation between presentation and content/configuration.
- Consistency Across Frameworks: Although the implementations are in different frameworks, each package follows similar naming conventions and file structures, suggesting parallel architectures.
- Automated Quality Assurance: Integrated testing and linting workflows ensure each component’s quality across the board.

## Diagram (Mermaid)

```mermaid
graph TD
    %% External Dependency
    DE["DevExtreme UI Library"]:::external

    %% Shared Modules and Utilities Cluster
    subgraph "Shared Modules and Utilities"
        DS["Shared Sample Data"]:::shared
        MD["Metadata (descriptions, themes, config)"]:::shared
        UT["Utility Scripts and Tools"]:::utility
        SH["Shell Application"]:::shell
    end

    %% UI Templates Cluster
    subgraph "UI Templates"
        ANG["Angular Template App"]:::frontend
        RCT["React Template App"]:::frontend
        VUE["Vue Template App"]:::frontend
    end

    %% Testing and CI/CD Nodes
    TEST["Testing Suite"]:::testing
    CICD["CI/CD Pipeline (GitHub workflows)"]:::utility

    %% Relationships and Data Flow
    DE -->|"deps"| ANG
    DE -->|"deps"| RCT
    DE -->|"deps"| VUE

    DS -->|"providesData"| ANG
    DS -->|"providesData"| RCT
    DS -->|"providesData"| VUE

    MD -->|"providesConfig"| ANG
    MD -->|"providesConfig"| RCT
    MD -->|"providesConfig"| VUE

    SH -->|"wraps"| ANG
    SH -->|"wraps"| RCT
    SH -->|"wraps"| VUE

    UT -->|"supports"| ANG
    UT -->|"supports"| RCT
    UT -->|"supports"| VUE

    CICD -->|"deploys"| ANG
    CICD -->|"deploys"| RCT
    CICD -->|"deploys"| VUE
    CICD -->|"deploys"| SH
    CICD -->|"automates"| UT

    TEST -->|"tests"| ANG
    TEST -->|"tests"| RCT
    TEST -->|"tests"| VUE
    CICD -->|"runsTests"| TEST

    %% Click Events
    click ANG "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/angular"
    click RCT "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/react"
    click VUE "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/vue"
    click DS "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/dx-template-gallery-data"
    click MD "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/metadata"
    click SH "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/shell"
    click TEST "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/packages/testing"
    click UT "https://github.com/devexpress/devextreme-ui-template-gallery/tree/master/utils"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#004085,stroke-width:2px;
    classDef shared fill:#d4edda,stroke:#155724,stroke-width:2px;
    classDef utility fill:#fff3cd,stroke:#856404,stroke-width:2px;
    classDef testing fill:#f8d7da,stroke:#721c24,stroke-width:2px;
    classDef shell fill:#e2e3e5,stroke:#6c757d,stroke-width:2px;
    classDef external fill:#d1ecf1,stroke:#0c5460,stroke-width:2px;
```
