# quochuy-112/fluentz architecture

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

- Interactive diagram: https://gitdiagram.com/quochuy-112/fluentz
- Repository: https://github.com/quochuy-112/fluentz

## Overview

##### Main Components
- Flutter/Dart Application Code: Focus on the lib directory (including main.dart and the various index_*.dart files) as the core of the application’s UI and business logic.
- Platform-Specific Wrappers: These are the directories for Android, iOS, Linux, macOS, Windows, and web. They provide the necessary native configurations, manifest files, and bridging code (e.g., MainActivity.kt for Android, AppDelegate.swift for iOS, CMakeLists.txt and main.cc for Linux, etc.).
- Assets & Configuration: Include directories like assets, pubspec.yaml (with pubspec.lock), and various configuration files to represent dependencies and resource management.

##### Relationships and Interactions
- Interaction with Native Modules: Show how the Flutter engine communicates with platform-specific layers. For Android, iOS, and others, indicate that the native wrappers initialize the Flutter engine and handle platform-specific tasks (like handling gestures, permissions, etc.).
- Dependency Management: Highlight how pubspec.yaml and the associated packages feed into the Dart code, ensuring that dependencies are properly linked across platforms.

##### Architectural Patterns and Design Principles
- Multi-Platform Support: Emphasize the separation between shared Dart code (the cross-platform logic) and the native integration layers.
- Integration Points: Note that while the current structure is standard, it provides extensibility for platform-specific features (e.g., using Kotlin on Android or Swift on iOS).

##### Relevant Technologies and Frameworks
- Flutter Framework: Central to the architecture.
- Dart Language: Drives the business logic and UI in the lib folder.
- Platform-Specific Languages: Kotlin for Android, Swift/Objective-C for iOS/macOS, C++/CMake for Linux/Windows, and HTML/CSS/JS for the web.
- Build and Dependency Tools: pubspec (for Dart/Flutter), gradle (for Android), Xcode configurations (for iOS/macOS), and CMake (for Linux and Windows).

## Diagram (Mermaid)

```mermaid
flowchart TD
    subgraph "Platform-Specific Layers"
        A("Android Wrapper"):::native
        B("iOS Wrapper"):::native
        C("Linux Wrapper"):::native
        D("macOS Wrapper"):::native
        E("Windows Wrapper"):::native
        F("Web Starter Files"):::native
    end

    M("Flutter Engine/Dart Runtime"):::engine
    S("Shared Application Code (lib/)"):::dart
    AC("Assets & Configuration"):::config

    A --> M
    B --> M
    C --> M
    D --> M
    E --> M
    F --> M
    M --> S
    AC --> S

    click S "https://github.com/quochuy-112/fluentz/tree/master/lib/"
    click A "https://github.com/quochuy-112/fluentz/blob/master/android/app/src/main/kotlin/com/example/fluentz/MainActivity.kt"
    click B "https://github.com/quochuy-112/fluentz/tree/master/ios/Runner/"
    click C "https://github.com/quochuy-112/fluentz/tree/master/linux/"
    click D "https://github.com/quochuy-112/fluentz/tree/master/macos/"
    click E "https://github.com/quochuy-112/fluentz/tree/master/windows/"
    click F "https://github.com/quochuy-112/fluentz/tree/master/web/"
    click AC "https://github.com/quochuy-112/fluentz/tree/master/assets/"

    classDef engine fill:#ffcc00,stroke:#333,stroke-width:2px;
    classDef dart fill:#ccffcc,stroke:#333,stroke-width:2px;
    classDef native fill:#add8e6,stroke:#333,stroke-width:2px;
    classDef config fill:#f4a460,stroke:#333,stroke-width:2px;
```
