# theakhinabraham/doable-todo-list-app architecture

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

- Interactive diagram: https://gitdiagram.com/theakhinabraham/doable-todo-list-app
- Repository: https://github.com/theakhinabraham/doable-todo-list-app

## Overview

#### Purpose and Runtime
Offline, single-device Flutter todo app for Android and iOS. It manages tasks, schedules reminder notifications, supports repeat rules and filtering, and persists task data locally—no backend or cloud service. Dart/Flutter is the application runtime; native platform hosts are Android and iOS.

#### Application Entry and Composition
`lib/main.dart` is the Flutter entry point and app composition boundary. It initializes the widget application and routes users into the task UI. Native Flutter bootstraps are `android/app/src/main/kotlin/com/example/doable_todo_list_app/MainActivity.kt` and `ios/Runner/AppDelegate.swift`.

#### Presentation Layer
Task workflows are organized as Flutter screens:
- `lib/screens/home_page.dart` presents the primary task list, filtering, completion ordering, and deletion interactions.
- `lib/screens/add_task_page.dart` collects title, description, date/time, repeat, and reminder choices to create tasks.
- `lib/screens/edit_task_page.dart` updates or removes existing tasks.
- `lib/screens/settings_page.dart` owns application-level data-management actions, including clearing stored data.

UI state and user actions cross into the repository rather than directly owning persistence concerns.

#### Task Domain and Repository Boundary
`lib/models/task_entity.dart` is the canonical task record: identity, text, date/time display values, reminder flag, repeat rule, completion state, and timestamps. `lib/repositories/task_repository.dart` is the persistence-facing facade used to isolate presentation from database implementation. This boundary is the intended extension point for alternate stores or future cloud sync without rewriting screens.

#### SQLite Persistence Pipeline
Persistence follows screen → repository → DAO → database:
- `lib/data/task_dao.dart` implements task CRUD and query operations.
- `lib/data/database_service.dart` opens/manages the local SQLite database and schema lifecycle.
- `lib/models/task_entity.dart` serializes between typed task objects and SQLite row data.

The central durable boundary is the on-device SQLite `tasks` table. Stored fields cover task content, scheduling, notification/repeat metadata, completion, and audit timestamps.

#### Scheduling and Notifications
`lib/services/notification_service.dart` encapsulates reminder-notification behavior. Add/edit flows supply task scheduling data; notification scheduling is separate from the database layer, while reminder intent/state is persisted on the task record. Notifications therefore depend on device platform capabilities, whereas task storage remains usable offline regardless of notification delivery.

#### Platform and External Dependencies
Flutter packages declared through `pubspec.yaml` provide SQLite (`sqflite`), preferences (`shared_preferences`), date formatting (`intl`), SVG rendering, and external-link launching. SharedPreferences is a separate local settings store from SQLite. Android build/runtime configuration resides in `android/app/build.gradle`; iOS packaging and app metadata reside in `ios/Runner/Info.plist`. No remote API, authentication provider, or server-side infrastructure is present.

Main entry points: [`lib/main.dart`](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/main.dart) (App entry & composition), [`lib/repositories/task_repository.dart`](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/repositories/task_repository.dart) (Task repository), [`lib/services/notification_service.dart`](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/services/notification_service.dart) (Notification service), [`lib/screens/add_task_page.dart`](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/add_task_page.dart) (Add task)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_flutter["Flutter app"]
  node_main["App entry &amp; composition<br/>Flutter entry point<br/>[main.dart]"]
  node_home["Home task list<br/>Flutter screen<br/>[home_page.dart]"]
  node_add["Add task<br/>Flutter screen<br/>[add_task_page.dart]"]
  node_edit["Edit task<br/>Flutter screen"]
  node_settings["Settings<br/>Flutter screen<br/>[settings_page.dart]"]
  node_task["Task entity<br/>domain model<br/>[task_entity.dart]"]
  node_repository{{"Task repository<br/>persistence facade"}}
  node_notifications["Notification service<br/>device scheduling service"]
end

subgraph group_storage["Local storage"]
  node_dao["Task DAO<br/>data access layer<br/>[task_dao.dart]"]
  node_database["Database service<br/>SQLite lifecycle"]
  node_tasks_table[("SQLite tasks table<br/>durable task store")]
  node_preferences[("SharedPreferences<br/>local settings store<br/>[pubspec.yaml]")]
end

subgraph group_platform["Device platforms"]
  node_android["Android host<br/>native platform host<br/>[MainActivity.kt]"]
  node_ios["iOS host<br/>native platform host<br/>[AppDelegate.swift]"]
end

