# nawids/trinity architecture

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

- Interactive diagram: https://gitdiagram.com/nawids/trinity
- Repository: https://github.com/nawids/trinity

## Overview

This is a small browser clock display: `trinity.js` reads the current time, formats its four digits, renders digit-image references into the page, and schedules another update every second. The source excerpt supports those runtime relationships, but the HTML and CSS were not sampled, so their roles and connections are not asserted. The referenced PNG assets are not listed in the supplied tree.

Main entry points: [`trinity.js`](https://github.com/nawids/trinity/blob/main/trinity.js) (Clock logic), [`images`](https://github.com/nawids/trinity/tree/main/images) (Digit images)

## Diagram (Mermaid)

```mermaid
flowchart TD

node_clock["Clock logic<br/>[trinity.js]"]
node_display["Digit display<br/>[trinity.js]"]
node_digits["Digit images"]

node_clock -->|"updates DOM"| node_display
node_display -->|"references images"| node_digits
node_clock -->|"schedules update"| node_clock

click node_clock "https://github.com/nawids/trinity/blob/main/trinity.js"
click node_display "https://github.com/nawids/trinity/blob/main/trinity.js"
click node_digits "https://github.com/nawids/trinity/tree/main/images"

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_clock,node_display,node_digits toneTeal
```

## Components

### Other components

- [Clock logic](https://github.com/nawids/trinity/blob/main/trinity.js): `trinity.js`
- [Digit display](https://github.com/nawids/trinity/blob/main/trinity.js): `trinity.js`
- [Digit images](https://github.com/nawids/trinity/tree/main/images): `images`

## Connections

- Clock logic → Digit display: updates DOM (evidence: `trinity.js`)
- Digit display → Digit images: references images (evidence: `trinity.js`)
- Clock logic → Clock logic: schedules update (evidence: `trinity.js`)
