# sparkdesignsystem/spark-design-system architecture

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

- Interactive diagram: https://gitdiagram.com/sparkdesignsystem/spark-design-system
- Repository: https://github.com/sparkdesignsystem/spark-design-system

## Overview

##### Main Architecture Components

a) Framework Implementations Layer
- Angular Implementation (spark-angular)
- React Implementation (react/)
- HTML/JS Implementation (html/)

b) Core Layer
- Styles (styles/)
- Design Tokens (styles/tokens/)
- Component Patterns
- Utilities

c) Documentation Layer
- Gatsby Documentation Site
- Storybook Integration
- Testing Infrastructure

##### Component Organization

Components into logical categories:
- Base Components (inputs, typography, links, lists)
- UI Components (accordion, alerts, modals, etc.)

##### Dependencies and Relationships

Following flows:
- Design Tokens → Styles → Framework Implementations
- Core Patterns → Framework-specific Implementations
- Testing Infrastructure → Component Implementations
- Documentation Generation Flow

##### Implementation Details

- Core Components (blue)
- Framework-specific Implementations (different shades for each framework)
- Documentation/Testing Infrastructure (gray)
- Build/Deploy Systems (green)

##### Specific Notations

Use the following symbols:
- Rectangles: Components and Modules
- Hexagons: Entry Points

##### Additional Details

Annotations for:
- Version Control Integration
- CI/CD Pipeline
- Documentation Generation
- Package Distribution

- The modular nature of the system
- Framework-agnostic core design
- Documentation and testing integration
- Build and deployment workflow

Remember to:
- Use consistent styling
- Version/date information
- Document key integration points

This will create a comprehensive visualization of the Spark Design System's architecture while maintaining clarity and usefulness for development teams.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph "Framework Implementations"
        Angular["Angular Implementation"]
        React["React Implementation"]
        HTML["HTML/JS Implementation"]
    end

    subgraph "Core Layer"
        Styles["Styles"]
        DesignTokens["Design Tokens"]
        ComponentPatterns["Component Patterns"]
        Utilities["Utilities"]
    end

    subgraph "Documentation Layer"
        GatsbyDocs["Gatsby Documentation Site"]
        
        subgraph "Storybook Integration"
            AngularStory["Angular Storybook"]
            ReactStory["React Storybook"]
            HTMLStory["HTML Storybook"]
        end
        
        subgraph "Testing Infrastructure"
            AngularTest["Angular Tests"]
            ReactTest["React Tests"]
            HTMLTest["HTML Tests"]
        end
    end

    subgraph "Component Categories"
        subgraph "Base Components"
            AngularBase["Angular Base"]
            ReactBase["React Base"]
            HTMLBase["HTML Base"]
        end
        
        subgraph "UI Components"
            AngularUI["Angular UI"]
            ReactUI["React UI"]
            HTMLUI["HTML UI"]
        end
        
        subgraph "Layout Components"
            AngularLayout["Angular Layout"]
            ReactLayout["React Layout"]
            HTMLLayout["HTML Layout"]
        end
        
        subgraph "Utility Components"
            AngularUtil["Angular Utilities"]
            ReactUtil["React Utilities"]
            HTMLUtil["HTML Utilities"]
        end
    end

    %% Core Layer Relationships
    DesignTokens --> Styles
    Styles --> ComponentPatterns
    ComponentPatterns --> Utilities

    %% Framework Implementation Dependencies
    ComponentPatterns --> Angular
    ComponentPatterns --> React
    ComponentPatterns --> HTML

    %% Testing Relationships
    AngularTest --> Angular
    ReactTest --> React
    HTMLTest --> HTML

    %% Storybook Integration
    AngularStory --> Angular
    ReactStory --> React
    HTMLStory --> HTML

    %% Documentation
    GatsbyDocs --> Angular
    GatsbyDocs --> React
    GatsbyDocs --> HTML

    %% Component Category Relationships
    Angular --> AngularBase & AngularUI & AngularLayout & AngularUtil
    React --> ReactBase & ReactUI & ReactLayout & ReactUtil
    HTML --> HTMLBase & HTMLUI & HTMLLayout & HTMLUtil

    %% Click Events
    click Angular "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/angular/projects/spark-angular/"
    click React "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/react/src/"
    click HTML "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/html/"
    click Styles "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/styles/"
    click DesignTokens "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/styles/tokens/"
    click ComponentPatterns "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/styles/components/"
    click Utilities "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/styles/utilities/"
    click GatsbyDocs "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/src/"
    click AngularStory "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/angular/.storybook/"
    click ReactStory "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/react/.storybook/"
    click HTMLStory "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/html/.storybook/"
    click AngularBase "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/angular/projects/spark-angular/src/lib/components/inputs/"
    click ReactBase "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/react/src/base/"
    click HTMLBase "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/html/base/"
    click AngularUI "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/angular/projects/spark-angular/src/lib/components/"
    click ReactUI "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/react/src/components/"
    click HTMLUI "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/html/components/"
    click AngularLayout "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/angular/projects/spark-angular/src/lib/directives/"
    click ReactLayout "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/react/src/objects/"
    click HTMLLayout "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/html/objects/"
    click AngularUtil "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/angular/projects/spark-angular/src/lib/utilities/"
    click ReactUtil "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/react/src/utilities/"
    click HTMLUtil "https://github.com/sparkdesignsystem/spark-design-system/tree/staging/html/utilities/"

    classDef core fill:#2374AB
    classDef framework fill:#FF8C42
    classDef docs fill:#757575
    classDef testing fill:#D81159
    classDef components fill:#8F2D56

    class DesignTokens,Styles,ComponentPatterns,Utilities core
    class Angular,React,HTML framework
    class GatsbyDocs,AngularStory,ReactStory,HTMLStory docs
    class AngularTest,ReactTest,HTMLTest testing
    class AngularBase,ReactBase,HTMLBase,AngularUI,ReactUI,HTMLUI,AngularLayout,ReactLayout,HTMLLayout,AngularUtil,ReactUtil,HTMLUtil components
```
