How devexpress/devextreme-ui-template-gallery works
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.