# rehkamal/ledclock architecture

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

- Interactive diagram: https://gitdiagram.com/rehkamal/ledclock
- Repository: https://github.com/rehkamal/ledclock

## Overview

LED Clock is an Android clock app: users view a live clock, open Settings to customize its appearance and announcement schedule, and can remove ads through a one-time purchase. The documented runtime also restores announcement alarms after reboot and restores purchase status on reinstall. Source excerpts contain no app implementation, so component paths use existing source directories and README-backed relationships are cited; uncertain implementation links are omitted.

Main entry points: [`app/src/main/java`](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java) (Settings screen), [`app/src/main/res/layout`](https://github.com/rehkamal/ledclock/tree/main/app/src/main/res/layout) (Clock layout)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_clock["Clock experience"]
  node_main["Clock screen"]
  node_clockview["Clock layout"]
end

subgraph group_settings["Settings and themes"]
  node_settingsui["Settings screen"]
  node_theme["Color themes"]
  node_photo["Photo background"]
  node_photo_store[("Private photo storage")]
  node_preferences[("App preferences")]
end

subgraph group_voice["Voice announcements"]
  node_schedule["Announcement schedule"]
  node_alarm["Alarm manager"]
  node_speech["Text to Speech"]
  node_boot["Boot receiver"]
end

subgraph group_business["Ads and purchase"]
  node_ads["Banner ads"]
  node_billing["Billing manager"]
end

node_user(("User"))
node_play["Google Play Billing"]
node_android["Android system"]
node_admob["AdMob"]

node_user -->|"views"| node_main
node_main -->|"renders"| node_clockview
node_user -->|"opens settings"| node_settingsui
node_settingsui -.->|"configures"| node_theme
node_settingsui -.->|"configures"| node_photo
node_photo -->|"picks photo"| node_android
node_photo -->|"copies photo"| node_photo_store
node_settingsui -.->|"saves settings"| node_preferences
node_settingsui -->|"sets interval"| node_schedule
node_schedule -->|"schedules alarms"| node_alarm
node_alarm -->|"triggers speech"| node_speech
node_boot -->|"re-arms"| node_alarm
node_android -->|"delivers reboot"| node_boot
node_main -->|"shows banner"| node_ads
node_ads -->|"requests ads"| node_admob
node_user -->|"buys removal"| node_billing
node_billing -->|"uses billing"| node_play
node_billing -->|"restores purchase"| node_preferences

click node_main "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_clockview "https://github.com/rehkamal/ledclock/tree/main/app/src/main/res/layout"
click node_settingsui "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_theme "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_photo "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_schedule "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_boot "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_ads "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"
click node_billing "https://github.com/rehkamal/ledclock/tree/main/app/src/main/java"

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_clockview,node_user toneBlue
class node_settingsui,node_theme,node_photo,node_photo_store,node_preferences toneAmber
class node_schedule,node_alarm,node_speech,node_boot toneMint
class node_ads,node_billing toneRose
class node_play,node_android,node_admob toneIndigo
```

## Components

### Clock experience

- [Clock screen](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`
- [Clock layout](https://github.com/rehkamal/ledclock/tree/main/app/src/main/res/layout): `app/src/main/res/layout`

### Settings and themes

- [Settings screen](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`
- [Color themes](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`
- [Photo background](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`
- **Private photo storage**
- **App preferences**

### Voice announcements

- [Announcement schedule](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`
- **Alarm manager**
- **Text to Speech**
- [Boot receiver](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`

### Ads and purchase

- [Banner ads](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`
- [Billing manager](https://github.com/rehkamal/ledclock/tree/main/app/src/main/java): `app/src/main/java`

### Other components

- **User**
- **Google Play Billing**
- **Android system**
- **AdMob**

## Connections

- User → Clock screen: views (evidence: `README.md`)
- Clock screen → Clock layout: renders (evidence: `README.md`)
- User → Settings screen: opens settings (evidence: `README.md`)
- Settings screen → Color themes: configures
- Settings screen → Photo background: configures
- Photo background → Android system: picks photo (evidence: `README.md`)
- Photo background → Private photo storage: copies photo (evidence: `README.md`)
- Settings screen → App preferences: saves settings
- Settings screen → Announcement schedule: sets interval (evidence: `README.md`)
- Announcement schedule → Alarm manager: schedules alarms (evidence: `README.md`)
- Alarm manager → Text to Speech: triggers speech (evidence: `README.md`)
- Boot receiver → Alarm manager: re-arms (evidence: `README.md`)
- Android system → Boot receiver: delivers reboot (evidence: `README.md`)
- Clock screen → Banner ads: shows banner (evidence: `README.md`)
- Banner ads → AdMob: requests ads (evidence: `README.md`)
- User → Billing manager: buys removal (evidence: `README.md`)
- Billing manager → Google Play Billing: uses billing (evidence: `README.md`)
- Billing manager → App preferences: restores purchase (evidence: `README.md`)
