# lamlieabdullah/masjid architecture

> Architecture diagram of the GitHub repository lamlieabdullah/masjid, 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/lamlieabdullah/masjid
- Repository: https://github.com/lamlieabdullah/masjid

## Overview

Masjid is a mosque information display with an administrative content and settings interface. The viewer enters at index.php, which redirects to player.php; the player templates render mosque details and prayer-time information, with script.php providing timing and prayer-transition behavior in the sampled code. Administrators manage slides, text, and display settings, while the README also documents fetching JAKIM prayer data. Player selection, several admin actions, and the JAKIM fetch implementation were not fully sampled, so uncertain links are omitted.

Main entry points: [`config/sql.inc.php`](https://github.com/lamlieabdullah/masjid/blob/main/config/sql.inc.php) (MySQL database), [`script.php`](https://github.com/lamlieabdullah/masjid/blob/main/script.php) (Prayer timing), [`player0.php`](https://github.com/lamlieabdullah/masjid/blob/main/player0.php) (Display template 0), [`player1.php`](https://github.com/lamlieabdullah/masjid/blob/main/player1.php) (Display template 1)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_display["Public display"]
  node_entry["Display entry<br/>[index.php]"]
  node_player_router["Player entry<br/>[player.php]"]
  node_template0["Display template 0<br/>[player0.php]"]
  node_template1["Display template 1<br/>[player1.php]"]
  node_template2["Display template 2<br/>[player2.php]"]
  node_template3["Display template 3<br/>[player3.php]"]
  node_template4["Display template 4<br/>[player4.php]"]
  node_template5["Display template 5<br/>[player5.php]"]
end

subgraph group_prayer["Prayer information"]
  node_prayer_calc["Prayer timing<br/>[script.php]"]
  node_prayer_data["Prayer data<br/>[waktuSolat.php]"]
  node_adhan_screen["Prayer announcements<br/>[azan.php]"]
  node_friday_screen["Friday announcement<br/>[azan_jumaat.php]"]
end

subgraph group_admin["Administration"]
  node_admin_home["Display settings<br/>[index.php]"]
  node_slide_admin["Slide management<br/>[slider.php]"]
  node_template_admin["Template management<br/>[add_template.php]"]
  node_text_admin["Text management<br/>[text.php]"]
  node_content_admin["Media and events"]
  node_prayer_update["Prayer update<br/>[kemaskini1-2.php]"]
end

subgraph group_shared["Shared services"]
  node_db[("MySQL database<br/>[sql.inc.php]")]
  node_config["Application configuration<br/>[config.inc.php]"]
  node_resize["Image resizing<br/>[ImageResize.php]"]
end

node_visitor(("Display viewer"))
node_admin_user(("Administrator"))
node_jakim(("JAKIM data source"))

node_visitor -->|"opens display"| node_entry
node_entry -->|"redirects to"| node_player_router
node_template0 -->|"loads script"| node_prayer_calc
node_template1 -->|"loads script"| node_prayer_calc
node_template2 -->|"loads script"| node_prayer_calc
node_template3 -->|"loads script"| node_prayer_calc
node_prayer_calc -->|"requires data"| node_prayer_data
node_prayer_calc -->|"redirects at prayer"| node_adhan_screen
node_admin_user -.->|"configures display"| node_admin_home
node_admin_home -->|"updates settings"| node_db
node_slide_admin -->|"reads slide records"| node_db
node_template_admin -->|"manages templates"| node_db
node_template_admin -.->|"resizes images"| node_resize
node_text_admin -->|"manages text"| node_db
node_content_admin -.->|"stores content"| node_db
node_prayer_update -->|"updates prayer settings"| node_db
node_jakim -.->|"provides prayer data"| node_prayer_update
node_template5 -->|"reads display settings"| node_db
node_template0 -.->|"reads display settings"| node_db
node_template1 -.->|"reads display settings"| node_db
node_template2 -.->|"reads display settings"| node_db
node_template3 -.->|"reads display settings"| node_db
node_template4 -.->|"reads display settings"| node_db

click node_entry "https://github.com/lamlieabdullah/masjid/blob/main/index.php"
click node_player_router "https://github.com/lamlieabdullah/masjid/blob/main/player.php"
click node_template0 "https://github.com/lamlieabdullah/masjid/blob/main/player0.php"
click node_template1 "https://github.com/lamlieabdullah/masjid/blob/main/player1.php"
click node_template2 "https://github.com/lamlieabdullah/masjid/blob/main/player2.php"
click node_template3 "https://github.com/lamlieabdullah/masjid/blob/main/player3.php"
click node_template4 "https://github.com/lamlieabdullah/masjid/blob/main/player4.php"
click node_template5 "https://github.com/lamlieabdullah/masjid/blob/main/player5.php"
click node_prayer_calc "https://github.com/lamlieabdullah/masjid/blob/main/script.php"
click node_prayer_data "https://github.com/lamlieabdullah/masjid/blob/main/waktuSolat.php"
click node_adhan_screen "https://github.com/lamlieabdullah/masjid/blob/main/azan.php"
click node_friday_screen "https://github.com/lamlieabdullah/masjid/blob/main/azan_jumaat.php"
click node_admin_home "https://github.com/lamlieabdullah/masjid/blob/main/admin/index.php"
click node_slide_admin "https://github.com/lamlieabdullah/masjid/blob/main/admin/slider.php"
click node_template_admin "https://github.com/lamlieabdullah/masjid/blob/main/admin/add_template.php"
click node_text_admin "https://github.com/lamlieabdullah/masjid/blob/main/admin/text.php"
click node_content_admin "https://github.com/lamlieabdullah/masjid/tree/main/admin"
click node_prayer_update "https://github.com/lamlieabdullah/masjid/blob/main/kemaskini1-2.php"
click node_db "https://github.com/lamlieabdullah/masjid/blob/main/config/sql.inc.php"
click node_config "https://github.com/lamlieabdullah/masjid/blob/main/config/config.inc.php"
click node_resize "https://github.com/lamlieabdullah/masjid/blob/main/php/php-image-resize/src/ImageResize.php"

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_entry,node_player_router,node_template0,node_template1,node_template2,node_template3,node_template4,node_template5,node_visitor toneBlue
class node_prayer_calc,node_prayer_data,node_adhan_screen,node_friday_screen toneAmber
class node_admin_home,node_slide_admin,node_template_admin,node_text_admin,node_content_admin,node_prayer_update toneMint
class node_db,node_config,node_resize toneRose
class node_admin_user,node_jakim toneIndigo
```

## Components

### Public display

- [Display entry](https://github.com/lamlieabdullah/masjid/blob/main/index.php): `index.php`
- [Player entry](https://github.com/lamlieabdullah/masjid/blob/main/player.php): `player.php`
- [Display template 0](https://github.com/lamlieabdullah/masjid/blob/main/player0.php): `player0.php`
- [Display template 1](https://github.com/lamlieabdullah/masjid/blob/main/player1.php): `player1.php`
- [Display template 2](https://github.com/lamlieabdullah/masjid/blob/main/player2.php): `player2.php`
- [Display template 3](https://github.com/lamlieabdullah/masjid/blob/main/player3.php): `player3.php`
- [Display template 4](https://github.com/lamlieabdullah/masjid/blob/main/player4.php): `player4.php`
- [Display template 5](https://github.com/lamlieabdullah/masjid/blob/main/player5.php): `player5.php`

### Prayer information

- [Prayer timing](https://github.com/lamlieabdullah/masjid/blob/main/script.php): `script.php`
- [Prayer data](https://github.com/lamlieabdullah/masjid/blob/main/waktuSolat.php): `waktuSolat.php`
- [Prayer announcements](https://github.com/lamlieabdullah/masjid/blob/main/azan.php): `azan.php`
- [Friday announcement](https://github.com/lamlieabdullah/masjid/blob/main/azan_jumaat.php): `azan_jumaat.php`

### Administration

- [Display settings](https://github.com/lamlieabdullah/masjid/blob/main/admin/index.php): `admin/index.php`
- [Slide management](https://github.com/lamlieabdullah/masjid/blob/main/admin/slider.php): `admin/slider.php`
- [Template management](https://github.com/lamlieabdullah/masjid/blob/main/admin/add_template.php): `admin/add_template.php`
- [Text management](https://github.com/lamlieabdullah/masjid/blob/main/admin/text.php): `admin/text.php`
- [Media and events](https://github.com/lamlieabdullah/masjid/tree/main/admin): `admin`
- [Prayer update](https://github.com/lamlieabdullah/masjid/blob/main/kemaskini1-2.php): `kemaskini1-2.php`

### Shared services

- [MySQL database](https://github.com/lamlieabdullah/masjid/blob/main/config/sql.inc.php): `config/sql.inc.php`
- [Application configuration](https://github.com/lamlieabdullah/masjid/blob/main/config/config.inc.php): `config/config.inc.php`
- [Image resizing](https://github.com/lamlieabdullah/masjid/blob/main/php/php-image-resize/src/ImageResize.php): `php/php-image-resize/src/ImageResize.php`

### Other components

- **Display viewer**
- **Administrator**
- **JAKIM data source**

## Connections

- Display viewer → Display entry: opens display
- Display entry → Player entry: redirects to (evidence: `index.php`)
- Display template 0 → Prayer timing: loads script (evidence: `player0.php`)
- Display template 1 → Prayer timing: loads script (evidence: `player1.php`)
- Display template 2 → Prayer timing: loads script (evidence: `player2.php`)
- Display template 3 → Prayer timing: loads script (evidence: `player3.php`)
- Prayer timing → Prayer data: requires data (evidence: `script.php`)
- Prayer timing → Prayer announcements: redirects at prayer (evidence: `script.php`)
- Administrator → Display settings: configures display
- Display settings → MySQL database: updates settings (evidence: `admin/index.php`)
- Slide management → MySQL database: reads slide records (evidence: `admin/slider.php`)
- Template management → MySQL database: manages templates (evidence: `admin/add_template.php`)
- Template management → Image resizing: resizes images
- Text management → MySQL database: manages text (evidence: `admin/text.php`)
- Media and events → MySQL database: stores content
- Prayer update → MySQL database: updates prayer settings (evidence: `kemaskini1-2.php`)
- JAKIM data source → Prayer update: provides prayer data
- Display template 5 → MySQL database: reads display settings (evidence: `player5.php`)
- Display template 0 → MySQL database: reads display settings
- Display template 1 → MySQL database: reads display settings
- Display template 2 → MySQL database: reads display settings
- Display template 3 → MySQL database: reads display settings
- Display template 4 → MySQL database: reads display settings
