# bfischer1121/extjs2react architecture

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

- Interactive diagram: https://gitdiagram.com/bfischer1121/extjs2react
- Repository: https://github.com/bfischer1121/extjs2react

## Overview

**[Input ExtJS App] → [Config & Scanner] → [AST Parser] → [Transformation Engine] → [Output React App]**
- ↑
- [Framework Rules] ───┤
- [Component Rules] ───┤
- [Hook Generator] ────┘

##### Flow Indicators

Specific data flows:
- File reading flows
- AST transformation paths
- Component conversion routes
- Module dependency resolution paths

##### Important Details to Highlight

a) Transformation Rules:
- ExtJS → React component mappings
- Class structure conversions
- Template/JSX transformations

b) Configuration Points:
- Word list for class naming
- Modernization options
- Blueprint component mappings

##### Manual intervention checkpoints

Key Relationships to Show:

- How the Framework.js orchestrates the overall transformation
- How Component.js and ExtJSClass.js interact for component conversion
- Where Hooks.js integrates for React hook generation
- How the AST is processed and transformed

- Component types (core, utility, configuration)
- Data flow directions
- Manual intervention points
- Configuration injection points

Keep the abstraction level focused on the architectural components while including enough detail to show the transformation pipeline's complexity. This will help developers understand both the high-level flow and the specific transformation points where they might need to intervene or modify the behavior.

Remember to include annotations for the major modernization features listed in the README's progress section, as these represent key transformation capabilities of the system.

## Diagram (Mermaid)

```mermaid
%%{init: {
  'theme': 'base',
  'themeVariables': {
    'primaryColor': '#2b2b2b',
    'primaryTextColor': '#fff',
    'primaryBorderColor': '#7C0000',
    'lineColor': '#F8B229',
    'secondaryColor': '#006100',
    'tertiaryColor': '#0000ff'
  }
}}%%

flowchart TB
    classDef input fill:#2b7ab2,stroke:#333,stroke-width:2px
    classDef core fill:#4caf50,stroke:#333,stroke-width:2px
    classDef config fill:#ff9800,stroke:#333,stroke-width:2px
    classDef utility fill:#9c27b0,stroke:#333,stroke-width:2px
    classDef output fill:#2b7ab2,stroke:#333,stroke-width:2px

    subgraph Input
        ExtJS[ExtJS Application]:::input
        Config["Config Reader"]:::config
        Scanner["Source File Scanner"]:::input
        ClassDetect["Class Detection System"]:::input
    end

    subgraph Core
        AST["AST Transformation Engine"]:::core
        Framework["Framework Orchestrator"]:::core
        Codebase["Codebase Manager"]:::core
        Component["Component Transformer"]:::core
        ExtJSClass["ExtJS Class Handler"]:::core
    end

    subgraph Support
        Hooks["Hook Generation System"]:::utility
        Utils["Utility Functions"]:::utility
        FrameworkConfig["Framework Configuration Data"]:::config
    end

    subgraph Output
        React["React Application"]:::output
    end

    ExtJS --> Scanner
    Config --> Scanner
    Scanner --> ClassDetect
    ClassDetect --> AST
    AST --> Framework
    Framework --> Codebase
    Codebase --> Component
    Component --> ExtJSClass
    ExtJSClass --> Hooks
    Hooks --> React
    Utils --> Framework
    Utils --> Component
    Utils --> ExtJSClass
    FrameworkConfig --> Framework

    click Config "https://github.com/bfischer1121/extjs2react/blob/master/config.json"
    click Scanner "https://github.com/bfischer1121/extjs2react/blob/master/src/SourceFile.js"
    click ClassDetect "https://github.com/bfischer1121/extjs2react/blob/master/src/experimental/ClassProxy.js"
    click AST "https://github.com/bfischer1121/extjs2react/blob/master/src/Ast.js"
    click Framework "https://github.com/bfischer1121/extjs2react/blob/master/src/Framework.js"
    click Codebase "https://github.com/bfischer1121/extjs2react/blob/master/src/Codebase.js"
    click Component "https://github.com/bfischer1121/extjs2react/blob/master/src/Component.js"
    click ExtJSClass "https://github.com/bfischer1121/extjs2react/blob/master/src/ExtJSClass.js"
    click Hooks "https://github.com/bfischer1121/extjs2react/blob/master/src/Hooks.js"
    click Utils "https://github.com/bfischer1121/extjs2react/blob/master/src/Util.js"
    click FrameworkConfig "https://github.com/bfischer1121/extjs2react/blob/master/snapshots/framework.json"

    %% Legend
    subgraph Legend
        L1[Input/Output Components]:::input
        L2[Core Components]:::core
        L3[Configuration]:::config
        L4[Utilities]:::utility
    end
```
