# hyunsdev/opize-design-system architecture

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

- Interactive diagram: https://gitdiagram.com/hyunsdev/opize-design-system
- Repository: https://github.com/hyunsdev/opize-design-system

## Overview

##### Main Components Structure

a) Core Infrastructure Layer
- StyleProvider and Theme Management
- Typography System
- Variable Management

b) Component Layer
- Basic Components (Button, Input, Text, etc.)
- Complex Components (Modal, Popover, Table)
- Navigation Components (Header, Footer, TabNav)

c) Hook Layer
- Modal Management
- Top Loading Management
- Code Modal Management

**[Core Infrastructure]**

- [Style System]
- Typography System
- Variable Management

- [Component Library]
- Basic Components
- Layout Components
- Complex Components
- Navigation Components

- [Hook System]
- Modal Management
- Theme Management
- Loading Management

##### Key Relationships to Highlight

- How OpizeWrapper provides context to all components
- How the theme system affects all visual components
- Demonstrate the relationship between hooks and their corresponding components
- How context providers interact with consumers

##### Implementation Details

- The component hierarchy starting from OpizeWrapper
- The theme system's influence on all components
- How hooks integrate with components
- The story book integration for component documentation

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core["Core Infrastructure"]
        StyleProvider["Style Provider"]
        ColorSystem["Color System"]
        TypoSystem["Typography System"]
        VarManagement["Variable Management"]
    end

    subgraph Components["Component Library"]
        subgraph Basic["Basic Components"]
            Button["Button"]
            Input["Input"]
            Text["Text"]
            Checkbox["Checkbox"]
        end

        subgraph Layout["Layout Components"]
            BoxLayout["Box Layout"]
            CenterLayout["Center Layout"]
            PageLayout["Page Layout"]
            Flex["Flex"]
        end

        subgraph Complex["Complex Components"]
            Modal["Modal"]
            Popover["Popover"]
            Table["Table"]
            SlideBox["SlideBox"]
        end

        subgraph Nav["Navigation Components"]
            Header["Header"]
            Footer["Footer"]
            TabNav["TabNav"]
            SimpleHeader["Simple Header"]
        end
    end

    subgraph Hooks["Hook System"]
        ModalHook["Modal Hook"]
        ColorThemeHook["Color Theme Hook"]
        TopLoadingHook["Top Loading Hook"]
        CodeModalHook["Code Modal Hook"]
    end

    subgraph Theme["Theme Management"]
        ColorThemeContext["Color Theme Context"]
        BaseColorPalette["Base Color Palette"]
        SemanticColorPalette["Semantic Color Palette"]
    end

    OpizeWrapper --> StyleProvider
    StyleProvider --> ColorSystem
    StyleProvider --> TypoSystem
    StyleProvider --> VarManagement
    
    ColorSystem --> Theme
    Theme --> Components
    TypoSystem --> Components
    VarManagement --> Components

    ModalHook --> Modal
    ColorThemeHook --> ColorThemeContext
    TopLoadingHook --> Components
    CodeModalHook --> Complex

    %% Click Events
    click StyleProvider "https://github.com/HyunsDev/opize-design-system/blob/main/src/styles/StyleProvider.tsx"
    click ColorSystem "https://github.com/HyunsDev/opize-design-system/tree/main/src/styles/colors/"
    click TypoSystem "https://github.com/HyunsDev/opize-design-system/tree/main/src/styles/typo/"
    click VarManagement "https://github.com/HyunsDev/opize-design-system/tree/main/src/styles/variable/"
    
    click Button "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Button/"
    click Input "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Input/"
    click Text "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Text/"
    click Checkbox "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Checkbox/"
    
    click BoxLayout "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Layouts/BoxLayout/"
    click CenterLayout "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Layouts/CenterLayout/"
    click PageLayout "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Layouts/PageLayout/"
    click Flex "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Flex/"
    
    click Modal "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Modal/"
    click Popover "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Popover/"
    click Table "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Table/"
    click SlideBox "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/SlideBox/"
    
    click Header "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Header/"
    click Footer "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/Footer/"
    click TabNav "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/TabNav/"
    click SimpleHeader "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/SimpleHeader/"
    
    click ModalHook "https://github.com/HyunsDev/opize-design-system/tree/main/src/hooks/useModal/"
    click ColorThemeHook "https://github.com/HyunsDev/opize-design-system/tree/main/src/hooks/useColorTheme/"
    click TopLoadingHook "https://github.com/HyunsDev/opize-design-system/tree/main/src/hooks/useTopLoading/"
    click CodeModalHook "https://github.com/HyunsDev/opize-design-system/tree/main/src/hooks/useCodeModal/"
    
    click OpizeWrapper "https://github.com/HyunsDev/opize-design-system/tree/main/src/components/OpizeWrapper/"
    click ColorThemeContext "https://github.com/HyunsDev/opize-design-system/blob/main/src/hooks/useColorTheme/ColorTheme.context.tsx"
    click BaseColorPalette "https://github.com/HyunsDev/opize-design-system/blob/main/src/styles/colors/light/baseColorPalette.tsx"
    click SemanticColorPalette "https://github.com/HyunsDev/opize-design-system/blob/main/src/styles/colors/light/semanticColorPalette.tsx"

    classDef core fill:#2374ab
    classDef basic fill:#57cc99
    classDef layout fill:#80ed99
    classDef complex fill:#f48c06
    classDef nav fill:#faa307
    classDef hooks fill:#7209b7
    classDef theme fill:#3a0ca3

    class StyleProvider,ColorSystem,TypoSystem,VarManagement core
    class Button,Input,Text,Checkbox basic
    class BoxLayout,CenterLayout,PageLayout,Flex layout
    class Modal,Popover,Table,SlideBox complex
    class Header,Footer,TabNav,SimpleHeader nav
    class ModalHook,ColorThemeHook,TopLoadingHook,CodeModalHook hooks
    class ColorThemeContext,BaseColorPalette,SemanticColorPalette theme
```
