# imverickz/storybook-deploy architecture

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

- Interactive diagram: https://gitdiagram.com/imverickz/storybook-deploy
- Repository: https://github.com/imverickz/storybook-deploy

## Overview

##### Main Components of the System

a) Packages (Core Components):
- tokens package (Design Tokens)
- react package (React Components)
- docs package (Documentation/Storybook)
- Shared Configurations (eslint-config, ts-config)

##### Foundation Layer
- Shared Configurations (TypeScript, ESLint)

##### Component Layer
- React Components
- Component Styles
- Component Logic

##### Documentation Layer
- Storybook
- MDX Documentation
- Component Stories

##### Detailed Component Breakdown

- Individual components (Button, Heading, Text, etc.)
- Their relationship with design tokens
- Style implementation (styled-components)

##### Build/Deploy Flow

A section showing:
- Turborepo build process
- Changesets for versioning
- GitHub Actions workflow

**[Design Tokens] → [React Components] → [Storybook Docs]**
- ↑               ↑                      ↑
- [Shared Configs]───────────────┘

Key Elements to Emphasize:

##### Monorepo Structure
- Clear package separation
- Shared dependencies
- Configuration inheritance

##### Component Architecture
- Token consumption
- Style system integration
- Component composition

##### Documentation Flow
- Story creation
- MDX integration
- Token visualization

Guidelines for Creation:

##### Version management flow

Tools Recommendation:
- Use standardized symbols for React/TypeScript
- Package versions in the documentation

Remember to maintain a balance between detail and clarity, focusing on the architectural decisions that make this design system scalable and maintainable.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph Foundation
        DesignTokens[Design Tokens]
        SharedConfig[Shared Configurations]
        
        subgraph Tokens["Design Token Types"]
            Colors["Colors"]
            Typography["Typography"]
            Spacing["Spacing"]
            OtherTokens["Other Tokens"]
        end
        
        subgraph Config["Configuration"]
            TSConfig["TypeScript Config"]
            ESLintConfig["ESLint Config"]
            TurboConfig["Turborepo Config"]
        end
    end
    
    subgraph Components
        ReactComponents[React Components]
        
        subgraph CoreComponents["Core Components"]
            Avatar["Avatar"]
            Button["Button"]
            Text["Text"]
        end
        
        subgraph FormComponents["Form Components"]
            TextInput["Text Input"]
            Checkbox["Checkbox"]
        end
        
        StyleSystem["Style System"]
    end
    
    subgraph Documentation
        Storybook["Storybook"]
        Stories["Component Stories"]
        TokenDocs["Token Documentation"]
        DocComponents["Documentation Components"]
    end
    
    subgraph BuildDeploy["Build & Deploy"]
        GHWorkflows["GitHub Workflows"]
        Changesets["Changesets"]
    end

    %% Relationships
    Colors & Typography & Spacing & OtherTokens --> DesignTokens
    TSConfig & ESLintConfig & TurboConfig --> SharedConfig
    DesignTokens --> ReactComponents
    SharedConfig --> ReactComponents
    SharedConfig --> Documentation
    ReactComponents --> Documentation
    StyleSystem --> ReactComponents
    Avatar & Button & Text --> CoreComponents
    TextInput & Checkbox --> FormComponents
    CoreComponents & FormComponents --> ReactComponents
    Stories & TokenDocs & DocComponents --> Storybook
    ReactComponents --> Stories
    GHWorkflows --> BuildDeploy
    Changesets --> BuildDeploy

    %% Click Events
    click Colors "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/tokens/src/colors.ts"
    click Typography "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/tokens/src/fonts.ts"
    click Spacing "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/tokens/src/space.ts"
    click OtherTokens "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/tokens/src/radii.ts"
    click TSConfig "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/ts-config"
    click ESLintConfig "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/eslint-config"
    click TurboConfig "https://github.com/IMvErickz/Storybook-deploy/blob/main/turbo.json"
    click Avatar "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/react/src/components/Avatar"
    click Button "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/react/src/components/Button.tsx"
    click Text "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/react/src/components/Text.tsx"
    click TextInput "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/react/src/components/TextInput"
    click Checkbox "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/react/src/components/Checkbox"
    click StyleSystem "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/react/src/styles/index.ts"
    click Stories "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/docs/src/stories"
    click TokenDocs "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/docs/src/pages/tokens"
    click DocComponents "https://github.com/IMvErickz/Storybook-deploy/tree/main/packages/docs/src/components"
    click Storybook "https://github.com/IMvErickz/Storybook-deploy/blob/main/packages/docs/.storybook"
    click GHWorkflows "https://github.com/IMvErickz/Storybook-deploy/blob/main/.github/workflows/deploy-docs.yml"
    click Changesets "https://github.com/IMvErickz/Storybook-deploy/blob/main/.changeset/config.json"

    %% Styling
    classDef foundation fill:#f9f,stroke:#333,stroke-width:2px
    classDef component fill:#bbf,stroke:#333,stroke-width:2px
    classDef documentation fill:#bfb,stroke:#333,stroke-width:2px
    classDef build fill:#ffb,stroke:#333,stroke-width:2px
    
    class DesignTokens,SharedConfig,Tokens,Config foundation
    class ReactComponents,CoreComponents,FormComponents,StyleSystem component
    class Storybook,Stories,TokenDocs,DocComponents documentation
    class BuildDeploy,GHWorkflows,Changesets build
```
