# jbenjaminhc/flutter_ide_proy architecture

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

- Interactive diagram: https://gitdiagram.com/jbenjaminhc/flutter_ide_proy
- Repository: https://github.com/jbenjaminhc/flutter_ide_proy

## Overview

##### Project type and purpose
- This is primarily a cross‐platform Flutter application (desktop, web, mobile) whose core function is a visual “widget maker” that lets users drag-and-drop UI elements, edit their properties, generate Dart code, and even live-compile/run snippets.
- In addition, there is a separate Dart “live_compilation_server” that compiles Dart widget code on the fly.
- There is also a static documentation site under **docs/**.

##### File structure
- **Platform folders**: `android/`, `ios/`, `linux/`, `macos/`, `windows/`, `web/` each contain the Flutter platform integration layers.
- **Application core** under `lib/`:
– `lib/ui/` (presentation pages, widgets, theme, routes, utilities)
– `lib/interactors/` (orchestration/business-logic)
– `lib/data/` (domain models: widget_elements, properties, code_builder, string_builder)
– `lib/templates/` (built-in UI templates)
- **Code-generation scripts** under `lib/data/widget_elements/scripts/` generate the metadata-based widget wrappers.
- **Tests** under `test/` and `test_driver/`.
- **live_compilation_server/**: standalone Dart server project (bin, lib, windows/linux/macOS integration) that takes generated code, compiles it, and streams back results.
- **docs/**: static site with Gulp build, CSS/JS assets for www.widgetmaker.dev.

##### README for architecture insights
- **Widget-Elements** sub-system is the “meta-model”: a fourth tree over Flutter’s Element tree.
- **Properties** sub-system abstracts widget constructor arguments and provides UI controls for editing.
- **Code generation**: the code_builder and string_builder modules turn the in-memory widget tree into Dart source.
- **Live compile**: the user can see a “Play” mode where code is sent to the live_compilation_server.

##### Crucial details
- Major sub‐systems (UI, interactor, data model, codegen, live server, templates)
- Platform integration as consumers of the Flutter core
- Don’t omit the code-generation scripts or the docs pipeline
- Keep the focus on layering and the client-server interaction for “Play” mode

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% User
    User(["User"]):::external

    %% Flutter App Frontend
    subgraph "Flutter Application (Frontend)"
        direction TB
        UI["UI Layer"]:::frontend
        Interactors["Interactors"]:::frontend
        subgraph "Domain Models & CodeGen"
            direction TB
            WidgetElements["Widget-Elements Model"]:::domain
            Properties["Properties Model"]:::domain
            CodeBuilder["code_builder.dart"]:::codegen
            StringBuilder["string_builder.dart"]:::codegen
        end
        Templates["Templates"]:::frontend
    end

    %% Live Compilation Server
    subgraph "Live Compilation Server (Backend)"
        direction TB
        Server["server.dart"]:::backend
        Converter["widget_converter.dart"]:::backend
        TempWidget["temp_widget.dart"]:::backend
        CLI["main.dart (CLI)"]:::backend
    end

    %% Platform Targets
    subgraph "Platform Targets"
        direction TB
        Android["Android"]:::platform
        iOS["iOS"]:::platform
        Linux["Linux"]:::platform
        macOS["macOS"]:::platform
        Windows["Windows"]:::platform
        Web["Web"]:::platform
    end

    %% Documentation Site
    subgraph "Documentation Site"
        direction TB
        DocsSource["docs/"]:::docs
        Gulp["gulpfile.js"]:::docs
    end

    %% CI/CD & Build Scripts
    subgraph "CI/CD & Build Scripts"
        direction TB
        GHActions["main.yml"]:::cicd
        Scripts["widget_elements scripts"]:::cicd
    end

    %% Connections
    User --> UI
    UI --> Interactors
    Interactors --> WidgetElements
    Interactors --> Properties
    WidgetElements --> CodeBuilder
    Properties --> CodeBuilder
    CodeBuilder --> StringBuilder
    StringBuilder --> Server
    Server --> UI
    Templates --> UI
    UI --> Android
    UI --> iOS
    UI --> Linux
    UI --> macOS
    UI --> Windows
    UI --> Web
    Scripts --> WidgetElements
    GHActions --> DocsSource

    %% Click Events
    click UI "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/lib/ui/"
    click Interactors "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/lib/interactors/"
    click WidgetElements "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/lib/data/widget_elements/"
    click Properties "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/lib/data/properties/"
    click CodeBuilder "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/lib/data/code_builder.dart"
    click StringBuilder "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/lib/data/string_builder.dart"
    click Templates "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/lib/templates/"
    click Server "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/live_compilation_server/lib/server.dart"
    click Converter "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/live_compilation_server/lib/widget_converter.dart"
    click TempWidget "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/live_compilation_server/lib/temp_widget.dart"
    click CLI "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/live_compilation_server/bin/main.dart"
    click Android "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/android/"
    click iOS "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/ios/"
    click Linux "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/linux/"
    click macOS "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/macos/"
    click Windows "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/windows/"
    click Web "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/web/"
    click DocsSource "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/docs/"
    click Gulp "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/docs/gulpfile.js"
    click GHActions "https://github.com/jbenjaminhc/flutter_ide_proy/blob/add-license-1/.github-old/workflows/main.yml"
    click Scripts "https://github.com/jbenjaminhc/flutter_ide_proy/tree/add-license-1/lib/data/widget_elements/scripts/"

    %% Styles
    classDef frontend fill:#cce5ff,stroke:#3399ff
    classDef domain fill:#e6ffe6,stroke:#33cc33
    classDef codegen fill:#e6ffe6,stroke:#33cc33
    classDef backend fill:#ffe6cc,stroke:#ff9933
    classDef platform fill:#f2f2f2,stroke:#bfbfbf
    classDef docs fill:#f2e6ff,stroke:#cc33ff
    classDef cicd fill:#f2f2f2,stroke:#999966
    classDef external fill:#ffffff,stroke:#000000
```
