# nguyendat0410/g-version-ui architecture

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

- Interactive diagram: https://gitdiagram.com/nguyendat0410/g-version-ui
- Repository: https://github.com/nguyendat0410/g-version-ui

## Overview

##### Main Components Layer Structure

a) Core Components Layer
- Two sub-components currently implemented:
- Button Component
- Input Component
- Use a modular structure to show each component's internal architecture:
- Component Logic (TSX)
- Styling (SCSS)
- Types
- Stories
- Tests

b) Theme System Layer
- Constants
- Theme Configuration

##### Build & Development Infrastructure

a) Development Tools
- Storybook Environment
- TypeScript Compilation
- Rollup Bundling
- Jest Testing Framework

b) CI/CD Pipeline (based on GitHub Actions)
- Workflow processes:
- CI Testing
- Publishing
- Package Distribution

##### Integration Points

a) Package Distribution
- NPM/Yarn Package System
- Component Consumption Flow

##### Component Architecture
- Modular nature of components
- Consistent structure (TSX, SCSS, Types, Stories, Tests)
- Demonstrate theme integration

##### Development Workflow
- Storybook for development and documentation
- Testing infrastructure
- Build process with Rollup

##### Infrastructure
- GitHub Actions workflows
- TypeScript compilation
- Package distribution

- Version information and key technologies used

Level of Detail:
- Keep component internals at a moderate level of detail
- Overall architecture and component relationships
- Development and build infrastructure

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Development
        SB["Storybook Environment"]
        TS["TypeScript Compilation"]
        RB["Rollup Bundling"]
        Jest["Jest Testing"]
    end

    subgraph "CI/CD"
        CI["CI Testing"]
        Pub["Publishing"]
        Dist["Package Distribution"]
    end

    subgraph "Core Components"
        direction TB
        CompEntry["Components Entry Point"]
        
        subgraph "Button Component"
            BL["Button Logic"]
            BS["Button Styling"]
            BT["Button Types"]
            BSt["Button Stories"]
            BTe["Button Tests"]
        end
        
        subgraph "Input Component"
            IL["Input Logic"]
            IS["Input Styling"]
            IT["Input Types"]
            ISt["Input Stories"]
            ITe["Input Tests"]
        end
    end

    subgraph "Theme System"
        Colors["Colors"]
        Constants["Constants"]
        ThemeConfig["Theme Configuration"]
    end

    subgraph "Documentation"
        ColorsDoc["Colors Documentation"]
        IntroDoc["Intro Documentation"]
    end

    MainEntry["Main Library Entry"]

    %% Relationships
    MainEntry --> CompEntry
    CompEntry --> BL & IL
    Colors & Constants --> ThemeConfig
    ThemeConfig --> BL & IL
    SB --> BSt & ISt
    TS --> MainEntry
    RB --> Dist
    Jest --> BTe & ITe
    CI --> Pub
    Pub --> Dist

    %% Styling
    classDef component fill:#a8d1f0
    classDef infrastructure fill:#d3d3d3
    classDef theme fill:#e6b8e6
    classDef docs fill:#98FB98
    classDef entry fill:#ffd700

    class BL,BS,BT,BSt,BTe,IL,IS,IT,ISt,ITe component
    class SB,TS,RB,Jest,CI,Pub,Dist infrastructure
    class Colors,Constants,ThemeConfig theme
    class ColorsDoc,IntroDoc docs
    class MainEntry,CompEntry entry

    %% Click Events
    click BL "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Button/Button.tsx"
    click BS "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Button/Button.scss"
    click BT "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Button/Button.types.tsx"
    click BSt "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Button/Button.stories.tsx"
    click BTe "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Button/Button.test.tsx"
    click IL "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Input/Input.tsx"
    click IS "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Input/Input.scss"
    click IT "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Input/Input.types.tsx"
    click ISt "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Input/Input.stories.tsx"
    click ITe "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/Input/Input.test.tsx"
    click Colors "https://github.com/nguyendat0410/G-version-ui/blob/master/src/themes/colors.ts"
    click Constants "https://github.com/nguyendat0410/G-version-ui/blob/master/src/themes/constants.ts"
    click ThemeConfig "https://github.com/nguyendat0410/G-version-ui/blob/master/src/themes/index.ts"
    click SB "https://github.com/nguyendat0410/G-version-ui/blob/master/.storybook"
    click CI "https://github.com/nguyendat0410/G-version-ui/blob/master/.github/workflows/ci.yml"
    click Pub "https://github.com/nguyendat0410/G-version-ui/blob/master/.github/workflows/publish.yml"
    click RB "https://github.com/nguyendat0410/G-version-ui/blob/master/rollup.config.mjs"
    click TS "https://github.com/nguyendat0410/G-version-ui/blob/master/tsconfig.json"
    click Jest "https://github.com/nguyendat0410/G-version-ui/blob/master/jest.config.js"
    click ColorsDoc "https://github.com/nguyendat0410/G-version-ui/blob/master/src/screens/Colors.mdx"
    click IntroDoc "https://github.com/nguyendat0410/G-version-ui/blob/master/src/screens/Intro.mdx"
    click MainEntry "https://github.com/nguyendat0410/G-version-ui/blob/master/src/index.ts"
    click CompEntry "https://github.com/nguyendat0410/G-version-ui/blob/master/src/components/index.ts"
```
