# cannic2/daily-dhikr architecture

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

- Interactive diagram: https://gitdiagram.com/cannic2/daily-dhikr
- Repository: https://github.com/cannic2/daily-dhikr

## Overview

Daily Dhikr is an Expo/React Native app for remembrance: users browse categorized adhkar or select a dhikr, tap the tasbeeh counter, and retain counter totals between sessions. Root and tab layouts provide navigation; settings and system-aware light/dark theming are additional app capabilities. The map reflects sampled screen behavior and documented storage/theme capabilities; settings behavior beyond its screen and some navigation wiring was not sampled.

Main entry points: [`app/(tabs)/_layout.tsx`](https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/_layout.tsx) (Tab navigation), [`app/(tabs)/index.tsx`](https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/index.tsx) (Tasbeeh counter), [`hooks/use-theme-color.ts`](https://github.com/cannic2/daily-dhikr/blob/main/hooks/use-theme-color.ts) (Theme color hook), [`app/_layout.tsx`](https://github.com/cannic2/daily-dhikr/blob/main/app/_layout.tsx) (Root layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["App screens"]
  node_counter["Tasbeeh counter<br/>[index.tsx]"]
  node_adhkar["Adhkar browser<br/>[adhkar.tsx]"]
  node_settings["Settings screen<br/>[settings.tsx]"]
end

subgraph group_content["Dhikr content"]
  node_catalog["Dhikr catalog<br/>[dhikr-data.ts]"]
end

subgraph group_presentation["Navigation and presentation"]
  node_root["Root layout<br/>[_layout.tsx]"]
  node_tabs["Tab navigation<br/>[_layout.tsx]"]
  node_colors["Theme tokens<br/>[theme.ts]"]
  node_scheme["System color scheme"]
  node_themehook["Theme color hook<br/>[use-theme-color.ts]"]
  node_themedtext["Themed text<br/>[themed-text.tsx]"]
  node_themedview["Themed view<br/>[themed-view.tsx]"]
  node_parallax["Parallax view"]
  node_collapsible["Collapsible UI<br/>[collapsible.tsx]"]
  node_icons["Icon mapping<br/>[icon-symbol.tsx]"]
  node_haptictab["Haptic tab button<br/>[haptic-tab.tsx]"]
end

subgraph group_platform["Device services"]
  node_storage[("Local persistent storage")]
end

node_user(("App user"))

node_user -->|"opens app"| node_root
node_root -->|"routes to"| node_tabs
node_tabs -.->|"routes to"| node_counter
node_tabs -.->|"routes to"| node_adhkar
node_tabs -.->|"routes to"| node_settings
node_user -->|"taps counter"| node_counter
node_counter -->|"filters dhikr"| node_catalog
node_adhkar -->|"filters entries"| node_catalog
node_counter -->|"reads and writes"| node_storage
node_counter -->|"reads scheme"| node_scheme
node_adhkar -->|"reads scheme"| node_scheme
node_root -->|"reads scheme"| node_scheme
node_root -->|"uses palette"| node_colors
node_scheme -->|"provides scheme"| node_themehook
node_themehook -->|"selects colors"| node_colors
node_themedtext -->|"gets text color"| node_themehook
node_themedview -->|"gets background"| node_themehook
node_parallax -->|"renders content"| node_themedview
node_parallax -->|"gets background"| node_themehook
node_collapsible -->|"renders title"| node_themedtext
node_collapsible -->|"renders panels"| node_themedview
node_collapsible -->|"renders icon"| node_icons
node_tabs -->|"uses tab button"| node_haptictab
node_tabs -->|"uses icons"| node_icons

click node_root "https://github.com/cannic2/daily-dhikr/blob/main/app/_layout.tsx"
click node_tabs "https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/_layout.tsx"
click node_counter "https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/index.tsx"
click node_adhkar "https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/adhkar.tsx"
click node_settings "https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/settings.tsx"
click node_catalog "https://github.com/cannic2/daily-dhikr/blob/main/constants/dhikr-data.ts"
click node_colors "https://github.com/cannic2/daily-dhikr/blob/main/constants/theme.ts"
click node_scheme "https://github.com/cannic2/daily-dhikr/blob/main/hooks/use-color-scheme.ts"
click node_themehook "https://github.com/cannic2/daily-dhikr/blob/main/hooks/use-theme-color.ts"
click node_themedtext "https://github.com/cannic2/daily-dhikr/blob/main/components/themed-text.tsx"
click node_themedview "https://github.com/cannic2/daily-dhikr/blob/main/components/themed-view.tsx"
click node_parallax "https://github.com/cannic2/daily-dhikr/blob/main/components/parallax-scroll-view.tsx"
click node_collapsible "https://github.com/cannic2/daily-dhikr/blob/main/components/ui/collapsible.tsx"
click node_icons "https://github.com/cannic2/daily-dhikr/blob/main/components/ui/icon-symbol.tsx"
click node_haptictab "https://github.com/cannic2/daily-dhikr/blob/main/components/haptic-tab.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_counter,node_adhkar,node_settings,node_user toneBlue
class node_catalog toneAmber
class node_root,node_tabs,node_colors,node_scheme,node_themehook,node_themedtext,node_themedview,node_parallax,node_collapsible,node_icons,node_haptictab toneMint
class node_storage toneRose
```

## Components

### App screens

- [Tasbeeh counter](https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/index.tsx): `app/(tabs)/index.tsx`
- [Adhkar browser](https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/adhkar.tsx): `app/(tabs)/adhkar.tsx`
- [Settings screen](https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/settings.tsx): `app/(tabs)/settings.tsx`

### Dhikr content

- [Dhikr catalog](https://github.com/cannic2/daily-dhikr/blob/main/constants/dhikr-data.ts): `constants/dhikr-data.ts`

### Navigation and presentation

- [Root layout](https://github.com/cannic2/daily-dhikr/blob/main/app/_layout.tsx): `app/_layout.tsx`
- [Tab navigation](https://github.com/cannic2/daily-dhikr/blob/main/app/(tabs)/_layout.tsx): `app/(tabs)/_layout.tsx`
- [Theme tokens](https://github.com/cannic2/daily-dhikr/blob/main/constants/theme.ts): `constants/theme.ts`
- [System color scheme](https://github.com/cannic2/daily-dhikr/blob/main/hooks/use-color-scheme.ts): `hooks/use-color-scheme.ts`
- [Theme color hook](https://github.com/cannic2/daily-dhikr/blob/main/hooks/use-theme-color.ts): `hooks/use-theme-color.ts`
- [Themed text](https://github.com/cannic2/daily-dhikr/blob/main/components/themed-text.tsx): `components/themed-text.tsx`
- [Themed view](https://github.com/cannic2/daily-dhikr/blob/main/components/themed-view.tsx): `components/themed-view.tsx`
- [Parallax view](https://github.com/cannic2/daily-dhikr/blob/main/components/parallax-scroll-view.tsx): `components/parallax-scroll-view.tsx`
- [Collapsible UI](https://github.com/cannic2/daily-dhikr/blob/main/components/ui/collapsible.tsx): `components/ui/collapsible.tsx`
- [Icon mapping](https://github.com/cannic2/daily-dhikr/blob/main/components/ui/icon-symbol.tsx): `components/ui/icon-symbol.tsx`
- [Haptic tab button](https://github.com/cannic2/daily-dhikr/blob/main/components/haptic-tab.tsx): `components/haptic-tab.tsx`

### Device services

- **Local persistent storage**

### Other components

- **App user**

## Connections

- App user → Root layout: opens app (evidence: `README.md`)
- Root layout → Tab navigation: routes to (evidence: `app/_layout.tsx`)
- Tab navigation → Tasbeeh counter: routes to
- Tab navigation → Adhkar browser: routes to
- Tab navigation → Settings screen: routes to
- App user → Tasbeeh counter: taps counter (evidence: `app/(tabs)/index.tsx`)
- Tasbeeh counter → Dhikr catalog: filters dhikr (evidence: `app/(tabs)/index.tsx`)
- Adhkar browser → Dhikr catalog: filters entries (evidence: `app/(tabs)/adhkar.tsx`)
- Tasbeeh counter → Local persistent storage: reads and writes (evidence: `app/(tabs)/index.tsx`)
- Tasbeeh counter → System color scheme: reads scheme (evidence: `app/(tabs)/index.tsx`)
- Adhkar browser → System color scheme: reads scheme (evidence: `app/(tabs)/adhkar.tsx`)
- Root layout → System color scheme: reads scheme (evidence: `app/_layout.tsx`)
- Root layout → Theme tokens: uses palette (evidence: `app/_layout.tsx`)
- System color scheme → Theme color hook: provides scheme (evidence: `hooks/use-theme-color.ts`)
- Theme color hook → Theme tokens: selects colors (evidence: `hooks/use-theme-color.ts`)
- Themed text → Theme color hook: gets text color (evidence: `components/themed-text.tsx`)
- Themed view → Theme color hook: gets background (evidence: `components/themed-view.tsx`)
- Parallax view → Themed view: renders content (evidence: `components/parallax-scroll-view.tsx`)
- Parallax view → Theme color hook: gets background (evidence: `components/parallax-scroll-view.tsx`)
- Collapsible UI → Themed text: renders title (evidence: `components/ui/collapsible.tsx`)
- Collapsible UI → Themed view: renders panels (evidence: `components/ui/collapsible.tsx`)
- Collapsible UI → Icon mapping: renders icon (evidence: `components/ui/collapsible.tsx`)
- Tab navigation → Haptic tab button: uses tab button (evidence: `app/(tabs)/_layout.tsx`)
- Tab navigation → Icon mapping: uses icons (evidence: `app/(tabs)/_layout.tsx`)
