# lorenaman/reogrid architecture

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

- Interactive diagram: https://gitdiagram.com/lorenaman/reogrid
- Repository: https://github.com/lorenaman/reogrid

## Overview

##### Main Components (Top Level)
a) Core Engine (Central component)
b) Platform-specific Implementations (WinForm, WPF, Android, iOS)
c) Editor Interface
d) Testing Framework
e) Demo Applications

##### Core Engine Layer (Detail the central component)
a) Worksheet Management
b) Cell Operations
c) Formula Engine
d) Drawing System
e) Data Format Handlers
f) I/O Operations (Excel, CSV, RGF)

##### Feature Modules (Connected to Core)
- Specialized features as satellite components:
- Charts System
- Print System
- Script Engine
- Drawing Objects
- Auto Fill System
- & Grouping
- Filtering & Sorting

##### Data Flow and Dependencies
- Data flow between components
- Inheritance relationships
- Component dependencies
- Event propagation paths

##### Integration Points
- External integration interfaces:
- Excel Import/Export
- Printing System
- Clipboard Operations
- Custom Cell Types
- Event Handling System

##### Specific Implementation Details
- View System (CellsViewport, DrawingViewport, etc.)
- Controller Layer (ViewportControllers)
- Action Management System
- Resource Management

##### Strategy Pattern for different view controllers

Special Considerations:
##### Relationship between the core engine and the various UI implementations

This structure will provide a clear understanding of how ReoGrid's components interact while maintaining the flexibility to show both high-level architecture and detailed implementations.

## Diagram (Mermaid)

```mermaid
graph TB
    subgraph Core
        CE[Core Engine]:::core
        WM[Worksheet Management]:::core
        CO[Cell Operations]:::core
        FE[Formula Engine]:::core
        DS[Drawing System]:::core
        DFH[Data Format Handlers]:::core
        IO[I/O Operations]:::core
    end

    subgraph Platforms
        WF[WinForm]:::platform
        WPF[WPF]:::platform
        AND[Android]:::platform
        IOS[iOS]:::platform
    end

    subgraph Features
        CS[Charts System]:::feature
        PS[Print System]:::feature
        SE[Script Engine]:::feature
        DO[Drawing Objects]:::feature
        AFS[Auto Fill System]:::feature
        OG[Outline & Grouping]:::feature
        FS[Filtering & Sorting]:::feature
    end

    subgraph Integration
        EI[Excel Import/Export]:::integration
        PR[Printing]:::integration
        CO2[Clipboard Operations]:::integration
        CCT[Custom Cell Types]:::integration
        EHS[Event Handling System]:::integration
    end

    subgraph Implementation
        VS[View System]:::impl
        CL[Controller Layer]:::impl
        AM[Action Management]:::impl
        RM[Resource Management]:::impl
    end

    %% Core Relationships
    CE --> WM
    CE --> CO
    CE --> FE
    CE --> DS
    CE --> DFH
    CE --> IO

    %% Platform Connections
    CE --> WF
    CE --> WPF
    CE --> AND
    CE --> IOS

    %% Feature Connections
    CE --> CS
    CE --> PS
    CE --> SE
    CE --> DO
    CE --> AFS
    CE --> OG
    CE --> FS

    %% Implementation Connections
    CE --> VS
    CE --> CL
    CE --> AM
    CE --> RM

    %% Integration Connections
    IO --> EI
    PS --> PR
    CO --> CO2
    WM --> CCT
    CE --> EHS

    %% Click Events
    click CE "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Core/"
    click WF "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/WinForm/"
    click WPF "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/WPF/"
    click AND "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Android/"
    click IOS "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/iOS/"
    click CS "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Chart/"
    click PS "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Print/"
    click SE "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Script/"
    click FE "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Formula/"
    click DS "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Drawing/"
    click AFS "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Core/AutoFillSerial/"
    click FS "https://github.com/lorenaman/ReoGrid/blob/master/ReoGrid/Core/FilterSort.cs"
    click CCT "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/CellTypes/"
    click DFH "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/DataFormat/"
    click IO "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/IO/"
    click VS "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Views/"
    click AM "https://github.com/lorenaman/ReoGrid/tree/master/ReoGrid/Actions/"

    classDef core fill:#2374ab,stroke:#2374ab,color:#fff
    classDef platform fill:#32936f,stroke:#32936f,color:#fff
    classDef feature fill:#f26419,stroke:#f26419,color:#fff
    classDef integration fill:#8338ec,stroke:#8338ec,color:#fff
    classDef impl fill:#ffbd00,stroke:#ffbd00,color:#fff

    %% Legend
    subgraph Legend
        L1[Core Components]:::core
        L2[Platform-specific]:::platform
        L3[Features]:::feature
        L4[Integration Points]:::integration
        L5[Implementation Details]:::impl
    end
```
