# youssef-atef-20/quran-kareem architecture

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

- Interactive diagram: https://gitdiagram.com/youssef-atef-20/quran-kareem
- Repository: https://github.com/youssef-atef-20/quran-kareem

## Overview

Quran Kareem is a browser-based Quran reader. Users enter through the home page, browse or search the Surah list, then open a Surah to read verses and play its recitation. The reader also lets users change text size and save a verse position for later. Provider and hook internals expose Quran, settings, and reading-progress state to the interface. The main flow is supported by excerpts and the SOURCE INDEX; settings internals and some documented behavior were not sampled.

Main entry points: [`src/pages/SurahPage.tsx`](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/pages/SurahPage.tsx) (Surah reader), [`src/hooks`](https://github.com/youssef-atef-20/quran-kareem/tree/main/src/hooks) (State hooks), [`src/App.tsx`](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/App.tsx) (Route application), [`src/components/SurahList.tsx`](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/components/SurahList.tsx) (Surah list)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_interface["Reading interface"]
  node_app["Route application<br/>[App.tsx]"]
  node_home["Home page<br/>[Home.tsx]"]
  node_list["Surah list<br/>[SurahList.tsx]"]
  node_surahpage["Surah reader<br/>[SurahPage.tsx]"]
end

subgraph group_content["Quran content"]
  node_quranprovider["Quran provider<br/>[QuranProvider.tsx]"]
  node_qurandata["Quran text<br/>[quran.json]"]
  node_surahnames["Surah names<br/>[surahNames.ts]"]
  node_qurantypes["Quran types<br/>[quran.types.ts]"]
end

subgraph group_state["Application state"]
  node_qurancontext["Quran context<br/>[QuranContext.ts]"]
  node_hooks["State hooks"]
  node_lastprovider["Reading progress provider"]
  node_lastcontext["Progress context"]
  node_settingsprovider["Settings provider"]
  node_settingscontext["Settings context"]
end

subgraph group_integrations["External services"]
  node_localstorage[("Browser storage")]
  node_recitation["Recitation audio"]
  node_analytics["Vercel Analytics"]
end

node_reader(("User"))

node_reader -->|"opens"| node_app
node_app -->|"routes to"| node_home
node_app -->|"routes to"| node_list
node_app -->|"routes to"| node_surahpage
node_app -->|"renders"| node_analytics
node_reader -->|"searches"| node_list
node_list -->|"links to"| node_surahpage
node_home -->|"resumes at"| node_surahpage
node_list -->|"reads Quran state"| node_hooks
node_list -->|"uses names"| node_surahnames
node_surahpage -->|"reads state"| node_hooks
node_surahpage -->|"uses names"| node_surahnames
node_home -->|"reads progress"| node_hooks
node_quranprovider -->|"loads text"| node_qurandata
node_quranprovider -->|"provides data"| node_qurancontext
node_quranprovider -->|"types data"| node_qurantypes
node_hooks -->|"reads context"| node_qurancontext
node_hooks -->|"reads context"| node_lastcontext
node_hooks -->|"reads context"| node_settingscontext
node_lastprovider -->|"provides progress"| node_lastcontext
node_lastprovider -->|"reads and writes"| node_localstorage
node_settingsprovider -->|"provides settings"| node_settingscontext
node_surahpage -->|"plays audio"| node_recitation

click node_app "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/App.tsx"
click node_home "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/pages/Home.tsx"
click node_list "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/components/SurahList.tsx"
click node_surahpage "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/pages/SurahPage.tsx"
click node_quranprovider "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/QuranProvider.tsx"
click node_qurandata "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/data/quran.json"
click node_surahnames "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/data/surahNames.ts"
click node_qurantypes "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/types/quran.types.ts"
click node_qurancontext "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/QuranContext.ts"
click node_hooks "https://github.com/youssef-atef-20/quran-kareem/tree/main/src/hooks"
click node_lastprovider "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/LastReadProvider.tsx"
click node_lastcontext "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/last-read-context.ts"
click node_settingsprovider "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/SettingsProvider.tsx"
click node_settingscontext "https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/SettingsContext.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_app,node_home,node_list,node_surahpage,node_reader toneBlue
class node_quranprovider,node_qurandata,node_surahnames,node_qurantypes toneAmber
class node_qurancontext,node_hooks,node_lastprovider,node_lastcontext,node_settingsprovider,node_settingscontext toneMint
class node_localstorage,node_recitation,node_analytics toneRose
```

## Components

### Reading interface

- [Route application](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/App.tsx): `src/App.tsx`
- [Home page](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/pages/Home.tsx): `src/pages/Home.tsx`
- [Surah list](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/components/SurahList.tsx): `src/components/SurahList.tsx`
- [Surah reader](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/pages/SurahPage.tsx): `src/pages/SurahPage.tsx`

### Quran content

- [Quran provider](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/QuranProvider.tsx): `src/context/QuranProvider.tsx`
- [Quran text](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/data/quran.json): `src/data/quran.json`
- [Surah names](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/data/surahNames.ts): `src/data/surahNames.ts`
- [Quran types](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/types/quran.types.ts): `src/types/quran.types.ts`

### Application state

- [Quran context](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/QuranContext.ts): `src/context/QuranContext.ts`
- [State hooks](https://github.com/youssef-atef-20/quran-kareem/tree/main/src/hooks): `src/hooks`
- [Reading progress provider](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/LastReadProvider.tsx): `src/context/LastReadProvider.tsx`
- [Progress context](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/last-read-context.ts): `src/context/last-read-context.ts`
- [Settings provider](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/SettingsProvider.tsx): `src/context/SettingsProvider.tsx`
- [Settings context](https://github.com/youssef-atef-20/quran-kareem/blob/main/src/context/SettingsContext.tsx): `src/context/SettingsContext.tsx`

### External services

- **Browser storage**
- **Recitation audio**
- **Vercel Analytics**

### Other components

- **User**

## Connections

- User → Route application: opens (evidence: `README.md`)
- Route application → Home page: routes to (evidence: `src/App.tsx`)
- Route application → Surah list: routes to (evidence: `src/App.tsx`)
- Route application → Surah reader: routes to (evidence: `src/App.tsx`)
- Route application → Vercel Analytics: renders (evidence: `src/App.tsx`)
- User → Surah list: searches (evidence: `src/components/SurahList.tsx`)
- Surah list → Surah reader: links to (evidence: `src/components/SurahList.tsx`)
- Home page → Surah reader: resumes at (evidence: `src/pages/Home.tsx`)
- Surah list → State hooks: reads Quran state (evidence: `src/components/SurahList.tsx`)
- Surah list → Surah names: uses names (evidence: `src/components/SurahList.tsx`)
- Surah reader → State hooks: reads state (evidence: `src/pages/SurahPage.tsx`)
- Surah reader → Surah names: uses names (evidence: `src/pages/SurahPage.tsx`)
- Home page → State hooks: reads progress (evidence: `src/pages/Home.tsx`)
- Quran provider → Quran text: loads text (evidence: `src/context/QuranProvider.tsx`)
- Quran provider → Quran context: provides data (evidence: `src/context/QuranProvider.tsx`)
- Quran provider → Quran types: types data (evidence: `src/context/QuranProvider.tsx`)
- State hooks → Quran context: reads context (evidence: `src/hooks/useQuran.ts`)
- State hooks → Progress context: reads context (evidence: `src/hooks/useLastRead.ts`)
- State hooks → Settings context: reads context (evidence: `src/hooks/useSettings.ts`)
- Reading progress provider → Progress context: provides progress (evidence: `src/context/LastReadProvider.tsx`)
- Reading progress provider → Browser storage: reads and writes (evidence: `src/context/LastReadProvider.tsx`)
- Settings provider → Settings context: provides settings (evidence: `src/context/SettingsProvider.tsx`)
- Surah reader → Recitation audio: plays audio (evidence: `src/pages/SurahPage.tsx`)
