# akene-uzezi/clockwork architecture

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

- Interactive diagram: https://gitdiagram.com/akene-uzezi/clockwork
- Repository: https://github.com/akene-uzezi/clockwork

## Overview

Clockwork is a command-line countdown timer with a one-shot Timer mode and a recurring Pomodoro work/break mode. The workflow starts at the CLI entry point, dispatches by the `-p` flag, parses mode-specific durations, runs a one-second countdown that responds to pause input, and displays progress; Timer mode also reports completion. The source excerpts show these calls directly. README documents stop input and terminal bells, while sampled code shows stop handling in shared input and bells in completion/transition messages; no external services or persistent state are involved.

Main entry points: [`main.go`](https://github.com/akene-uzezi/clockwork/blob/main/main.go) (Mode entry), [`timer.go`](https://github.com/akene-uzezi/clockwork/blob/main/timer.go) (Timer mode), [`pomodoro.go`](https://github.com/akene-uzezi/clockwork/blob/main/pomodoro.go) (Pomodoro mode), [`util.go`](https://github.com/akene-uzezi/clockwork/blob/main/util.go) (Input controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_cli["CLI dispatch"]
  node_entry["Mode entry<br/>[main.go]"]
end

subgraph group_modes["Countdown modes"]
  node_timer["Timer mode<br/>[timer.go]"]
  node_pomodoro["Pomodoro mode<br/>[pomodoro.go]"]
end

subgraph group_shared["Input and display"]
  node_input["Input controls<br/>[util.go]"]
  node_timerdisplay["Timer display<br/>[util.go]"]
  node_pomodorodisplay["Pomodoro display<br/>[util.go]"]
end

node_user(("CLI user"))

node_user -->|"starts"| node_entry
node_entry -->|"dispatches"| node_timer
node_entry -->|"dispatches"| node_pomodoro
node_timer -->|"starts reader"| node_input
node_pomodoro -->|"starts reader"| node_input
node_timer -->|"prints progress"| node_timerdisplay
node_pomodoro -->|"prints progress"| node_pomodorodisplay
node_user -->|"enters controls"| node_input

click node_entry "https://github.com/akene-uzezi/clockwork/blob/main/main.go"
click node_timer "https://github.com/akene-uzezi/clockwork/blob/main/timer.go"
click node_pomodoro "https://github.com/akene-uzezi/clockwork/blob/main/pomodoro.go"
click node_input "https://github.com/akene-uzezi/clockwork/blob/main/util.go"
click node_timerdisplay "https://github.com/akene-uzezi/clockwork/blob/main/util.go"
click node_pomodorodisplay "https://github.com/akene-uzezi/clockwork/blob/main/util.go"

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_user toneBlue
class node_timer,node_pomodoro toneAmber
class node_input,node_timerdisplay,node_pomodorodisplay toneMint
```

## Components

### CLI dispatch

- [Mode entry](https://github.com/akene-uzezi/clockwork/blob/main/main.go): `main.go`

### Countdown modes

- [Timer mode](https://github.com/akene-uzezi/clockwork/blob/main/timer.go): `timer.go`
- [Pomodoro mode](https://github.com/akene-uzezi/clockwork/blob/main/pomodoro.go): `pomodoro.go`

### Input and display

- [Input controls](https://github.com/akene-uzezi/clockwork/blob/main/util.go): `util.go`
- [Timer display](https://github.com/akene-uzezi/clockwork/blob/main/util.go): `util.go`
- [Pomodoro display](https://github.com/akene-uzezi/clockwork/blob/main/util.go): `util.go`

### Other components

- **CLI user**

## Connections

- CLI user → Mode entry: starts (evidence: `README.md`)
- Mode entry → Timer mode: dispatches (evidence: `main.go`)
- Mode entry → Pomodoro mode: dispatches (evidence: `main.go`)
- Timer mode → Input controls: starts reader (evidence: `timer.go`)
- Pomodoro mode → Input controls: starts reader (evidence: `pomodoro.go`)
- Timer mode → Timer display: prints progress (evidence: `timer.go`)
- Pomodoro mode → Pomodoro display: prints progress (evidence: `pomodoro.go`)
- CLI user → Input controls: enters controls (evidence: `README.md`)
