# medaminezghal/plasma6-applets-mawaqit-prayer-times architecture

> Architecture diagram of the GitHub repository medaminezghal/plasma6-applets-mawaqit-prayer-times, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-02). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/medaminezghal/plasma6-applets-mawaqit-prayer-times
- Repository: https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times

## Overview

Mawaqit Prayer Times is a KDE Plasma widget that displays mosque-published prayer times and a live countdown. Users configure a mosque by searching or entering its address; the widget fetches and caches its annual calendar, then computes the daily timetable, next prayer, countdown, and Hijri date locally. The graph preserves the documented display, customization, localization, and location-detection branches. The core JavaScript is excerpted; UI and configuration responsibilities and their links are based on the README and file tree, so those edges cite the README.

Main entry points: [`package/contents/ui/configGeneral.qml`](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configGeneral.qml) (General settings), [`package/contents/code/mawaqit.js`](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js) (Prayer calculations), [`package/contents/ui/main.qml`](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/main.qml) (Widget entry), [`package/contents/ui/FullRepresentation.qml`](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/FullRepresentation.qml) (Full timetable)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_views["Widget views"]
  node_main["Widget entry<br/>[main.qml]"]
  node_compact["Compact view"]
  node_full["Full timetable"]
end

subgraph group_logic["Prayer logic"]
  node_core["Prayer calculations<br/>[mawaqit.js]"]
  node_hijri["Hijri calendar<br/>[mawaqit.js]"]
  node_language["Localized labels<br/>[mawaqit.js]"]
end

subgraph group_settings["Settings"]
  node_cache[("Calendar settings<br/>[main.xml]")]
  node_panel["Settings panel<br/>[configPanel.qml]"]
  node_general["General settings<br/>[configGeneral.qml]"]
  node_appearance["Appearance settings"]
  node_font["Font picker"]
  node_config["Configuration UI<br/>[config.qml]"]
end

subgraph group_location["Location lookup"]
  node_ip["IP location services"]
  node_geoclue["GeoClue"]
  node_geocoding["Reverse geocoder"]
end

node_user(("Widget user"))
node_mawaqit["Mawaqit service"]

node_user -->|"opens widget"| node_main
node_main -->|"shows panel"| node_compact
node_main -->|"expands view"| node_full
node_main -->|"computes times"| node_core
node_core -->|"fetches calendar"| node_mawaqit
node_core -->|"caches calendar"| node_cache
node_cache -->|"supplies calendar"| node_core
node_core -->|"uses date math"| node_hijri
node_compact -.->|"formats labels"| node_language
node_full -.->|"formats labels"| node_language
node_full -->|"shows date"| node_hijri
node_user -->|"opens settings"| node_config
node_config -.->|"provides settings"| node_panel
node_panel -.->|"configures mosque"| node_general
node_panel -.->|"configures display"| node_appearance
node_appearance -.->|"opens picker"| node_font
node_general -->|"searches mosques"| node_mawaqit
node_user -->|"requests location"| node_general
node_general -.->|"requests coordinates"| node_geoclue
node_general -->|"looks up IP"| node_ip
node_general -->|"reverse geocodes"| node_geocoding

click node_main "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/main.qml"
click node_compact "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/CompactRepresentation.qml"
click node_full "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/FullRepresentation.qml"
click node_core "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js"
click node_hijri "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js"
click node_language "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js"
click node_cache "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/config/main.xml"
click node_panel "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configPanel.qml"
click node_general "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configGeneral.qml"
click node_appearance "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configAppearance.qml"
click node_font "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/FontPickerSheet.qml"
click node_config "https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/config/config.qml"

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_main,node_compact,node_full,node_user toneBlue
class node_core,node_hijri,node_language toneAmber
class node_cache,node_panel,node_general,node_appearance,node_font,node_config toneMint
class node_ip,node_geoclue,node_geocoding toneRose
class node_mawaqit toneIndigo
```

## Components

### Widget views

- [Widget entry](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/main.qml): `package/contents/ui/main.qml`
- [Compact view](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/CompactRepresentation.qml): `package/contents/ui/CompactRepresentation.qml`
- [Full timetable](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/FullRepresentation.qml): `package/contents/ui/FullRepresentation.qml`

### Prayer logic

- [Prayer calculations](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js): `package/contents/code/mawaqit.js`
- [Hijri calendar](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js): `package/contents/code/mawaqit.js`
- [Localized labels](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/code/mawaqit.js): `package/contents/code/mawaqit.js`

### Settings

- [Calendar settings](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/config/main.xml): `package/contents/config/main.xml`
- [Settings panel](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configPanel.qml): `package/contents/ui/configPanel.qml`
- [General settings](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configGeneral.qml): `package/contents/ui/configGeneral.qml`
- [Appearance settings](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/configAppearance.qml): `package/contents/ui/configAppearance.qml`
- [Font picker](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/ui/FontPickerSheet.qml): `package/contents/ui/FontPickerSheet.qml`
- [Configuration UI](https://github.com/medaminezghal/plasma6-applets-mawaqit-prayer-times/blob/main/package/contents/config/config.qml): `package/contents/config/config.qml`

### Location lookup

- **IP location services**
- **GeoClue**
- **Reverse geocoder**

### Other components

- **Widget user**
- **Mawaqit service**

## Connections

- Widget user → Widget entry: opens widget (evidence: `README.md`)
- Widget entry → Compact view: shows panel (evidence: `README.md`)
- Widget entry → Full timetable: expands view (evidence: `README.md`)
- Widget entry → Prayer calculations: computes times (evidence: `README.md`)
- Prayer calculations → Mawaqit service: fetches calendar (evidence: `README.md`)
- Prayer calculations → Calendar settings: caches calendar (evidence: `README.md`)
- Calendar settings → Prayer calculations: supplies calendar (evidence: `README.md`)
- Prayer calculations → Hijri calendar: uses date math (evidence: `package/contents/code/mawaqit.js`)
- Compact view → Localized labels: formats labels
- Full timetable → Localized labels: formats labels
- Full timetable → Hijri calendar: shows date (evidence: `README.md`)
- Widget user → Configuration UI: opens settings (evidence: `README.md`)
- Configuration UI → Settings panel: provides settings
- Settings panel → General settings: configures mosque
- Settings panel → Appearance settings: configures display
- Appearance settings → Font picker: opens picker
- General settings → Mawaqit service: searches mosques (evidence: `README.md`)
- Widget user → General settings: requests location (evidence: `README.md`)
- General settings → GeoClue: requests coordinates (evidence: `README.md`)
- General settings → IP location services: looks up IP (evidence: `README.md`)
- General settings → Reverse geocoder: reverse geocodes (evidence: `README.md`)