node_android -->|"boots Flutter app"| node_main
node_ios -->|"boots Flutter app"| node_main
node_main -->|"routes to"| node_home
node_main -->|"routes to"| node_add
node_main -->|"routes to"| node_edit
node_main -->|"routes to"| node_settings
node_home -->|"task operations"| node_repository
node_add -->|"creates task"| node_repository
node_edit -->|"updates or removes task"| node_repository
node_settings -->|"clears task data"| node_repository
node_add -->|"schedules reminder"| node_notifications
node_edit -->|"updates reminder"| node_notifications
node_repository -->|"persists via"| node_dao
node_repository -->|"uses"| node_task
node_dao -->|"uses"| node_database
node_dao -->|"maps rows"| node_task
node_database -->|"manages"| node_tasks_table
node_notifications -.->|"uses notification capabilities"| node_android
node_notifications -.->|"uses notification capabilities"| node_ios

click node_main "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/main.dart"
click node_home "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/home_page.dart"
click node_add "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/add_task_page.dart"
click node_edit "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/edit_task_page.dart"
click node_settings "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/settings_page.dart"
click node_task "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/models/task_entity.dart"
click node_repository "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/repositories/task_repository.dart"
click node_notifications "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/services/notification_service.dart"
click node_dao "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/data/task_dao.dart"
click node_database "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/data/database_service.dart"
click node_preferences "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/pubspec.yaml"
click node_android "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/android/app/src/main/kotlin/com/example/doable_todo_list_app/MainActivity.kt"
click node_ios "https://github.com/theakhinabraham/doable-todo-list-app/blob/main/ios/Runner/AppDelegate.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_main,node_home,node_add,node_edit,node_settings,node_task,node_repository,node_notifications toneBlue
class node_dao,node_database,node_tasks_table,node_preferences toneAmber
class node_android,node_ios toneMint
```

## Components

### Flutter app

- [App entry & composition](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/main.dart): Flutter entry point · `lib/main.dart`
- [Home task list](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/home_page.dart): Flutter screen · Lists, filters, completes, and deletes tasks. · `lib/screens/home_page.dart`
- [Add task](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/add_task_page.dart): Flutter screen · `lib/screens/add_task_page.dart`
- [Edit task](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/edit_task_page.dart): Flutter screen · `lib/screens/edit_task_page.dart`
- [Settings](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/screens/settings_page.dart): Flutter screen · Provides local data-management actions. · `lib/screens/settings_page.dart`
- [Task entity](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/models/task_entity.dart): domain model · Canonical task and SQLite row serialization. · `lib/models/task_entity.dart`
- [Task repository](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/repositories/task_repository.dart): persistence facade · Presentation boundary for task storage. · `lib/repositories/task_repository.dart`
- [Notification service](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/services/notification_service.dart): device scheduling service · Schedules reminders independently of task persistence. · `lib/services/notification_service.dart`

### Local storage

- [Task DAO](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/data/task_dao.dart): data access layer · Implements task CRUD and queries. · `lib/data/task_dao.dart`
- [Database service](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/lib/data/database_service.dart): SQLite lifecycle · Opens and manages database schema. · `lib/data/database_service.dart`
- **SQLite tasks table**: durable task store · Stores task content, scheduling, repeat, completion, and timestamps.
- [SharedPreferences](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/pubspec.yaml): local settings store · Separate local store for preferences. · `pubspec.yaml`

### Device platforms

- [Android host](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/android/app/src/main/kotlin/com/example/doable_todo_list_app/MainActivity.kt): native platform host · `android/app/src/main/kotlin/com/example/doable_todo_list_app/MainActivity.kt`
- [iOS host](https://github.com/theakhinabraham/doable-todo-list-app/blob/main/ios/Runner/AppDelegate.swift): native platform host · `ios/Runner/AppDelegate.swift`

## Connections

- Android host → App entry & composition: boots Flutter app
- iOS host → App entry & composition: boots Flutter app
- App entry & composition → Home task list: routes to
- App entry & composition → Add task: routes to
- App entry & composition → Edit task: routes to
- App entry & composition → Settings: routes to
- Home task list → Task repository: task operations
- Add task → Task repository: creates task
- Edit task → Task repository: updates or removes task
- Settings → Task repository: clears task data
- Add task → Notification service: schedules reminder
- Edit task → Notification service: updates reminder
- Task repository → Task DAO: persists via
- Task repository → Task entity: uses
- Task DAO → Database service: uses
- Task DAO → Task entity: maps rows
- Database service → SQLite tasks table: manages
- Notification service → Android host: uses notification capabilities
- Notification service → iOS host: uses notification capabilities
