# hazemmahmoudf/taskati architecture

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

- Interactive diagram: https://gitdiagram.com/hazemmahmoudf/taskati
- Repository: https://github.com/hazemmahmoudf/taskati

## Overview

##### Project Type and Purpose
- This is a cross-platform Flutter application named “taskati.”
- It targets mobile (Android, iOS), desktop (Windows, macOS, Linux) and web.
- It provides task-management functionality via screens for splash, home, add-task and profile.
- Persistence is local (see lib/core/services/local).

##### File Structure Analysis
- Top-level platform folders: android, ios, linux, macos, windows, web.
- Flutter host entrypoints in each platform folder launch the Flutter engine.
- lib/
- core: shared services (local storage), UI utilities, theming, navigation helpers
- features: feature folders (splash, home, add_task, profile) each containing screen, model, widget code
- main.dart and taskati_app.dart wire up routing, theming and top-level app scaffold
- test/ contains widget tests.
- pubspec.yaml: dependencies for Flutter, plugins, assets.

##### Key README Insights
- No custom backend or external services—pure Flutter starter app.
- Encourages further Flutter development; no built-in network layer.

a. Main Components
- Platform Shells (Android/iOS/Linux/macOS/Windows/Web)
- Flutter Engine & Embedder
- Dart Application Layers:
– Presentation Layer (features/* screens & widgets)
– Core Layer (services, utils, theming, navigation)
– Data Layer (local storage via tasks_services & user_services)
b. Relationships & Interactions
- Platform Shell → Flutter Engine: initializes the engine.
- Flutter Engine → Dart App: invokes main.dart/taskati_app.dart.
- Presentation Layer → Core Layer: UI screens call core services for navigation, theming, data operations.
- Core Services (tasks_services/user_services) ↔ Local Persistence (e.g. SQLite, file storage)
c. Architectural Patterns/Principles
- Feature-based modularization: each feature folder encapsulates its UI and models.
- Layered architecture: Presentation → Core → Data.
- Unidirectional data flow: user action → UI → service → persistence → back to UI.
d. Relevant Technologies
- Flutter framework & Dart language
- Local storage plugin (e.g., sqflite or hive—see tasks_services.dart)
- Flutter widgets, theming, navigation (Navigator.push via navigator_push.dart)

##### Step-by-Step Guidance for the Engineer
– Presentation (features/*: splash, home, add_task, profile)
– Core (services, navigator, theme, utils)
– Data (local persistence)
3. Inside Presentation, list or iconify each screen widget.
4. Inside Core, list “tasks_services.dart,” “user_services.dart,” “navigator_push.dart,” and theme files.
6. Presentation → Core (method calls), Core → Data (read/write), Data → Core (data returns), Core → Presentation (notification/update).
9. A REST call placeholder if a future network layer is planned.

## Diagram (Mermaid)

```mermaid
flowchart TB
    %% Platform Shells
    subgraph "Platform Shells"
        direction TB
        AndroidShell["Android Shell"]:::platform
        iOSShell["iOS Shell"]:::platform
        LinuxShell["Linux Shell"]:::platform
        macOSShell["macOS Shell"]:::platform
        WindowsShell["Windows Shell"]:::platform
        WebShell["Web Shell"]:::platform
    end

    AndroidShell --> FlutterEngine
    iOSShell   --> FlutterEngine
    LinuxShell --> FlutterEngine
    macOSShell --> FlutterEngine
    WindowsShell --> FlutterEngine
    WebShell   --> FlutterEngine

    click AndroidShell "https://github.com/hazemmahmoudf/taskati/blob/main/android/app/src/main/kotlin/com/example/taskati/MainActivity.kt"
    click iOSShell "https://github.com/hazemmahmoudf/taskati/blob/main/ios/Runner/AppDelegate.swift"
    click LinuxShell "https://github.com/hazemmahmoudf/taskati/blob/main/linux/runner/main.cc"
    click macOSShell "https://github.com/hazemmahmoudf/taskati/blob/main/macos/Runner/AppDelegate.swift"
    click WindowsShell "https://github.com/hazemmahmoudf/taskati/blob/main/windows/runner/main.cpp"
    click WebShell "https://github.com/hazemmahmoudf/taskati/blob/main/web/index.html"

    %% Flutter Engine
    FlutterEngine["Flutter Engine & Embedder"]:::engine

    %% Dart Application Layers
    FlutterEngine --> DartApp

    subgraph "Dart Application"
        direction TB

        %% Presentation Layer
        subgraph "Presentation Layer" 
            direction TB
            SplashScreen["Splash Screen"]:::presentation
            HomeScreen["Home Screen"]:::presentation
            AddTaskScreen["Add Task Screen"]:::presentation
            ProfileScreen["Profile Screen"]:::presentation

            LabelWidget["Label Widget"]:::presentation
            SelectTaskColor["Select Task Color"]:::presentation
            TextFormFieldWidget["TextFormFieldWithTitle"]:::presentation
            AddTaskListView["Add Task List View"]:::presentation
            DateAddTaskRow["Date Add Task Row"]:::presentation
            HomeAppBar["Home App Bar"]:::presentation
            TaskFilterDate["Task Filter Date"]:::presentation
            ButtonWidget["Button Widget"]:::presentation
                   
            TaskModel["Task Model"]:::presentation
            TaskModelGen["Task Model (g)"]:::presentation
            FilterModel["Filter Model"]:::presentation
            UserModel["User Model"]:::presentation
            UserModelGen["User Model (g)"]:::presentation
        end

        %% Core Layer
        subgraph "Core Layer"
            direction TB
            NavigatorPush["navigator_push.dart"]:::core
            TaskService["tasks_services.dart"]:::core
            UserService["user_services.dart"]:::core
            AppColors["app_colors.dart"]:::core
            ConstModel["const_model.dart"]:::core
        end

        %% Data Layer
        subgraph "Data Layer"
            direction TB
            LocalAdapter["Local Persistence Adapter"]:::data
        end

    end

    %% Entry point wiring
    DartApp -->|uses| MainEntry
    MainEntry["main.dart / taskati_app.dart"]:::core
    click MainEntry "https://github.com/hazemmahmoudf/taskati/blob/main/lib/main.dart"
    click MainEntry "https://github.com/hazemmahmoudf/taskati/blob/main/lib/taskati_app.dart"

    %% Data flow arrows
    SplashScreen -->|"getTasks()"| TaskService
    HomeScreen   -->|"getTasks()"| TaskService
    AddTaskScreen -->|"saveTask(task)"| TaskService
    ProfileScreen -->|"getUser()"| UserService

    TaskService -->|"read/write"| LocalAdapter
    UserService -->|"read/write"| LocalAdapter
    LocalAdapter -->|"data"| TaskService
    LocalAdapter -->|"data"| UserService

    TaskService -->|"update()"| SplashScreen
    UserService -->|"update()"| ProfileScreen

    %% Click events for presentation
    click SplashScreen "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/splash/splash_screen.dart"
    click HomeScreen "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/home_screen.dart"
    click AddTaskScreen "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/add_task/add_task_screen.dart"
    click ProfileScreen "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/profile/profile_screen.dart"

    click LabelWidget "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/add_task/widgets/label_widget.dart"
    click SelectTaskColor "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/add_task/widgets/select_task_color.dart"
    click TextFormFieldWidget "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/add_task/widgets/text_form_field_with_title.dart"
    click AddTaskListView "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/widgets/add_task_list_view.dart"
    click DateAddTaskRow "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/widgets/date_add_task_row.dart"
    click HomeAppBar "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/widgets/home_app_bar.dart"
    click TaskFilterDate "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/widgets/task_filter_date.dart"
    click ButtonWidget "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/widgets/button_widget.dart"

    click TaskModel "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/models/task_model.dart"
    click TaskModelGen "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/models/task_model.g.dart"
    click FilterModel "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/home/models/filter_model.dart"
    click UserModel "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/profile/models/user_model.dart"
    click UserModelGen "https://github.com/hazemmahmoudf/taskati/blob/main/lib/features/profile/models/user_model.g.dart"

    %% Click events for core
    click NavigatorPush "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/Extensions/navigator_push.dart"
    click TaskService "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/services/local/tasks_services.dart"
    click UserService "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/services/local/user_services.dart"
    click AppColors "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/theme/app_colors.dart"
    click ConstModel "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/uitls/const_model.dart"

    %% Click for data adapter
    click LocalAdapter "https://github.com/hazemmahmoudf/taskati/blob/main/lib/core/services/local/tasks_services.dart"

    %% Styles
    classDef platform fill:#cccccc,stroke:#333,stroke-width:1px;
    classDef engine fill:#999999,stroke:#333,stroke-width:1px;
    classDef presentation fill:#a6cee3,stroke:#333,stroke-width:1px;
    classDef core fill:#b2df8a,stroke:#333,stroke-width:1px;
    classDef data fill:#fdbf6f,stroke:#333,stroke-width:1px;
```
