# mechano59/pengui-scripter architecture

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

- Interactive diagram: https://gitdiagram.com/mechano59/pengui-scripter
- Repository: https://github.com/mechano59/pengui-scripter

## Overview

##### Main Components Identification

a) Frontend Layer (Flutter UI)
- Material UI components
- Screen layouts
- User input handling

b) Application Logic Layer
- Script generation engine
- Preview system
- File handling system

c) Platform-Specific Layer
- Android implementation
- iOS implementation
- File system access

**┌─────────────────────────────────────────┐**
- Presentation Layer          │
- ┌─────────────┐       ┌─────────────┐ │
- Screens   │       │    UI       │ │
- (lib/      │       │ Components  │ │
- screens/)  │       │             │ │
- ┘       └─────────────┘ │
- ┤
- Business Logic Layer          │
- ┌─────────────┐       ┌─────────────┐ │
- Script    │       │   Export    │ │
- Generator  │       │   Handler   │ │
- ┘       └─────────────┘ │
- ┤
- Platform-Specific Layer         │
- ┌─────────────┐       ┌─────────────┐ │
- Android   │       │    iOS      │ │
- Native    │       │   Native    │ │
- ┘       └─────────────┘ │
- ┘

##### Component Relationships

- Data flow between screens
- Script generation process flow
- File system interactions
- Platform-specific implementations

- User Interface Components
- Script Generation Engine
- File System Integration
- Platform-Specific Implementations

##### Additional Details

Annotations for:
- Flutter/Dart version compatibility
- Key dependencies
- File storage locations
- Platform-specific permissions

## Diagram (Mermaid)

```mermaid
graph TB
    %% Styles and classes
    classDef frontend fill:#3498db,stroke:#2980b9,color:white
    classDef logic fill:#2ecc71,stroke:#27ae60,color:white
    classDef platform fill:#e67e22,stroke:#d35400,color:white
    classDef resource fill:#95a5a6,stroke:#7f8c8d,color:white

    %% Main Application Entry
    MainApp["Main Application Entry"]:::frontend
    click MainApp "https://github.com/mechano59/pengui-scripter/blob/main/lib/main.dart"

    %% Frontend Layer
    subgraph Frontend
        Screens["Frontend Screens"]:::frontend
        click Screens "https://github.com/mechano59/pengui-scripter/tree/main/lib/screens/"
        HomeScreen["Home Screen Interface"]:::frontend
        click HomeScreen "https://github.com/mechano59/pengui-scripter/blob/main/lib/screens/home.dart"
        UIComponents["UI Components"]:::frontend
        MaterialUI["Material UI"]:::frontend
        
        MainApp --> Screens
        Screens --> HomeScreen
        Screens --> UIComponents
        UIComponents --> MaterialUI
    end

    %% Business Logic Layer
    subgraph Logic
        ScriptGen["Script Generator"]:::logic
        ExportHandler["Export Handler"]:::logic
        PreviewSystem["Preview System"]:::logic
        FileHandler["File Handler"]:::logic
        
        ScriptGen --> PreviewSystem
        ScriptGen --> ExportHandler
        ExportHandler --> FileHandler
    end

    %% Platform Layer
    subgraph Platform
        AndroidNative["Android Native"]:::platform
        click AndroidNative "https://github.com/mechano59/pengui-scripter/blob/main/android/app/src/main/kotlin/com/app/penguiscripter/MainActivity.kt"
        AndroidConfig["Android Config"]:::platform
        click AndroidConfig "https://github.com/mechano59/pengui-scripter/blob/main/android/app/src/main/AndroidManifest.xml"
        AndroidPlugins["Android Plugins"]:::platform
        click AndroidPlugins "https://github.com/mechano59/pengui-scripter/blob/main/android/app/src/main/java/io/flutter/plugins/GeneratedPluginRegistrant.java"
        
        iOSNative["iOS Native"]:::platform
        click iOSNative "https://github.com/mechano59/pengui-scripter/blob/main/ios/Runner/AppDelegate.swift"
        iOSConfig["iOS Config"]:::platform
        click iOSConfig "https://github.com/mechano59/pengui-scripter/blob/main/ios/Runner/Info.plist"
        iOSPlugins["iOS Plugins"]:::platform
        click iOSPlugins "https://github.com/mechano59/pengui-scripter/blob/main/ios/Runner/GeneratedPluginRegistrant.m"
    end

    %% Resources
    Assets["Asset Resources"]:::resource
    click Assets "https://github.com/mechano59/pengui-scripter/tree/main/assets/"
    AndroidRes["Android Resources"]:::resource
    click AndroidRes "https://github.com/mechano59/pengui-scripter/tree/main/android/app/src/main/res/"
    iOSRes["iOS Resources"]:::resource
    click iOSRes "https://github.com/mechano59/pengui-scripter/tree/main/ios/Runner/Assets.xcassets/"

    %% Connections between layers
    HomeScreen --> ScriptGen
    FileHandler --> AndroidNative
    FileHandler --> iOSNative
    AndroidNative --> AndroidPlugins
    iOSNative --> iOSPlugins
    AndroidNative --> AndroidRes
    iOSNative --> iOSRes
    AndroidNative --> AndroidConfig
    iOSNative --> iOSConfig

    %% Legend
    subgraph Legend
        Frontend_L["Frontend Components"]:::frontend
        Logic_L["Business Logic"]:::logic
        Platform_L["Platform-Specific"]:::platform
        Resource_L["Resources"]:::resource
    end
```
