# cinchoo/choeazycopy architecture

> Architecture diagram of the GitHub repository cinchoo/choeazycopy, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2024-12-29). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/cinchoo/choeazycopy
- Repository: https://github.com/cinchoo/choeazycopy

## Overview

##### Main Components

a. User Interface Layer:
- Main Window Component (MainWindow.xaml)
- Custom Controls Layer (Controls folder)
- Property Grid Components
- Theme Management

b. Core Application Layer:
- RoboCopy Integration (ChoRoboCopyManager.cs)
- Task Queue Management (ChoTaskQManager.cs)
- Settings and Configuration
- Backup Management

c. Supporting Components:
- File System Integration
- Command Line Arguments Handler
- User Preferences Storage
- MRU (Most Recently Used) Management

##### Component Relationships

**[User Interface Layer]**
- ↕
**[Core Application Layer]**
- ↕
**[Windows RoboCopy Tool]**
- ↕
**[File System]**

##### Specific Implementation Details

- Rectangles with rounded corners: UI components
- MainWindow
- Property Grid
- Custom Controls

- Hexagons: Core Services
- RoboCopy Manager
- Task Queue Manager
- Backup Manager
- Settings Manager

- User Preferences
- MRU List
- Saved Profiles

##### Data Flow Indicators

- User input flow from UI to core services
- Command generation flow to RoboCopy
- File operation flows
- Configuration data flow
- Task queue processing flow

##### Key Technical Elements to Highlight

- WPF Framework usage (indicated by .xaml files)
- Custom Controls implementation
- Property Grid customization
- Theme management system
- Task queue architecture
- Profile management system

##### Integration Points

Clear connections for:
- Windows RoboCopy integration
- File system interaction
- Configuration storage
- Profile management

##### Architectural Patterns to Emphasize

- MVVM Pattern (implicit in WPF structure)
- Observer Pattern (ChoObservableCollection)
- Command Pattern (for RoboCopy operations)
- Queue Pattern (task management)

##### Security boundaries

Remember to:
- Use consistent styling
- Version information
- Error handling flows
- Async operations clearly
- Critical paths
- Security boundaries
- Logging points

This will create a comprehensive yet understandable representation of the ChoEazyCopy architecture while maintaining the appropriate level of detail for a principal software engineer to understand the system's complete structure and behavior.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph UI["User Interface Layer"]
        MW["Main Window"]
        CC["Custom Controls"]
        PG["Property Grid"]
        SCW["System Colors Window"]
        TM["Theme Manager"]
    end

    subgraph Core["Core Application Layer"]
        RM["RoboCopy Manager"]:::core
        TQM["Task Queue Manager"]:::core
        BM["Backup Manager"]:::core
        SM["Settings Manager"]:::core
        CAH["Command Line Args Handler"]:::core
    end

    subgraph Storage["Storage Layer"]
        UP[(User Preferences)]
        MRU[(MRU List)]
        SP[(Saved Profiles)]
    end

    subgraph System["System Integration"]
        RC[("Windows RoboCopy")]
        FS[("File System")]
    end

    MW --> CC
    MW --> PG
    MW --> SCW
    MW --> TM
    
    CC --> TQM
    PG --> RM
    SCW --> TM
    
    RM --> RC
    RM --> FS
    TQM --> RM
    BM --> FS
    SM --> UP
    CAH --> RM
    
    TQM --> MRU
    SM --> SP

    %% Click events for component mapping
    click MW "https://github.com/Cinchoo/ChoEazyCopy/blob/master/MainWindow.xaml"
    click CC "https://github.com/Cinchoo/ChoEazyCopy/tree/master//Controls"
    click PG "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoPropertyGridFilePicker.xaml"
    click SCW "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoSystemColorsWindow.xaml"
    click TM "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoApplicationThemeManager.cs"
    click RM "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoRoboCopyManager.cs"
    click TQM "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoTaskQManager.cs"
    click BM "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoBackupTaskInfo.cs"
    click SM "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoAppSettings.cs"
    click CAH "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoAppCmdLineArgs.cs"
    click UP "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoUserPreferences.cs"
    click MRU "https://github.com/Cinchoo/ChoEazyCopy/blob/master//ChoMruComboBox.cs"

    %% Styling
    classDef core fill:#f9f,stroke:#333,stroke-width:2px
    classDef ui fill:#bbf,stroke:#333,stroke-width:2px
    classDef storage fill:#dfd,stroke:#333,stroke-width:2px
    classDef system fill:#fdd,stroke:#333,stroke-width:2px

    %% Legend
    subgraph Legend
        UI_COMP["UI Component"]:::ui
        CORE_COMP["Core Service"]:::core
        STORAGE_COMP["Storage"]:::storage
        SYS_COMP["System Integration"]:::system
    end
```
