Al-Hadith Mobile App
Offline Flutter app for the Hadiths of Ahl al-Bayt on Android and iOS. A ~26 MB SQLite library of 14,475 entries, with search, bookmarks, copy/share, dark and light themes and Arabic typography.
Mobile Developer · 2021 - 2022 · Education / Religion
Tech: Flutter, Dart, GetX, SQLite, Arabic Typography
The problem
Readers needed the hadith library on their phones without relying on a connection. That meant fast search across thousands of entries, bookmarks, and Arabic text rendered properly right to left.
The approach
One Flutter codebase using GetX. The whole library ships inside the app as a prebuilt SQLite database, so reading and search never touch the network.
Outcomes
- Published on Android and iOS from one Flutter codebase
- 14,475 entries available fully offline, with search and bookmarks
- The whole book/chapter/hadith hierarchy in one self-referencing SQLite table (~26 MB)
- Dark and light themes with Arabic fonts and right-to-left layout
What it is
Al-Hadith is a Flutter reference app for Android and iOS covering the Hadiths of Ahl al-Bayt. It bundles a large set of reference books as an offline database, with in-book search, bookmarks, and dark and light reading themes. The audience is multilingual: Arabic source text with translation, including a Russian edition.
Requirements
Readers needed reliable access to a curated hadith library anywhere, including offline, with search that comes back quickly across thousands of entries and reading that handles Arabic typography properly. In practice:
- Fully offline content and search. No connection assumed.
- A hierarchical library to navigate: collections, then books, chapters and hadiths.
- In-book search, bookmarks, and copy/share for passages.
- Dark and light themes with proper Arabic fonts and right-to-left text.
- One codebase for Android and iOS.
How the content is stored
The whole library ships as a single ~26 MB SQLite database. The main Books table holds 14,475 entries as a self-referencing tree. The parent column points each node to its container, and type says whether it is a book, a chapter or a single hadith, so the entire hierarchy lives in one table. A saved flag marks bookmarks, and a small AppData key/value table stores app state.
erDiagram
Books ||--o{ Books : "parent (tree)"
Books {
int id PK
text desc "content / title"
int parent FK "container node"
int type "book | chapter | hadith"
int saved "bookmark flag"
}
AppData {
text Name PK
text Value
}
Architecture
flowchart TB
subgraph App[Flutter App - GetX]
UI[Screens & Widgets<br/>dark / light themes]
CTRL[GetX Controllers]
REPO[Repositories]
end
DB[(Offline SQLite<br/>~26 MB, 14,475 entries)]
UI --> CTRL
CTRL --> REPO
REPO --> DB
The prebuilt SQLite library ships with the app, so reading and search work with no network at all. GetX handles state, navigation and dependency injection, and repositories keep all data access out of the UI.
Reading and navigation
Because the content is a tree, the same screens render every level. Tapping a collection opens its books, then chapters, then the hadith text, all by following the parent/type relationships.
sequenceDiagram
participant U as Reader
participant C as GetX Controller
participant R as Repository
participant DB as SQLite
U->>C: Open collection
C->>R: children(parentId)
R->>DB: SELECT * FROM Books WHERE parent = ?
DB-->>R: Books / chapters
R-->>C: Tree level
C-->>U: List view
U->>C: Open hadith
C-->>U: Full text (RTL, Arabic font)
Features
- Search across the whole library.
- Bookmarks, stored in the
savedflag so they survive restarts. - Copy and share for individual passages.
- Dark and light themes, each with its own full UI kit.
- Custom Arabic typography with right-to-left layout.
- Separate Android and iOS app icons.
Design
The app came with its own design system: dark and light UI kits, a custom logo and icon set, SVG icons (search, bookmark, copy, share, settings, theme toggle, navigation) and bundled Arabic fonts. The result looks and feels native on both platforms.
Result
- Published on Android and iOS from a single Flutter codebase.
- A fully offline library of 14,475 entries with search and bookmarks.
- A single-table content model that keeps the 26 MB corpus quick to query.
- Dark and light reading themes with proper Arabic typography.