# ignatandrei/netcoreblockly architecture

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

- Interactive diagram: https://gitdiagram.com/ignatandrei/netcoreblockly
- Repository: https://github.com/ignatandrei/netcoreblockly

## Overview

##### Main Components

The system architecture should include these key components:

a. Core Components:
- NetCore2Blockly Library (Main Engine)
- Swagger/OpenAPI Integration
- Blockly UI Generator
- JavaScript Generation Layer
- API Endpoint Handlers

b. Extension Components:
- Authentication Handlers
- Storage Providers (SQLite)
- GraphQL Support
- OData Support

- Client Layer                                           |

- Blockly UI      |  |  Block Editor     |  |  Code Workspace  |  |  Output Display | |

- ↕

- Integration Layer                                          |

- Swagger/OpenAPI |  |  GraphQL Handler  |  |  OData Handler   |                     |

- ↕

- Core Processing Layer                                      |

- Block Generator  |  | JavaScript Gen    |  | Action Registry  |  | Type Converter  | |

- ↕

- Host Application Layer                                     |

- API Controllers  |  |  Authentication   |  |  Storage (DB)   |                      |

##### Data Flow Indicators

- API request/response flow
- Block generation process
- Code generation flow
- Storage operations

##### Key Integration Points

Highlight:
- Swagger/OpenAPI integration
- Authentication middleware
- Storage providers
- Custom block extensions

##### Component Details

For each major component, include:
- Component name
- Primary responsibility
- Key dependencies
- Integration points

##### Notes

Annotations for:
- Authentication flows
- Extension points
- Configuration requirements
- Deployment considerations

Remember to include version compatibility information and highlight the different supported .NET Core versions (3.1, 5, and 6) as noted in the README.

## Diagram (Mermaid)

```mermaid
flowchart TB
    subgraph CL[Client Layer]
        BUI[Blockly UI]:::client
        BE[Block Editor]:::client
        CW[Code Workspace]:::client
        OD[Output Display]:::client
    end

    subgraph IL[Integration Layer]
        SO[Swagger/OpenAPI]:::integration
        GH[GraphQL Handler]:::integration
        OH[OData Handler]:::integration
    end

    subgraph CPL[Core Processing Layer]
        BG[Block Generator]:::core
        JG[JavaScript Generation]:::core
        AR[Action Registry]:::core
        TC[Type Converter]:::core
    end

    subgraph HAL[Host Application Layer]
        AC[API Controllers]:::host
        AH[Authentication]:::host
        DB[(Storage DB)]:::storage
    end

    %% Connections
    CL --> IL
    IL --> CPL
    CPL --> HAL

    %% Detailed connections
    BUI --> BE
    BE --> CW
    CW --> OD
    
    SO --> BG
    GH --> BG
    OH --> BG
    
    BG --> JG
    JG --> AR
    AR --> TC
    
    TC --> AC
    AC --> AH
    AC --> DB

    %% Click events
    click SO "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2Blockly/Swagger/"
    click GH "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2Blockly/GraphQL/"
    click OH "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2Blockly/OData/"
    click BG "https://github.com/ignatandrei/netcoreblockly/blob/master/src/NetCore2Blockly/NetCore2Blockly/BlocklyFileGenerator.cs"
    click JG "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2Blockly/JavascriptGeneration/"
    click BUI "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2Blockly/blocklyFiles/"
    click AH "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/TestBlocklyHtml/wwwroot/blockly/auth0/"
    click DB "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2BlocklyStorage.Sqlite/"
    click AC "https://github.com/ignatandrei/netcoreblockly/tree/master/src/NetCore2Blockly/NetCore2Blockly/ExtensionMethods/"

    %% Styles
    classDef client fill:#B3E5FC,stroke:#0288D1
    classDef integration fill:#C8E6C9,stroke:#388E3C
    classDef core fill:#BBDEFB,stroke:#1976D2
    classDef host fill:#FFE0B2,stroke:#F57C00
    classDef storage fill:#D1C4E9,stroke:#512DA8

    %% Legend
    subgraph Legend
        C1[Client Component]:::client
        I1[Integration Component]:::integration
        P1[Core Processing]:::core
        H1[Host Component]:::host
        S1[(Storage)]:::storage
    end
```
