# nmg15/loging architecture

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

- Interactive diagram: https://gitdiagram.com/nmg15/loging
- Repository: https://github.com/nmg15/loging

## Overview

##### Main Components
- Flutter Core Application – represented mainly by the “lib” directory. This includes:
- UI Components (located in lib/screens): login_screen.dart, home_screen.dart, admin_screen.dart, map.dart, marker_form_screen.dart, and register_screen.dart.
- Utility/Business Logic (in lib/utils), for example, the “database_helper.dart”, which suggests local data storage or interactions.
- The main entry point (lib/main.dart) that bootstraps the application.

- Platform-Specific Layers – each target platform (Android, iOS, Web, Windows, Linux, macOS):
- Android: Android-specific configuration and code in the android directory (e.g., MainActivity.kt, AndroidManifests, Gradle scripts).
- iOS: iOS specific project files, assets and storyboards in ios/Runner along with configuration files like Info.plist.
- Other platforms: Similar structures exist for Linux, macOS, Windows, and Web, reflecting multi-platform support.

- Dependency and Build Configurations:
- Files like pubspec.yaml, pubspec.lock show Flutter dependencies and asset definitions.
- Build/configuration files in each platform’s directory indicate how the Flutter app integrates with native components.

##### Relationships and Interactions
- The central Flutter Application drives the UI and business logic. This is the heart of the project.
- The Flutter engine (and its code residing in “lib”) communicates with native modules through bridging layers; for instance, the Android MainActivity and iOS AppDelegate.
- Native configuration and resources (e.g., Android manifests and iOS assets/storyboards) support the core Flutter app.
- The “lib/utils/database_helper.dart” might interface with local databases or storage services, so include any data flow from the Flutter UI to local persistence if applicable.

##### Architectural Patterns and Design Principles
- The project follows Flutter’s typical architecture where the majority of business logic and UI are written once (in Dart) and then deployed across multiple platforms.
- Multi-platform support, showing a central Flutter layer interfacing with native wrappers.
- Separation of concerns – business logic in lib/, UI in lib/screens, and platform-specific implementations residing separately.

## Diagram (Mermaid)

```mermaid
flowchart TD
    %% Flutter Core Application Subgraph
    subgraph "Flutter Core Application"
        MainEntry["Main Entry (lib/main.dart)"]:::flutter
        subgraph "UI Components"
            UIScreens["UI Screens (login, home, admin, map, marker form, register)"]:::flutter
        end
        BusinessLogic["Utilities (Database Helper)"]:::flutter
    end

    %% Platform-Specific Layers Subgraph
    subgraph "Platform-Specific Layers"
        Android["Android Platform"]:::native
        iOS["iOS Platform"]:::native
        Web["Web Platform"]:::native
        Windows["Windows Platform"]:::native
        Linux["Linux Platform"]:::native
        macOS["macOS Platform"]:::native
    end

    %% Connections within Flutter Core
    MainEntry -->|"UIFlow"| UIScreens
    UIScreens -->|"DataAccess"| BusinessLogic

    %% Connections from Flutter Core to each Platform Layer (indicating Platform Integration)
    MainEntry -->|"PlatformIntegration"| Android
    MainEntry -->|"PlatformIntegration"| iOS
    MainEntry -->|"PlatformIntegration"| Web
    MainEntry -->|"PlatformIntegration"| Windows
    MainEntry -->|"PlatformIntegration"| Linux
    MainEntry -->|"PlatformIntegration"| macOS

    %% Click Events
    click MainEntry "https://github.com/nmg15/loging/blob/main/lib/main.dart"
    click UIScreens "https://github.com/nmg15/loging/tree/main/lib/screens"
    click BusinessLogic "https://github.com/nmg15/loging/blob/main/lib/utils/database_helper.dart"
    click Android "https://github.com/nmg15/loging/blob/main/android/app/src/main/kotlin/com/example/inicio_registro/MainActivity.kt"
    click iOS "https://github.com/nmg15/loging/tree/main/ios/Runner"
    click Web "https://github.com/nmg15/loging/tree/main/web"
    click Windows "https://github.com/nmg15/loging/tree/main/windows/runner"
    click Linux "https://github.com/nmg15/loging/tree/main/linux/runner"
    click macOS "https://github.com/nmg15/loging/tree/main/macos/Runner"

    %% Styles
    classDef flutter fill:#AED6F1,stroke:#1B4F72,stroke-width:2px;
    classDef native fill:#F9E79F,stroke:#B9770E,stroke-width:2px;
```
