# nrise/quantum-dots architecture

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

- Interactive diagram: https://gitdiagram.com/nrise/quantum-dots
- Repository: https://github.com/nrise/quantum-dots

## Overview

##### Project Type Analysis
This is a Flutter Design System library project that provides reusable UI components for the Wippy Global Product. The structure indicates it's a comprehensive UI component library with example implementations.

##### Main Components

Core Layer:
- Common Widgets
- Basic UI Elements

Component Categories:
- Input Components
- Navigation Components
- Feedback Components
- Layout Components
- Interactive Components

A. High-Level Architecture (Top Layer):
**┌─────────────────────────────────────────┐**
- Quantum-Dots SDK             │
- ┘

B. Core Foundation Layer (Second Layer):
**┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐**
- Foundation    │ │  Common Widget  │ │    Animation    │
- Gradients    │ │                 │ │                 │
- ┘ └─────────────────┘ └─────────────────┘

C. Component Categories (Third Layer):
**┌─────────────┐ ┌─────────────┐ ┌─────────────┐ ┌─────────────┐**
- Input     │ │ Navigation  │ │  Feedback   │ │   Layout    │
- Components  │ │ Components  │ │ Components  │ │ Components  │
- ┘ └─────────────┘ └─────────────┘ └─────────────┘

##### Specific Implementation Details

- Blue: Foundation components
- Green: Input components
- Orange: Navigation components
- Purple: Feedback components
- Gray: Utility components

- Rectangles: Major components
- Rounded rectangles: UI components
- Hexagons: State management components

##### Component Relationships

- Double lines: Two-way interactions

##### State Management Layer
Cubit/Bloc patterns for stateful components:
- TextFieldCubit
- TextAreaCubit
- ToastBloc

**Foundation Layer**
- ↓
**Common Components**
- ↓
**Specialized Components**
- ↓
**Example Implementation**

##### Tools Recommendation
Use tools like:
- Lucidchart
- Enterprise Architect

Remember to include:
- Component versioning
- State management patterns
- Theme system integration
- Platform-specific considerations
- Testing architecture

This will provide a comprehensive view of the design system's architecture while maintaining clarity and usefulness for development teams.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Styles and classes
    classDef foundation fill:#3498db,stroke:#333,stroke-width:2px
    classDef common fill:#2ecc71,stroke:#333,stroke-width:2px
    classDef input fill:#e74c3c,stroke:#333,stroke-width:2px
    classDef feedback fill:#f1c40f,stroke:#333,stroke-width:2px
    classDef layout fill:#9b59b6,stroke:#333,stroke-width:2px
    classDef interactive fill:#1abc9c,stroke:#333,stroke-width:2px
    classDef state fill:#95a5a6,stroke:#333,stroke-width:2px

    %% Foundation Layer
    subgraph Foundation
        Colors["Colors System"]:::foundation
        Typography["Typography"]:::foundation
        Gradients["Gradients"]:::foundation
        Icons["Icons"]:::foundation
    end

    %% Common Widget Layer
    subgraph Common
        Animation["Animation Systems"]:::common
        NetworkImage["Network Image Handler"]:::common
        ButtonGradient["Button Gradient"]:::common
        SharedUtils["Shared Utilities"]:::common
    end

    %% Component Categories
    subgraph Input
        TextField["TextField"]:::input
        TextArea["TextArea"]:::input
        ChatInput["ChatInput"]:::input
        Dropdown["Dropdown"]:::input
    end

    subgraph Feedback
        Toast["Toast"]:::feedback
        Spinner["Spinner"]:::feedback
        Progress["Progress"]:::feedback
        EmptyStates["Empty States"]:::feedback
    end

    subgraph Layout
        Header["Header"]:::layout
        BottomSheet["BottomSheet"]:::layout
        Popup["Popup"]:::layout
    end

    subgraph Interactive
        Buttons["Buttons"]:::interactive
        Chips["Chips"]:::interactive
        Badge["Badge"]:::interactive
        Tooltip["Tooltip"]:::interactive
    end

    %% State Management
    subgraph StateManagement
        ButtonState["Button Cubit"]:::state
        TextFieldState["TextField Cubit"]:::state
        ToastState["Toast Bloc"]:::state
    end

    %% Relationships
    Foundation --> Common
    Common --> Input
    Common --> Feedback
    Common --> Layout
    Common --> Interactive

    Buttons --> ButtonState
    TextField --> TextFieldState
    Toast --> ToastState

    %% Click events for component mapping
    click Colors "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/foundation/color.dart"
    click Typography "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/foundation/font.dart"
    click Gradients "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/foundation/gradient.dart"
    click Icons "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/foundation/icon_path.dart"
    click Animation "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/common_widget/animation/pulse_animation.dart"
    click NetworkImage "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/common_widget/wippy_network_image.dart"
    click ButtonGradient "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/common_widget/button_gradient.dart"
    click SharedUtils "https://github.com/nrise/Quantum-Dots/tree/develop/lib/src/common_widget/"
    click TextField "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/input/textfield/wippy_text_field.dart"
    click TextArea "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/input/textarea/wippy_text_area.dart"
    click ChatInput "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/input/chat_input/chat_input.dart"
    click Dropdown "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/input/dropdown/wippy_drop_down.dart"
    click Toast "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/toast/wippy_toast.dart"
    click Spinner "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/spinner/wippy_spinner.dart"
    click Progress "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/progress/wippy_progress_bar.dart"
    click EmptyStates "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/empty_states/wippy_empty_states.dart"
    click Header "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/header/wippy_header.dart"
    click BottomSheet "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/bottom_sheet/composable/wippy_bottom_sheet.dart"
    click Popup "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/popup/wippy_popup.dart"
    click Buttons "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/button/wippy_box_button.dart"
    click Chips "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/chips/chips/wippy_multi_selective_chips.dart"
    click Badge "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/badge/wippy_badge.dart"
    click Tooltip "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/tooltip/tooltip_component.dart"
    click ButtonState "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/button/button_cubit.dart"
    click TextFieldState "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/input/textfield/text_field_cubit.dart"
    click ToastState "https://github.com/nrise/Quantum-Dots/blob/develop/lib/src/toast/bloc/wippy_toast_bloc.dart"
```
