# kusman28/quran-flutter architecture

> Architecture diagram of the GitHub repository kusman28/quran-flutter, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-11-13). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/kusman28/quran-flutter
- Repository: https://github.com/kusman28/quran-flutter

## Overview

Quran Flutter is a cross-platform Quran reader focused on reproducing a consistent Mushaf-style reading experience. The documented user workflow is to open the Quran, view its pages, and navigate between pages with a slider; responsive layouts support phones, tablets, and desktops. The tree shows Quran-page and sura models, shared app configuration, and local ayah-information database code, but their runtime wiring was not sampled, so those relationships are not asserted. The native Linux and Windows startup relationships shown below are supported by source excerpts; other platform and feature details come from the README.

Main entry points: [`windows/runner/main.cpp`](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/main.cpp) (Windows Entry), [`lib/feature/home/ui/page/home_page.dart`](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/ui/page/home_page.dart) (Reader), [`windows/runner/flutter_window.h`](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/flutter_window.h) (Flutter Window Host), [`linux/main.cc`](https://github.com/kusman28/quran-flutter/blob/master/linux/main.cc) (Linux Runner)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reading["Quran Reading"]
  node_reader["Reader<br/>[home_page.dart]"]
  node_home_state["Home State"]
  node_page_navigation["Page Navigation"]
  node_page_view["Quran Page View"]
  node_responsive_layout["Responsive Layout"]
end

subgraph group_shared["Shared App Services"]
  node_app_entry["App Entry<br/>[main.dart]"]
  node_app_shell["App Shell<br/>[app.dart]"]
  node_routes["Routes"]
  node_app_config["App Configuration"]
  node_ayah_service["Ayah Info Service"]
  node_database_service["Database Service"]
  node_database_file["Database Files"]
end

subgraph group_content["Quran Content"]
  node_ayah_database[("Ayah Info Database<br/>[ayahinfo_1280.db]")]
  node_quran_page_model["Page Model<br/>[quran_page.dart]"]
  node_sura_model["Sura Model<br/>[sura.dart]"]
end

subgraph group_hosts["Platform Hosts"]
  node_linux_runner["Linux Runner<br/>[main.cc]"]
  node_linux_config["Linux Window Config"]
  node_linux_plugins["Linux Plugin Registration"]
  node_windows_entry["Windows Entry<br/>[main.cpp]"]
  node_windows_flutter_window["Flutter Window Host<br/>[flutter_window.h]"]
  node_win32_window["Win32 Window<br/>[win32_window.cpp]"]
  node_windows_run_loop["Windows Run Loop<br/>[run_loop.h]"]
  node_windows_config["Windows Window Config"]
  node_windows_plugins["Windows Plugin Registration"]
end

node_user(("Reader"))

node_user -->|"opens Quran"| node_reader
node_user -->|"navigates pages"| node_page_navigation
node_reader -.->|"views pages"| node_page_view
node_page_navigation -.->|"selects page"| node_page_view
node_reader -->|"adapts layout"| node_responsive_layout
node_linux_runner -->|"reads settings"| node_linux_config
node_linux_runner -->|"registers plugins"| node_linux_plugins
node_windows_entry -->|"reads settings"| node_windows_config
node_windows_entry -->|"creates host"| node_windows_flutter_window
node_windows_entry -->|"runs loop"| node_windows_run_loop
node_windows_flutter_window -->|"extends window"| node_win32_window
node_windows_flutter_window -->|"uses loop"| node_windows_run_loop

click node_reader "https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/ui/page/home_page.dart"
click node_home_state "https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/bloc/home_page/home_page_bloc.dart"
click node_page_navigation "https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/bloc/navigator/navigator_view_bloc.dart"
click node_page_view "https://github.com/kusman28/quran-flutter/blob/master/lib/feature/quran_page/widget/quran_page_widget.dart"
click node_responsive_layout "https://github.com/kusman28/quran-flutter/blob/master/lib/common/util/flutter_device_type.dart"
click node_app_entry "https://github.com/kusman28/quran-flutter/blob/master/lib/main.dart"
click node_app_shell "https://github.com/kusman28/quran-flutter/blob/master/lib/app/app.dart"
click node_routes "https://github.com/kusman28/quran-flutter/blob/master/lib/common/routes/route_generator.dart"
click node_app_config "https://github.com/kusman28/quran-flutter/blob/master/lib/common/bloc/appconfig/appconfig_bloc.dart"
click node_ayah_service "https://github.com/kusman28/quran-flutter/blob/master/lib/common/database/ayah_info_service.dart"
click node_database_service "https://github.com/kusman28/quran-flutter/blob/master/lib/common/database/database_service.dart"
click node_database_file "https://github.com/kusman28/quran-flutter/blob/master/lib/common/database/database_file_service.dart"
click node_ayah_database "https://github.com/kusman28/quran-flutter/blob/master/assets/quran-data/db/ayahinfo_1280.db"
click node_quran_page_model "https://github.com/kusman28/quran-flutter/blob/master/lib/feature/quran_page/model/quran_page.dart"
click node_sura_model "https://github.com/kusman28/quran-flutter/blob/master/lib/feature/sura/model/sura.dart"
click node_linux_runner "https://github.com/kusman28/quran-flutter/blob/master/linux/main.cc"
click node_linux_config "https://github.com/kusman28/quran-flutter/blob/master/linux/window_configuration.h"
click node_linux_plugins "https://github.com/kusman28/quran-flutter/blob/master/linux/flutter/generated_plugin_registrant.h"
click node_windows_entry "https://github.com/kusman28/quran-flutter/blob/master/windows/runner/main.cpp"
click node_windows_flutter_window "https://github.com/kusman28/quran-flutter/blob/master/windows/runner/flutter_window.h"
click node_win32_window "https://github.com/kusman28/quran-flutter/blob/master/windows/runner/win32_window.cpp"
click node_windows_run_loop "https://github.com/kusman28/quran-flutter/blob/master/windows/runner/run_loop.h"
click node_windows_config "https://github.com/kusman28/quran-flutter/blob/master/windows/runner/window_configuration.h"
click node_windows_plugins "https://github.com/kusman28/quran-flutter/blob/master/windows/flutter/generated_plugin_registrant.h"

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_reader,node_home_state,node_page_navigation,node_page_view,node_responsive_layout toneBlue
class node_app_entry,node_app_shell,node_routes,node_app_config,node_ayah_service,node_database_service,node_database_file toneAmber
class node_ayah_database,node_quran_page_model,node_sura_model toneMint
class node_linux_runner,node_linux_config,node_linux_plugins,node_windows_entry,node_windows_flutter_window,node_win32_window,node_windows_run_loop,node_windows_config,node_windows_plugins toneRose
class node_user toneIndigo
```

## Components

### Quran Reading

- [Reader](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/ui/page/home_page.dart): `lib/feature/home/ui/page/home_page.dart`
- [Home State](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/bloc/home_page/home_page_bloc.dart): `lib/feature/home/bloc/home_page/home_page_bloc.dart`
- [Page Navigation](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/home/bloc/navigator/navigator_view_bloc.dart): `lib/feature/home/bloc/navigator/navigator_view_bloc.dart`
- [Quran Page View](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/quran_page/widget/quran_page_widget.dart): `lib/feature/quran_page/widget/quran_page_widget.dart`
- [Responsive Layout](https://github.com/kusman28/quran-flutter/blob/master/lib/common/util/flutter_device_type.dart): `lib/common/util/flutter_device_type.dart`

### Shared App Services

- [App Entry](https://github.com/kusman28/quran-flutter/blob/master/lib/main.dart): `lib/main.dart`
- [App Shell](https://github.com/kusman28/quran-flutter/blob/master/lib/app/app.dart): `lib/app/app.dart`
- [Routes](https://github.com/kusman28/quran-flutter/blob/master/lib/common/routes/route_generator.dart): `lib/common/routes/route_generator.dart`
- [App Configuration](https://github.com/kusman28/quran-flutter/blob/master/lib/common/bloc/appconfig/appconfig_bloc.dart): `lib/common/bloc/appconfig/appconfig_bloc.dart`
- [Ayah Info Service](https://github.com/kusman28/quran-flutter/blob/master/lib/common/database/ayah_info_service.dart): `lib/common/database/ayah_info_service.dart`
- [Database Service](https://github.com/kusman28/quran-flutter/blob/master/lib/common/database/database_service.dart): `lib/common/database/database_service.dart`
- [Database Files](https://github.com/kusman28/quran-flutter/blob/master/lib/common/database/database_file_service.dart): `lib/common/database/database_file_service.dart`

### Quran Content

- [Ayah Info Database](https://github.com/kusman28/quran-flutter/blob/master/assets/quran-data/db/ayahinfo_1280.db): `assets/quran-data/db/ayahinfo_1280.db`
- [Page Model](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/quran_page/model/quran_page.dart): `lib/feature/quran_page/model/quran_page.dart`
- [Sura Model](https://github.com/kusman28/quran-flutter/blob/master/lib/feature/sura/model/sura.dart): `lib/feature/sura/model/sura.dart`

### Platform Hosts

- [Linux Runner](https://github.com/kusman28/quran-flutter/blob/master/linux/main.cc): `linux/main.cc`
- [Linux Window Config](https://github.com/kusman28/quran-flutter/blob/master/linux/window_configuration.h): `linux/window_configuration.h`
- [Linux Plugin Registration](https://github.com/kusman28/quran-flutter/blob/master/linux/flutter/generated_plugin_registrant.h): `linux/flutter/generated_plugin_registrant.h`
- [Windows Entry](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/main.cpp): `windows/runner/main.cpp`
- [Flutter Window Host](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/flutter_window.h): `windows/runner/flutter_window.h`
- [Win32 Window](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/win32_window.cpp): `windows/runner/win32_window.cpp`
- [Windows Run Loop](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/run_loop.h): `windows/runner/run_loop.h`
- [Windows Window Config](https://github.com/kusman28/quran-flutter/blob/master/windows/runner/window_configuration.h): `windows/runner/window_configuration.h`
- [Windows Plugin Registration](https://github.com/kusman28/quran-flutter/blob/master/windows/flutter/generated_plugin_registrant.h): `windows/flutter/generated_plugin_registrant.h`

### Other components

- **Reader**

## Connections

- Reader → Reader: opens Quran (evidence: `README.md`)
- Reader → Page Navigation: navigates pages (evidence: `README.md`)
- Reader → Quran Page View: views pages
- Page Navigation → Quran Page View: selects page
- Reader → Responsive Layout: adapts layout (evidence: `README.md`)
- Linux Runner → Linux Window Config: reads settings (evidence: `linux/main.cc`)
- Linux Runner → Linux Plugin Registration: registers plugins (evidence: `linux/main.cc`)
- Windows Entry → Windows Window Config: reads settings (evidence: `windows/runner/main.cpp`)
- Windows Entry → Flutter Window Host: creates host (evidence: `windows/runner/main.cpp`)
- Windows Entry → Windows Run Loop: runs loop (evidence: `windows/runner/main.cpp`)
- Flutter Window Host → Win32 Window: extends window (evidence: `windows/runner/flutter_window.h`)
- Flutter Window Host → Windows Run Loop: uses loop (evidence: `windows/runner/flutter_window.h`)
