# garitma/aura-design-system architecture

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

- Interactive diagram: https://gitdiagram.com/garitma/aura-design-system
- Repository: https://github.com/garitma/aura-design-system

## Overview

##### Main Components

A. Core Packages Layer:
- System Package (@aura-design/system)
- Components Library
- Hooks
- Utils
- Types
- Styled System Package
- Tokens
- Foundations
- Layout Systems
- CLI Package

B. Applications Layer:
- Documentation Website (Next.js)
- Ladle (Component Stories)
- API Services

C. Integration Layer:
- Build Systems
- Package Management
- CI/CD Workflows

**┌─────────────────────────────────────────────────────────┐**
- Applications Layer                     │
- ┌─────────────┐    ┌──────────┐    ┌──────────────┐   │
- Website   │    │  Ladle   │    │   Preview    │   │
- (Next.js)  │    │ (Stories)│    │    System    │   │
- ┘    └──────────┘    └──────────────┘   │
- ┤
- Core System Layer                     │
- ┌─────────────┐    ┌──────────┐    ┌──────────────┐   │
- System    │    │  Styled  │    │     CLI      │   │
- Package    │    │  System  │    │   Package    │   │
- ┘    └──────────┘    └──────────────┘   │
- ┤
- Infrastructure Layer                    │
- ┌─────────────┐    ┌──────────┐    ┌──────────────┐   │
- GitHub    │    │  Cloud   │    │    Build     │   │
- Actions    │    │   Run    │    │   Systems    │   │
- ┘    └──────────┘    └──────────────┘   │
- ┘

##### Important Details

a. System Package Components:
- Relationship between components, hooks, and utilities
- Design token system (13px aura unit)
- Type system connections

b. Website Architecture:
- Prismic CMS integration
- API routes
- Preview system
- Slice components

c. Build and Deploy Flow:
- GitHub Actions workflows
- Cloud Run deployments
- Package distribution system

##### Implementation Notes

- Maintain consistent spacing and alignment
- Version/package relationships
- Document external dependencies

##### Key Relationships to Highlight

- Package dependencies between system components
- Build and deployment workflows
- Documentation generation flow
- Component library distribution system

## Diagram (Mermaid)

```mermaid
graph TB
    %% Style Definitions
    classDef application fill:#3498db,stroke:#2980b9,color:white
    classDef core fill:#2ecc71,stroke:#27ae60,color:white
    classDef infrastructure fill:#95a5a6,stroke:#7f8c8d,color:white
    classDef component fill:#e74c3c,stroke:#c0392b,color:white

    %% Applications Layer
    subgraph Applications
        Website["Documentation Website"]
        Ladle["Ladle Stories"]
        Preview["Preview System"]

        %% Website Components
        APIRoutes["API Routes"]
        PrismicInt["Prismic Integration"]
        SliceComp["Slice Components"]

        %% Ladle Components
        CompStories["Component Stories"]
        BuildSys["Build System"]

        %% Relationships
        Website --> APIRoutes
        Website --> PrismicInt
        Website --> SliceComp
        Ladle --> CompStories
        Ladle --> BuildSys
    end

    %% Core System Layer
    subgraph CoreSystem
        SystemPkg["System Package"]
        StyledSystem["Styled System"]
        CLIPkg["CLI Package"]

        %% System Package Components
        Components["Components Library"]
        Hooks["Hooks"]
        Utils["Utils"]
        Types["Types"]

        %% Styled System Components
        Tokens["Tokens"]
        Foundations["Foundations"]
        LayoutSys["Layout Systems"]

        %% Relationships
        SystemPkg --> Components
        SystemPkg --> Hooks
        SystemPkg --> Utils
        SystemPkg --> Types
        StyledSystem --> Tokens
        StyledSystem --> Foundations
        StyledSystem --> LayoutSys
    end

    %% Infrastructure Layer
    subgraph Infrastructure
        GHActions["GitHub Actions"]
        CloudRun["Cloud Run"]
        BuildSystems["Build Systems"]

        %% Workflow Components
        WebsiteDeploy["Website Deployment"]
        LadleDeploy["Ladle Deployment"]

        %% Relationships
        GHActions --> WebsiteDeploy
        GHActions --> LadleDeploy
        WebsiteDeploy --> CloudRun
        LadleDeploy --> CloudRun
    end

    %% Cross-layer Relationships
    Website --> SystemPkg
    Ladle --> SystemPkg
    SystemPkg --> StyledSystem
    CLIPkg --> BuildSystems

    %% Click Events
    click SystemPkg "https://github.com/garitma/aura-design-system/tree/canary/packages/system/"
    click Components "https://github.com/garitma/aura-design-system/tree/canary/packages/system/components/"
    click Hooks "https://github.com/garitma/aura-design-system/tree/canary/packages/system/hooks/"
    click Utils "https://github.com/garitma/aura-design-system/tree/canary/packages/system/utils/"
    click Types "https://github.com/garitma/aura-design-system/tree/canary/packages/system/types/"
    click StyledSystem "https://github.com/garitma/aura-design-system/tree/canary/packages/styled-system/"
    click Tokens "https://github.com/garitma/aura-design-system/tree/canary/packages/styled-system/src/tokens/"
    click Foundations "https://github.com/garitma/aura-design-system/tree/canary/packages/styled-system/src/fundations/"
    click LayoutSys "https://github.com/garitma/aura-design-system/tree/canary/packages/styled-system/src/layout/"
    click CLIPkg "https://github.com/garitma/aura-design-system/tree/canary/packages/cli/"
    click Website "https://github.com/garitma/aura-design-system/tree/canary/apps/website/"
    click APIRoutes "https://github.com/garitma/aura-design-system/tree/canary/apps/website/app/api/"
    click PrismicInt "https://github.com/garitma/aura-design-system/tree/canary/apps/website/lib/prismic/"
    click SliceComp "https://github.com/garitma/aura-design-system/tree/canary/apps/website/slices/"
    click Ladle "https://github.com/garitma/aura-design-system/tree/canary/apps/ladle/"
    click CompStories "https://github.com/garitma/aura-design-system/tree/canary/apps/ladle/stories/"
    click BuildSys "https://github.com/garitma/aura-design-system/tree/canary/apps/ladle/build/"
    click WebsiteDeploy "https://github.com/garitma/aura-design-system/blob/canary/.github/workflows/cloud-run-website.yml"
    click LadleDeploy "https://github.com/garitma/aura-design-system/blob/canary/.github/workflows/cloud-run-ladle.yml"
    click GHActions "https://github.com/garitma/aura-design-system/tree/canary/.github/workflows/"

    %% Style Applications
    class Website,Ladle,Preview,APIRoutes,PrismicInt,SliceComp,CompStories,BuildSys application
    class SystemPkg,StyledSystem,CLIPkg,Components,Hooks,Utils,Types,Tokens,Foundations,LayoutSys core
    class GHActions,CloudRun,BuildSystems,WebsiteDeploy,LadleDeploy infrastructure
```
