# azamfahd/qurankrim20 architecture

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

- Interactive diagram: https://gitdiagram.com/azamfahd/qurankrim20
- Repository: https://github.com/azamfahd/qurankrim20

## Overview

Anis Al-Qulub is an offline-capable Quranic companion delivered as a React PWA and an Android app. In the web app, users enter through the app shell, use Quran reading/search/tafsir and recitation features, and retain data locally with cloud sync when available. The Android app separately routes users among Quran, prayer-times, adhkar, and settings screens. The README documents these capabilities; sampled source confirms only selected wiring, so uncertain UI-to-subsystem links are omitted. External AI and sync relationships are documented at a capability level, not fully verified in the excerpts.

Main entry points: [`android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt) (Android Navigation), [`src/App.tsx`](https://github.com/azamfahd/qurankrim20/blob/main/src/App.tsx) (App Shell), [`src/quran-platform/services/audioTimingService.ts`](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/audioTimingService.ts) (Verse Timings), [`src/index.tsx`](https://github.com/azamfahd/qurankrim20/blob/main/src/index.tsx) (Web Bootstrap)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web App"]
  node_webapp["App Shell<br/>[App.tsx]"]
  node_entry["Web Bootstrap<br/>[index.tsx]"]
end

subgraph group_quran["Quran Platform"]
  node_quranplatform["Quran Experience"]
  node_reader["Reader and Tafsir<br/>[QuranReader.tsx]"]
  node_searchui["Quran Search UI"]
  node_searchservice["Search Logic"]
  node_searchrepo["Search Repository"]
  node_provider["Search Provider"]
  node_qurandata["Quran Data"]
  node_audio["Recitation Audio"]
  node_timings["Verse Timings"]
end

subgraph group_services["App Services"]
  node_localdb[("Local Data<br/>[localDb.ts]")]
  node_sync["Cloud Sync<br/>[syncService.ts]"]
  node_ai["AI Service<br/>[aiService.ts]"]
end

subgraph group_android["Android App"]
  node_nativeapp["Android Navigation<br/>[MainActivity.kt]"]
  node_surahs["Surah List<br/>[SurahListScreen.kt]"]
  node_native_reader["Quran Reader"]
  node_prayers["Prayer Times"]
  node_adhkar["Adhkar<br/>[AdhkarScreen.kt]"]
  node_settings["Settings<br/>[SettingsScreen.kt]"]
  node_prayerrepo["Prayer Data"]
  node_qurandb[("Quran Database<br/>[QuranDatabase.kt]")]
  node_quranrepo["Quran Repository<br/>[QuranRepository.kt]"]
end

node_user(("User"))
node_supabase[("Supabase")]
node_androiduser(("Android User"))

node_user -->|"opens"| node_entry
node_entry -->|"mounts"| node_webapp
node_webapp -->|"uses"| node_localdb
node_webapp -->|"uses"| node_sync
node_sync -.->|"syncs data"| node_supabase
node_searchservice -->|"queries"| node_searchrepo
node_searchrepo -->|"selects provider"| node_provider
node_audio -->|"uses timings"| node_timings
node_timings -->|"loads data"| node_qurandata
node_timings -->|"gets verse data"| node_qurandata
node_androiduser -->|"opens"| node_nativeapp
node_nativeapp -->|"routes to"| node_surahs
node_nativeapp -->|"routes to"| node_native_reader
node_nativeapp -->|"routes to"| node_prayers
node_nativeapp -->|"routes to"| node_adhkar
node_nativeapp -->|"routes to"| node_settings

click node_webapp "https://github.com/azamfahd/qurankrim20/blob/main/src/App.tsx"
click node_entry "https://github.com/azamfahd/qurankrim20/blob/main/src/index.tsx"
click node_localdb "https://github.com/azamfahd/qurankrim20/blob/main/src/db/localDb.ts"
click node_sync "https://github.com/azamfahd/qurankrim20/blob/main/src/services/syncService.ts"
click node_quranplatform "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/QuranPlatformModal.tsx"
click node_reader "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/components/QuranReader.tsx"
click node_searchui "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/components/QuranSearchWidget.tsx"
click node_searchservice "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/service/QuranSearchService.ts"
click node_searchrepo "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/repository/QuranSearchRepository.ts"
click node_provider "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/factory/QuranSearchProviderFactory.ts"
click node_qurandata "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/QuranDataService.ts"
click node_audio "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/audioCacheService.ts"
click node_timings "https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/audioTimingService.ts"
click node_ai "https://github.com/azamfahd/qurankrim20/blob/main/server/aiService.ts"
click node_nativeapp "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt"
click node_surahs "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/SurahListScreen.kt"
click node_native_reader "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/QuranReaderScreen.kt"
click node_prayers "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/PrayerTimesScreen.kt"
click node_adhkar "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/AdhkarScreen.kt"
click node_settings "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/SettingsScreen.kt"
click node_prayerrepo "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/data/repository/PrayerRepository.kt"
click node_qurandb "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/data/local/QuranDatabase.kt"
click node_quranrepo "https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/data/repository/QuranRepository.kt"

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_webapp,node_entry,node_user,node_androiduser toneBlue
class node_quranplatform,node_reader,node_searchui,node_searchservice,node_searchrepo,node_provider,node_qurandata,node_audio,node_timings,node_supabase toneAmber
class node_localdb,node_sync,node_ai toneMint
class node_nativeapp,node_surahs,node_native_reader,node_prayers,node_adhkar,node_settings,node_prayerrepo,node_qurandb,node_quranrepo toneRose
```

## Components

### Web App

- [App Shell](https://github.com/azamfahd/qurankrim20/blob/main/src/App.tsx): `src/App.tsx`
- [Web Bootstrap](https://github.com/azamfahd/qurankrim20/blob/main/src/index.tsx): `src/index.tsx`

### Quran Platform

- [Quran Experience](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/QuranPlatformModal.tsx): `src/quran-platform/QuranPlatformModal.tsx`
- [Reader and Tafsir](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/components/QuranReader.tsx): `src/quran-platform/components/QuranReader.tsx`
- [Quran Search UI](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/components/QuranSearchWidget.tsx): `src/quran-platform/search/components/QuranSearchWidget.tsx`
- [Search Logic](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/service/QuranSearchService.ts): `src/quran-platform/search/service/QuranSearchService.ts`
- [Search Repository](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/repository/QuranSearchRepository.ts): `src/quran-platform/search/repository/QuranSearchRepository.ts`
- [Search Provider](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/search/factory/QuranSearchProviderFactory.ts): `src/quran-platform/search/factory/QuranSearchProviderFactory.ts`
- [Quran Data](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/QuranDataService.ts): `src/quran-platform/services/QuranDataService.ts`
- [Recitation Audio](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/audioCacheService.ts): `src/quran-platform/services/audioCacheService.ts`
- [Verse Timings](https://github.com/azamfahd/qurankrim20/blob/main/src/quran-platform/services/audioTimingService.ts): `src/quran-platform/services/audioTimingService.ts`

### App Services

- [Local Data](https://github.com/azamfahd/qurankrim20/blob/main/src/db/localDb.ts): `src/db/localDb.ts`
- [Cloud Sync](https://github.com/azamfahd/qurankrim20/blob/main/src/services/syncService.ts): `src/services/syncService.ts`
- [AI Service](https://github.com/azamfahd/qurankrim20/blob/main/server/aiService.ts): `server/aiService.ts`

### Android App

- [Android Navigation](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt): `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`
- [Surah List](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/SurahListScreen.kt): `android-native/app/src/main/java/com/anisalqulub/app/ui/screens/SurahListScreen.kt`
- [Quran Reader](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/QuranReaderScreen.kt): `android-native/app/src/main/java/com/anisalqulub/app/ui/screens/QuranReaderScreen.kt`
- [Prayer Times](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/PrayerTimesScreen.kt): `android-native/app/src/main/java/com/anisalqulub/app/ui/screens/PrayerTimesScreen.kt`
- [Adhkar](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/AdhkarScreen.kt): `android-native/app/src/main/java/com/anisalqulub/app/ui/screens/AdhkarScreen.kt`
- [Settings](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/ui/screens/SettingsScreen.kt): `android-native/app/src/main/java/com/anisalqulub/app/ui/screens/SettingsScreen.kt`
- [Prayer Data](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/data/repository/PrayerRepository.kt): `android-native/app/src/main/java/com/anisalqulub/app/data/repository/PrayerRepository.kt`
- [Quran Database](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/data/local/QuranDatabase.kt): `android-native/app/src/main/java/com/anisalqulub/app/data/local/QuranDatabase.kt`
- [Quran Repository](https://github.com/azamfahd/qurankrim20/blob/main/android-native/app/src/main/java/com/anisalqulub/app/data/repository/QuranRepository.kt): `android-native/app/src/main/java/com/anisalqulub/app/data/repository/QuranRepository.kt`

### Other components

- **User**
- **Supabase**
- **Android User**

## Connections

- User → Web Bootstrap: opens (evidence: `src/index.tsx`)
- Web Bootstrap → App Shell: mounts (evidence: `src/index.tsx`)
- App Shell → Local Data: uses (evidence: `src/App.tsx`)
- App Shell → Cloud Sync: uses (evidence: `src/App.tsx`)
- Cloud Sync → Supabase: syncs data (evidence: `README.md`)
- Search Logic → Search Repository: queries (evidence: `src/quran-platform/search/service/QuranSearchService.ts`)
- Search Repository → Search Provider: selects provider (evidence: `src/quran-platform/search/repository/QuranSearchRepository.ts`)
- Recitation Audio → Verse Timings: uses timings (evidence: `src/quran-platform/services/audioCacheService.ts`)
- Verse Timings → Quran Data: loads data (evidence: `src/quran-platform/services/audioTimingService.ts`)
- Verse Timings → Quran Data: gets verse data (evidence: `src/quran-platform/services/audioTimingService.ts`)
- Android User → Android Navigation: opens (evidence: `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`)
- Android Navigation → Surah List: routes to (evidence: `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`)
- Android Navigation → Quran Reader: routes to (evidence: `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`)
- Android Navigation → Prayer Times: routes to (evidence: `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`)
- Android Navigation → Adhkar: routes to (evidence: `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`)
- Android Navigation → Settings: routes to (evidence: `android-native/app/src/main/java/com/anisalqulub/app/MainActivity.kt`)
