# blue-tomato/blueto architecture

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

- Interactive diagram: https://gitdiagram.com/blue-tomato/blueto
- Repository: https://github.com/blue-tomato/blueto

## Overview

##### Project Type Analysis
This is a Design System project, specifically a component library with a Storybook implementation. The structure suggests it's a modern frontend architecture focusing on reusable UI components and design foundations.

##### Main Components

Core Components:
- Design Foundations Layer
- UI Components Layer
- Documentation Layer (Storybook)
- Build & Distribution System

A. Top Level (Distribution Layer):
**┌─ Package Distribution ─┐**
- (npm package)        │
- ┬───────────┘

B. Main Layers (Core Architecture):
**┌─ Documentation Layer ─┐    ┌─ Build System ─┐**
- (Storybook)      │    │   (TypeScript) │
- ┬───────────┘    └───────┬────────┘

**┌──────────▼─────────────────────────▼──────┐**
- Core Library                  │
- ┬─────────────────────┐│
- UI Components    │     Foundations     ││
- ┴─────────────────────┘│

##### Detailed Component Breakdown

a) Foundations (Use hexagons):
- Typography
- Spacing
- Brand Logos
- Breakpoints

b) Components (Use rectangles):
- Button
- CategoryButton
- Checkbox
- RadioButton
- SizeButton

c) Stories (Use rounded rectangles):
- Component Stories
- Foundation Stories

##### Implementation Details

- Blue: Core components
- Green: Foundation elements
- Orange: Build/tooling systems
- Purple: Documentation

##### Additional Elements

Development Tooling:
- GitHub Actions workflow
- Storybook configuration
- TypeScript configuration
- SCSS Modules system

##### A high-level overview showing the main layers
- Component architecture
- Foundation system
- Build/distribution pipeline
- Documentation flow

##### Key Relationships to Highlight

- How components consume foundation elements
- How Storybook documentation integrates with components
- Demonstrate the SCSS modules relationship with components
- TypeScript type system integration

##### Notes for Implementation

- Use consistent spacing and alignment
- Version/package information
- External dependencies and integration points

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Distribution
        NPM["NPM Package"]
    end

    subgraph MainLayers
        DocLayer["Documentation Layer"]
        BuildSystem["Build System"]
        CoreLib["Core Library"]
    end

    subgraph Components
        Button["Button"]:::component
        CategoryButton["Category Button"]:::component
        Checkbox["Checkbox"]:::component
        Icon["Icon"]:::component
        RadioButton["Radio Button"]:::component
        SizeButton["Size Button"]:::component
    end

    subgraph Foundations
        Colors["Colors"]:::foundation
        Typography["Typography"]:::foundation
        Spacing["Spacing"]:::foundation
        Icons["Icons Library"]:::foundation
        BrandLogos["Brand Logos"]:::foundation
        Breakpoints["Breakpoints"]:::foundation
    end

    subgraph DevTools
        GHActions["GitHub Actions"]:::devtool
        StorybookConfig["Storybook Config"]:::devtool
        TSConfig["TypeScript Config"]:::devtool
        Biome["Biome Linting"]:::devtool
    end

    subgraph Stories
        CompStories["Component Stories"]:::story
        FoundStories["Foundation Stories"]:::story
    end

    %% Relationships
    DocLayer --> CoreLib
    BuildSystem --> CoreLib
    CoreLib --> Components
    CoreLib --> Foundations
    Components --> Foundations
    DocLayer --> Stories
    Stories --> Components
    Stories --> Foundations
    BuildSystem --> NPM
    DevTools --> BuildSystem

    %% Click Events
    click DocLayer "https://github.com/blue-tomato/blueto/tree/main/.storybook/"
    click Button "https://github.com/blue-tomato/blueto/blob/main/src/components/Button.tsx"
    click CategoryButton "https://github.com/blue-tomato/blueto/blob/main/src/components/CategoryButton.tsx"
    click Checkbox "https://github.com/blue-tomato/blueto/blob/main/src/components/Checkbox.tsx"
    click Icon "https://github.com/blue-tomato/blueto/blob/main/src/components/Icon.tsx"
    click RadioButton "https://github.com/blue-tomato/blueto/blob/main/src/components/RadioButton.tsx"
    click SizeButton "https://github.com/blue-tomato/blueto/blob/main/src/components/SizeButton.tsx"
    click Colors "https://github.com/blue-tomato/blueto/blob/main/src/foundations/colors.module.scss"
    click Typography "https://github.com/blue-tomato/blueto/blob/main/src/foundations/typography.module.scss"
    click Spacing "https://github.com/blue-tomato/blueto/blob/main/src/foundations/spacing.module.scss"
    click Icons "https://github.com/blue-tomato/blueto/tree/main/src/foundations/icons/"
    click BrandLogos "https://github.com/blue-tomato/blueto/tree/main/src/foundations/brandlogos/"
    click BuildSystem "https://github.com/blue-tomato/blueto/blob/main/tsconfig.json"
    click GHActions "https://github.com/blue-tomato/blueto/blob/main/.github/workflows/main.yml"
    click StorybookConfig "https://github.com/blue-tomato/blueto/blob/main/.storybook/main.ts"
    click Biome "https://github.com/blue-tomato/blueto/blob/main/biome.json"
    click TSConfig "https://github.com/blue-tomato/blueto/blob/main/tsconfig.json"
    click CompStories "https://github.com/blue-tomato/blueto/tree/main/src/stories/components/"
    click FoundStories "https://github.com/blue-tomato/blueto/tree/main/src/stories/foundations/"

    %% Styles
    classDef component fill:#3498db,stroke:#2980b9,color:white
    classDef foundation fill:#2ecc71,stroke:#27ae60,color:white
    classDef devtool fill:#e67e22,stroke:#d35400,color:white
    classDef story fill:#9b59b6,stroke:#8e44ad,color:white

    %% Legend
    subgraph Legend
        L1["Component"]:::component
        L2["Foundation"]:::foundation
        L3["Dev Tool"]:::devtool
        L4["Story"]:::story
    end
```
