# krushnamajhi/world-clock architecture

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

- Interactive diagram: https://gitdiagram.com/krushnamajhi/world-clock
- Repository: https://github.com/krushnamajhi/world-clock

## Overview

World-clock is a small browser app: a user chooses a continent and country, then sees the local time for that selection. `clock.js` populates the selectors from the timezone catalog in `timezones.js` and updates the displayed time. The README and excerpts are minimal; the HTML structure is represented by the tree, but its contents were not sampled.

Main entry points: [`clock.js`](https://github.com/krushnamajhi/world-clock/blob/master/clock.js) (Clock logic), [`index.html`](https://github.com/krushnamajhi/world-clock/blob/master/index.html) (Clock page), [`timezones.js`](https://github.com/krushnamajhi/world-clock/blob/master/timezones.js) (Timezone catalog)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_user(("User"))
node_page["Clock page<br/>[index.html]"]
node_clock["Clock logic<br/>[clock.js]"]
node_zones["Timezone catalog<br/>[timezones.js]"]

node_user -->|"opens"| node_page
node_page -->|"loads"| node_clock
node_clock -->|"reads"| node_zones
node_clock -->|"updates controls and time"| node_page
node_user -->|"changes selection"| node_clock

click node_page "https://github.com/krushnamajhi/world-clock/blob/master/index.html"
click node_clock "https://github.com/krushnamajhi/world-clock/blob/master/clock.js"
click node_zones "https://github.com/krushnamajhi/world-clock/blob/master/timezones.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_user toneBlue
class node_page,node_clock,node_zones toneTeal
```

## Components

### Other components

- **User**
- [Clock page](https://github.com/krushnamajhi/world-clock/blob/master/index.html): `index.html`
- [Clock logic](https://github.com/krushnamajhi/world-clock/blob/master/clock.js): `clock.js`
- [Timezone catalog](https://github.com/krushnamajhi/world-clock/blob/master/timezones.js): `timezones.js`

## Connections

- User → Clock page: opens
- Clock page → Clock logic: loads
- Clock logic → Timezone catalog: reads
- Clock logic → Clock page: updates controls and time
- User → Clock logic: changes selection
