# reeyanto/jam-waktu-sholat architecture

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

- Interactive diagram: https://gitdiagram.com/reeyanto/jam-waktu-sholat
- Repository: https://github.com/reeyanto/jam-waktu-sholat

## Overview

JWS is a browser-based prayer-time clock. On page load, the app initializes saved settings, retrieves city and prayer schedule data, renders the mosque/location and daily timings, and starts a live clock with prayer-time beeps. Configuration can be edited through a keyboard-opened modal and saved for a reinitialization. The README documents the API and Clean Architecture layers; relationships below are limited to calls visible in the supplied excerpts or that README.

Main entry points: [`js/app.js`](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/app.js) (App entry), [`js/domain/PrayerRepository.js`](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/domain/PrayerRepository.js) (Prayer repository), [`js/presentation/ModalController.js`](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/ModalController.js) (Configuration modal), [`js/presentation/ClockController.js`](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/ClockController.js) (Clock and alerts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_app["Application"]
  node_app_entry["App entry<br/>[app.js]"]
end

subgraph group_domain["Domain"]
  node_repository["Prayer repository"]
end

subgraph group_data["Data sources"]
  node_api_source["Prayer API source<br/>[ApiDataSource.js]"]
  node_storage_source[("Local storage source")]
end

subgraph group_presentation["Presentation"]
  node_ui["UI controller<br/>[UIController.js]"]
  node_modal["Configuration modal<br/>[ModalController.js]"]
  node_clock["Clock and alerts<br/>[ClockController.js]"]
end

node_user(("Visitor"))
node_myquran{{"myquran API"}}
node_browser(("Browser UI"))

node_user -->|"uses"| node_browser
node_browser -->|"loads"| node_app_entry
node_app_entry -->|"creates and calls"| node_repository
node_app_entry -->|"renders through"| node_ui
node_app_entry -->|"populates"| node_modal
node_app_entry -->|"starts"| node_clock
node_repository -->|"fetches through"| node_api_source
node_repository -->|"reads and writes"| node_storage_source
node_api_source -->|"requests data"| node_myquran
node_ui -->|"reads settings"| node_repository
node_modal -->|"loads and saves"| node_repository
node_clock -->|"reads iqamah"| node_repository
node_ui -->|"updates display"| node_browser
node_modal -->|"handles dialog"| node_browser
node_clock -->|"updates clock and audio"| node_browser
node_modal -->|"reinitializes on save"| node_app_entry
node_clock -->|"reinitializes at midnight"| node_app_entry

click node_app_entry "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/app.js"
click node_repository "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/domain/PrayerRepository.js"
click node_api_source "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/data/ApiDataSource.js"
click node_storage_source "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/data/StorageDataSource.js"
click node_ui "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/UIController.js"
click node_modal "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/ModalController.js"
click node_clock "https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/ClockController.js"

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_entry,node_browser toneBlue
class node_repository toneAmber
class node_api_source,node_storage_source,node_myquran toneMint
class node_ui,node_modal,node_clock toneRose
class node_user toneIndigo
```

## Components

### Application

- [App entry](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/app.js): `js/app.js`

### Domain

- [Prayer repository](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/domain/PrayerRepository.js): `js/domain/PrayerRepository.js`

### Data sources

- [Prayer API source](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/data/ApiDataSource.js): `js/data/ApiDataSource.js`
- [Local storage source](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/data/StorageDataSource.js): `js/data/StorageDataSource.js`

### Presentation

- [UI controller](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/UIController.js): `js/presentation/UIController.js`
- [Configuration modal](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/ModalController.js): `js/presentation/ModalController.js`
- [Clock and alerts](https://github.com/reeyanto/jam-waktu-sholat/blob/master/js/presentation/ClockController.js): `js/presentation/ClockController.js`

### Other components

- **Visitor**
- **myquran API**
- **Browser UI**

## Connections

- Visitor → Browser UI: uses (evidence: `README.md`)
- Browser UI → App entry: loads (evidence: `js/app.js`)
- App entry → Prayer repository: creates and calls (evidence: `js/app.js`)
- App entry → UI controller: renders through (evidence: `js/app.js`)
- App entry → Configuration modal: populates (evidence: `js/app.js`)
- App entry → Clock and alerts: starts (evidence: `js/app.js`)
- Prayer repository → Prayer API source: fetches through (evidence: `js/domain/PrayerRepository.js`)
- Prayer repository → Local storage source: reads and writes (evidence: `js/domain/PrayerRepository.js`)
- Prayer API source → myquran API: requests data (evidence: `js/data/ApiDataSource.js`)
- UI controller → Prayer repository: reads settings (evidence: `js/presentation/UIController.js`)
- Configuration modal → Prayer repository: loads and saves (evidence: `js/presentation/ModalController.js`)
- Clock and alerts → Prayer repository: reads iqamah (evidence: `js/presentation/ClockController.js`)
- UI controller → Browser UI: updates display (evidence: `js/presentation/UIController.js`)
- Configuration modal → Browser UI: handles dialog (evidence: `js/presentation/ModalController.js`)
- Clock and alerts → Browser UI: updates clock and audio (evidence: `js/presentation/ClockController.js`)
- Configuration modal → App entry: reinitializes on save (evidence: `js/app.js`)
- Clock and alerts → App entry: reinitializes at midnight (evidence: `js/app.js`)
