# niazi876/hive-todo-app architecture

> Architecture diagram of the GitHub repository niazi876/hive-todo-app, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-10). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/niazi876/hive-todo-app
- Repository: https://github.com/niazi876/hive-todo-app

## Overview

Hive Todo App is a Flutter task manager whose main workflow is adding, completing, and deleting tasks in a list, with task data persisted locally across restarts. The graph covers the documented Dart application layers and the principal desktop and mobile host entry points visible in the supplied excerpts. Dart implementation details were not sampled, so feature relationships are based on the README; platform-host relationships are limited to those shown in excerpts.

Main entry points: [`lib/pages/home_page.dart`](https://github.com/niazi876/hive-todo-app/blob/main/lib/pages/home_page.dart) (Task screen), [`lib/database/database.dart`](https://github.com/niazi876/hive-todo-app/blob/main/lib/database/database.dart) (Task persistence), [`windows/runner/flutter_window.cpp`](https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/flutter_window.cpp) (Flutter window), [`lib/main.dart`](https://github.com/niazi876/hive-todo-app/blob/main/lib/main.dart) (App startup)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Task app"]
  node_home["Task screen<br/>[home_page.dart]"]
  node_dialog["Task dialog<br/>[dialog_box.dart]"]
  node_taskrow["Task row<br/>[todo_title.dart]"]
  node_button["Action button<br/>[my_button.dart]"]
  node_bootstrap["App startup<br/>[main.dart]"]
end

subgraph group_storage["Local storage"]
  node_database["Task persistence<br/>[database.dart]"]
  node_hive[("Hive box")]
end

subgraph group_hosts["Platform hosts"]
  node_androidhost["Android host<br/>[MainActivity.kt]"]
  node_ioshost["iOS host<br/>[AppDelegate.swift]"]
  node_linuxhost["Linux host<br/>[main.cc]"]
  node_linuxapp["Linux app shell<br/>[my_application.cc]"]
  node_windowentry["Windows entry<br/>[main.cpp]"]
  node_flutterwindow["Flutter window<br/>[flutter_window.cpp]"]
  node_winwindow["Native window<br/>[win32_window.cpp]"]
  node_machost["macOS host"]
end

node_user(("User"))

node_user -->|"uses"| node_home
node_home -->|"opens"| node_dialog
node_home -->|"shows tasks"| node_taskrow
node_home -.->|"uses actions"| node_button
node_home -->|"loads and saves"| node_database
node_bootstrap -->|"opens box"| node_hive
node_database -->|"persists tasks"| node_hive
node_linuxhost -->|"starts"| node_linuxapp
node_windowentry -->|"creates"| node_flutterwindow
node_flutterwindow -->|"extends"| node_winwindow

click node_home "https://github.com/niazi876/hive-todo-app/blob/main/lib/pages/home_page.dart"
click node_dialog "https://github.com/niazi876/hive-todo-app/blob/main/lib/components/dialog_box.dart"
click node_taskrow "https://github.com/niazi876/hive-todo-app/blob/main/lib/components/todo_title.dart"
click node_button "https://github.com/niazi876/hive-todo-app/blob/main/lib/components/my_button.dart"
click node_database "https://github.com/niazi876/hive-todo-app/blob/main/lib/database/database.dart"
click node_bootstrap "https://github.com/niazi876/hive-todo-app/blob/main/lib/main.dart"
click node_androidhost "https://github.com/niazi876/hive-todo-app/blob/main/android/app/src/main/kotlin/com/example/todoapp/MainActivity.kt"
click node_ioshost "https://github.com/niazi876/hive-todo-app/blob/main/ios/Runner/AppDelegate.swift"
click node_linuxhost "https://github.com/niazi876/hive-todo-app/blob/main/linux/runner/main.cc"
click node_linuxapp "https://github.com/niazi876/hive-todo-app/blob/main/linux/runner/my_application.cc"
click node_windowentry "https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/main.cpp"
click node_flutterwindow "https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/flutter_window.cpp"
click node_winwindow "https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/win32_window.cpp"
click node_machost "https://github.com/niazi876/hive-todo-app/blob/main/macos/Runner/MainFlutterWindow.swift"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_home,node_dialog,node_taskrow,node_button,node_bootstrap,node_user toneBlue
class node_database,node_hive toneAmber
class node_androidhost,node_ioshost,node_linuxhost,node_linuxapp,node_windowentry,node_flutterwindow,node_winwindow,node_machost toneMint
```

## Components

### Task app

- [Task screen](https://github.com/niazi876/hive-todo-app/blob/main/lib/pages/home_page.dart): `lib/pages/home_page.dart`
- [Task dialog](https://github.com/niazi876/hive-todo-app/blob/main/lib/components/dialog_box.dart): `lib/components/dialog_box.dart`
- [Task row](https://github.com/niazi876/hive-todo-app/blob/main/lib/components/todo_title.dart): `lib/components/todo_title.dart`
- [Action button](https://github.com/niazi876/hive-todo-app/blob/main/lib/components/my_button.dart): `lib/components/my_button.dart`
- [App startup](https://github.com/niazi876/hive-todo-app/blob/main/lib/main.dart): `lib/main.dart`

### Local storage

- [Task persistence](https://github.com/niazi876/hive-todo-app/blob/main/lib/database/database.dart): `lib/database/database.dart`
- **Hive box**

### Platform hosts

- [Android host](https://github.com/niazi876/hive-todo-app/blob/main/android/app/src/main/kotlin/com/example/todoapp/MainActivity.kt): `android/app/src/main/kotlin/com/example/todoapp/MainActivity.kt`
- [iOS host](https://github.com/niazi876/hive-todo-app/blob/main/ios/Runner/AppDelegate.swift): `ios/Runner/AppDelegate.swift`
- [Linux host](https://github.com/niazi876/hive-todo-app/blob/main/linux/runner/main.cc): `linux/runner/main.cc`
- [Linux app shell](https://github.com/niazi876/hive-todo-app/blob/main/linux/runner/my_application.cc): `linux/runner/my_application.cc`
- [Windows entry](https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter window](https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/flutter_window.cpp): `windows/runner/flutter_window.cpp`
- [Native window](https://github.com/niazi876/hive-todo-app/blob/main/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [macOS host](https://github.com/niazi876/hive-todo-app/blob/main/macos/Runner/MainFlutterWindow.swift): `macos/Runner/MainFlutterWindow.swift`

### Other components

- **User**

## Connections

- User → Task screen: uses (evidence: `README.md`)
- Task screen → Task dialog: opens (evidence: `README.md`)
- Task screen → Task row: shows tasks (evidence: `README.md`)
- Task screen → Action button: uses actions (evidence: `README.md`)
- Task screen → Task persistence: loads and saves (evidence: `README.md`)
- App startup → Hive box: opens box (evidence: `README.md`)
- Task persistence → Hive box: persists tasks (evidence: `README.md`)
- Linux host → Linux app shell: starts (evidence: `linux/runner/main.cc`)
- Windows entry → Flutter window: creates (evidence: `windows/runner/main.cpp`)
- Flutter window → Native window: extends
