# tmrbe2006/quran-karim architecture

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

- Interactive diagram: https://gitdiagram.com/tmrbe2006/quran-karim
- Repository: https://github.com/tmrbe2006/quran-karim

## Overview

This is a browser-based Quran and Islamic-practice app. The main workflow is selecting a surah and reciter, loading ayahs (with offline fallback), and listening; the app also supports memorization, bookmarks and favorites, reading statistics, and khatma tracking. Separate areas provide adhkar and reminders, prayer times, and a Qibla compass, alongside settings and offline/PWA features. Several component connections are visible in the source index, but unsampled implementations and external service wiring are not verified, so those relationships are omitted or marked unverified.

Main entry points: [`App.tsx`](https://github.com/tmrbe2006/quran-karim/blob/main/App.tsx) (App Orchestrator), [`components/Sidebar.tsx`](https://github.com/tmrbe2006/quran-karim/blob/main/components/Sidebar.tsx) (Navigation), [`components/StatsViewer.tsx`](https://github.com/tmrbe2006/quran-karim/blob/main/components/StatsViewer.tsx) (Reading Statistics), [`utils/notificationService.ts`](https://github.com/tmrbe2006/quran-karim/blob/main/utils/notificationService.ts) (Adhkar Reminders)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_reading["Quran Reading"]
  node_quran["Quran Viewer<br/>[QuranViewer.tsx]"]
  node_quran_data["Quran Data Access<br/>[quranData.ts]"]
  node_offline_quran["Offline Ayahs<br/>[offlineSurahs.ts]"]
  node_audio_store[("Audio Cache<br/>[audioStorage.ts]")]
  node_reciter_storage["Reciter Storage"]
  node_ayah_day["Ayah of the Day<br/>[AyahOfDayModal.tsx]"]
  node_controls["Reading Controls<br/>[Controls.tsx]"]
end

subgraph group_progress["Study Progress"]
  node_bookmarks["Bookmarks"]
  node_favorites["Favorites"]
  node_stats["Reading Statistics<br/>[StatsViewer.tsx]"]
  node_stats_store[("Statistics Storage<br/>[statsStorage.ts]")]
  node_khatma["Khatma Tracker<br/>[KhatmaTracker.tsx]"]
  node_khatma_store[("Khatma Plan Storage<br/>[khatmaStorage.ts]")]
end

subgraph group_practice["Daily Practice"]
  node_adhkar["Adhkar Viewer<br/>[AdhkarViewer.tsx]"]
  node_adhkar_data["Adhkar Content<br/>[adhkar.ts]"]
  node_notifications["Adhkar Reminders"]
  node_prayer["Prayer Times"]
  node_prayer_store[("Prayer Settings<br/>[prayerStorage.ts]")]
  node_qibla["Qibla Compass<br/>[QiblaCompass.tsx]"]
end

subgraph group_platform["App Platform"]
  node_app["App Orchestrator<br/>[App.tsx]"]
  node_sidebar["Navigation<br/>[Sidebar.tsx]"]
  node_settings["Settings<br/>[SettingsModal.tsx]"]
  node_offline["Connectivity Status"]
  node_install["PWA Install"]
end

node_user(("Reader"))
node_external_notifications["Browser Notifications"]

node_user -->|"uses"| node_app
node_app -->|"renders"| node_quran
node_app -->|"renders"| node_sidebar
node_app -->|"renders"| node_settings
node_app -->|"renders"| node_controls
node_app -->|"renders"| node_adhkar
node_app -->|"renders"| node_qibla
node_app -->|"renders"| node_offline
node_app -->|"renders"| node_install
node_app -->|"renders"| node_bookmarks
node_app -->|"renders"| node_favorites
node_app -->|"renders"| node_ayah_day
node_app -->|"renders"| node_prayer
node_app -->|"loads ayahs"| node_quran_data
node_quran_data -->|"reads fallback"| node_offline_quran
node_app -->|"caches audio"| node_audio_store
node_quran -->|"uses audio cache"| node_audio_store
node_sidebar -->|"renders"| node_reciter_storage
node_reciter_storage -->|"manages cache"| node_audio_store
node_adhkar -->|"reads content"| node_adhkar_data
node_app -->|"checks reminders"| node_notifications
node_settings -->|"configures"| node_notifications
node_notifications -->|"sends alerts"| node_external_notifications
node_prayer -->|"loads settings"| node_prayer_store
node_sidebar -->|"renders"| node_stats
node_sidebar -->|"renders"| node_khatma
node_stats -->|"reads statistics"| node_stats_store
node_stats -->|"reads progress"| node_khatma_store
node_khatma -->|"loads plan"| node_khatma_store

click node_app "https://github.com/tmrbe2006/quran-karim/blob/main/App.tsx"
click node_sidebar "https://github.com/tmrbe2006/quran-karim/blob/main/components/Sidebar.tsx"
click node_settings "https://github.com/tmrbe2006/quran-karim/blob/main/components/SettingsModal.tsx"
click node_offline "https://github.com/tmrbe2006/quran-karim/blob/main/components/OfflineIndicator.tsx"
click node_install "https://github.com/tmrbe2006/quran-karim/blob/main/components/PWAInstallButton.tsx"
click node_quran "https://github.com/tmrbe2006/quran-karim/blob/main/components/QuranViewer.tsx"
click node_quran_data "https://github.com/tmrbe2006/quran-karim/blob/main/utils/quranData.ts"
click node_offline_quran "https://github.com/tmrbe2006/quran-karim/blob/main/data/offlineSurahs.ts"
click node_audio_store "https://github.com/tmrbe2006/quran-karim/blob/main/utils/audioStorage.ts"
click node_reciter_storage "https://github.com/tmrbe2006/quran-karim/blob/main/components/ReciterStorageManager.tsx"
click node_adhkar "https://github.com/tmrbe2006/quran-karim/blob/main/components/AdhkarViewer.tsx"
click node_adhkar_data "https://github.com/tmrbe2006/quran-karim/blob/main/data/adhkar.ts"
click node_notifications "https://github.com/tmrbe2006/quran-karim/blob/main/utils/notificationService.ts"
click node_prayer "https://github.com/tmrbe2006/quran-karim/blob/main/components/PrayerTimesViewer.tsx"
click node_prayer_store "https://github.com/tmrbe2006/quran-karim/blob/main/utils/prayerStorage.ts"
click node_qibla "https://github.com/tmrbe2006/quran-karim/blob/main/components/QiblaCompass.tsx"
click node_bookmarks "https://github.com/tmrbe2006/quran-karim/blob/main/components/BookmarksViewer.tsx"
click node_favorites "https://github.com/tmrbe2006/quran-karim/blob/main/components/FavoritesViewer.tsx"
click node_stats "https://github.com/tmrbe2006/quran-karim/blob/main/components/StatsViewer.tsx"
click node_stats_store "https://github.com/tmrbe2006/quran-karim/blob/main/utils/statsStorage.ts"
click node_khatma "https://github.com/tmrbe2006/quran-karim/blob/main/components/KhatmaTracker.tsx"
click node_khatma_store "https://github.com/tmrbe2006/quran-karim/blob/main/utils/khatmaStorage.ts"
click node_ayah_day "https://github.com/tmrbe2006/quran-karim/blob/main/components/AyahOfDayModal.tsx"
click node_controls "https://github.com/tmrbe2006/quran-karim/blob/main/components/Controls.tsx"

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_quran,node_quran_data,node_offline_quran,node_audio_store,node_reciter_storage,node_ayah_day,node_controls,node_external_notifications toneBlue
class node_bookmarks,node_favorites,node_stats,node_stats_store,node_khatma,node_khatma_store toneAmber
class node_adhkar,node_adhkar_data,node_notifications,node_prayer,node_prayer_store,node_qibla toneMint
class node_app,node_sidebar,node_settings,node_offline,node_install toneRose
class node_user toneIndigo
```

## Components

### Quran Reading

- [Quran Viewer](https://github.com/tmrbe2006/quran-karim/blob/main/components/QuranViewer.tsx): `components/QuranViewer.tsx`
- [Quran Data Access](https://github.com/tmrbe2006/quran-karim/blob/main/utils/quranData.ts): `utils/quranData.ts`
- [Offline Ayahs](https://github.com/tmrbe2006/quran-karim/blob/main/data/offlineSurahs.ts): `data/offlineSurahs.ts`
- [Audio Cache](https://github.com/tmrbe2006/quran-karim/blob/main/utils/audioStorage.ts): `utils/audioStorage.ts`
- [Reciter Storage](https://github.com/tmrbe2006/quran-karim/blob/main/components/ReciterStorageManager.tsx): `components/ReciterStorageManager.tsx`
- [Ayah of the Day](https://github.com/tmrbe2006/quran-karim/blob/main/components/AyahOfDayModal.tsx): `components/AyahOfDayModal.tsx`
- [Reading Controls](https://github.com/tmrbe2006/quran-karim/blob/main/components/Controls.tsx): `components/Controls.tsx`

### Study Progress

- [Bookmarks](https://github.com/tmrbe2006/quran-karim/blob/main/components/BookmarksViewer.tsx): `components/BookmarksViewer.tsx`
- [Favorites](https://github.com/tmrbe2006/quran-karim/blob/main/components/FavoritesViewer.tsx): `components/FavoritesViewer.tsx`
- [Reading Statistics](https://github.com/tmrbe2006/quran-karim/blob/main/components/StatsViewer.tsx): `components/StatsViewer.tsx`
- [Statistics Storage](https://github.com/tmrbe2006/quran-karim/blob/main/utils/statsStorage.ts): `utils/statsStorage.ts`
- [Khatma Tracker](https://github.com/tmrbe2006/quran-karim/blob/main/components/KhatmaTracker.tsx): `components/KhatmaTracker.tsx`
- [Khatma Plan Storage](https://github.com/tmrbe2006/quran-karim/blob/main/utils/khatmaStorage.ts): `utils/khatmaStorage.ts`

### Daily Practice

- [Adhkar Viewer](https://github.com/tmrbe2006/quran-karim/blob/main/components/AdhkarViewer.tsx): `components/AdhkarViewer.tsx`
- [Adhkar Content](https://github.com/tmrbe2006/quran-karim/blob/main/data/adhkar.ts): `data/adhkar.ts`
- [Adhkar Reminders](https://github.com/tmrbe2006/quran-karim/blob/main/utils/notificationService.ts): `utils/notificationService.ts`
- [Prayer Times](https://github.com/tmrbe2006/quran-karim/blob/main/components/PrayerTimesViewer.tsx): `components/PrayerTimesViewer.tsx`
- [Prayer Settings](https://github.com/tmrbe2006/quran-karim/blob/main/utils/prayerStorage.ts): `utils/prayerStorage.ts`
- [Qibla Compass](https://github.com/tmrbe2006/quran-karim/blob/main/components/QiblaCompass.tsx): `components/QiblaCompass.tsx`

### App Platform

- [App Orchestrator](https://github.com/tmrbe2006/quran-karim/blob/main/App.tsx): `App.tsx`
- [Navigation](https://github.com/tmrbe2006/quran-karim/blob/main/components/Sidebar.tsx): `components/Sidebar.tsx`
- [Settings](https://github.com/tmrbe2006/quran-karim/blob/main/components/SettingsModal.tsx): `components/SettingsModal.tsx`
- [Connectivity Status](https://github.com/tmrbe2006/quran-karim/blob/main/components/OfflineIndicator.tsx): `components/OfflineIndicator.tsx`
- [PWA Install](https://github.com/tmrbe2006/quran-karim/blob/main/components/PWAInstallButton.tsx): `components/PWAInstallButton.tsx`

### Other components

- **Reader**
- **Browser Notifications**

## Connections

- Reader → App Orchestrator: uses
- App Orchestrator → Quran Viewer: renders (evidence: `App.tsx`)
- App Orchestrator → Navigation: renders (evidence: `App.tsx`)
- App Orchestrator → Settings: renders (evidence: `App.tsx`)
- App Orchestrator → Reading Controls: renders (evidence: `App.tsx`)
- App Orchestrator → Adhkar Viewer: renders (evidence: `App.tsx`)
- App Orchestrator → Qibla Compass: renders (evidence: `App.tsx`)
- App Orchestrator → Connectivity Status: renders (evidence: `App.tsx`)
- App Orchestrator → PWA Install: renders (evidence: `App.tsx`)
- App Orchestrator → Bookmarks: renders (evidence: `App.tsx`)
- App Orchestrator → Favorites: renders (evidence: `App.tsx`)
- App Orchestrator → Ayah of the Day: renders (evidence: `App.tsx`)
- App Orchestrator → Prayer Times: renders (evidence: `App.tsx`)
- App Orchestrator → Quran Data Access: loads ayahs (evidence: `App.tsx`)
- Quran Data Access → Offline Ayahs: reads fallback (evidence: `utils/quranData.ts`)
- App Orchestrator → Audio Cache: caches audio (evidence: `App.tsx`)
- Quran Viewer → Audio Cache: uses audio cache (evidence: `components/QuranViewer.tsx`)
- Navigation → Reciter Storage: renders (evidence: `components/Sidebar.tsx`)
- Reciter Storage → Audio Cache: manages cache (evidence: `components/ReciterStorageManager.tsx`)
- Adhkar Viewer → Adhkar Content: reads content (evidence: `components/AdhkarViewer.tsx`)
- App Orchestrator → Adhkar Reminders: checks reminders (evidence: `App.tsx`)
- Settings → Adhkar Reminders: configures (evidence: `components/SettingsModal.tsx`)
- Adhkar Reminders → Browser Notifications: sends alerts (evidence: `utils/notificationService.ts`)
- Prayer Times → Prayer Settings: loads settings (evidence: `components/PrayerTimesViewer.tsx`)
- Navigation → Reading Statistics: renders (evidence: `components/Sidebar.tsx`)
- Navigation → Khatma Tracker: renders (evidence: `components/Sidebar.tsx`)
- Reading Statistics → Statistics Storage: reads statistics (evidence: `components/StatsViewer.tsx`)
- Reading Statistics → Khatma Plan Storage: reads progress (evidence: `components/StatsViewer.tsx`)
- Khatma Tracker → Khatma Plan Storage: loads plan (evidence: `components/KhatmaTracker.tsx`)
