# brodymclemore/pompotimer architecture

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

- Interactive diagram: https://gitdiagram.com/brodymclemore/pompotimer
- Repository: https://github.com/brodymclemore/pompotimer

## Overview

PompoTimer is an Electron desktop Pomodoro timer. A user selects a work or break mode, starts or stops its countdown, and the app automatically advances through work/short-break cycles to a long break after three work sessions. The Electron main process creates the window and loads the interface; renderer code owns countdown state, mode transitions, and clock/progress updates. The README documents the cycle and three selectable durations; the excerpts do not show how the HTML loads the renderer script, so that connection is omitted.

Main entry points: [`src/app.js`](https://github.com/brodymclemore/pompotimer/blob/main/src/app.js) (Countdown engine), [`src/index.js`](https://github.com/brodymclemore/pompotimer/blob/main/src/index.js) (Window and menu), [`src/index.html`](https://github.com/brodymclemore/pompotimer/blob/main/src/index.html) (Mode controls), [`src/Style/style.css`](https://github.com/brodymclemore/pompotimer/blob/main/src/Style/style.css) (Screen styling)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_desktop["Desktop shell"]
  node_main["Window and menu<br/>[index.js]"]
end

subgraph group_timer["Timer workflow"]
  node_engine["Countdown engine<br/>[app.js]"]
  node_cycle["Cycle transitions<br/>[app.js]"]
end

subgraph group_interface["Timer interface"]
  node_screen["Timer screen<br/>[index.html]"]
  node_styles["Screen styling<br/>[style.css]"]
  node_controls["Mode controls<br/>[index.html]"]
  node_display["Clock and progress<br/>[app.js]"]
end

node_user(("User"))
node_electron{{"Electron runtime"}}

node_electron -->|"starts app"| node_main
node_main -->|"loads window"| node_screen
node_user -->|"selects mode"| node_controls
node_controls -->|"sets timer mode"| node_engine
node_user -->|"starts or stops"| node_engine
node_engine -->|"updates display"| node_display
node_engine -->|"dispatches on completion"| node_cycle
node_cycle -->|"starts next mode"| node_engine
node_styles -.->|"styles"| node_screen

click node_main "https://github.com/brodymclemore/pompotimer/blob/main/src/index.js"
click node_screen "https://github.com/brodymclemore/pompotimer/blob/main/src/index.html"
click node_styles "https://github.com/brodymclemore/pompotimer/blob/main/src/Style/style.css"
click node_controls "https://github.com/brodymclemore/pompotimer/blob/main/src/index.html"
click node_engine "https://github.com/brodymclemore/pompotimer/blob/main/src/app.js"
click node_cycle "https://github.com/brodymclemore/pompotimer/blob/main/src/app.js"
click node_display "https://github.com/brodymclemore/pompotimer/blob/main/src/app.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_main,node_user toneBlue
class node_engine,node_cycle toneAmber
class node_screen,node_styles,node_controls,node_display toneMint
class node_electron toneIndigo
```

## Components

### Desktop shell

- [Window and menu](https://github.com/brodymclemore/pompotimer/blob/main/src/index.js): `src/index.js`

### Timer workflow

- [Countdown engine](https://github.com/brodymclemore/pompotimer/blob/main/src/app.js): `src/app.js`
- [Cycle transitions](https://github.com/brodymclemore/pompotimer/blob/main/src/app.js): `src/app.js`

### Timer interface

- [Timer screen](https://github.com/brodymclemore/pompotimer/blob/main/src/index.html): `src/index.html`
- [Screen styling](https://github.com/brodymclemore/pompotimer/blob/main/src/Style/style.css): `src/Style/style.css`
- [Mode controls](https://github.com/brodymclemore/pompotimer/blob/main/src/index.html): `src/index.html`
- [Clock and progress](https://github.com/brodymclemore/pompotimer/blob/main/src/app.js): `src/app.js`

### Other components

- **User**
- **Electron runtime**

## Connections

- Electron runtime → Window and menu: starts app (evidence: `src/index.js`)
- Window and menu → Timer screen: loads window (evidence: `src/index.js`)
- User → Mode controls: selects mode (evidence: `README.md`)
- Mode controls → Countdown engine: sets timer mode (evidence: `README.md`)
- User → Countdown engine: starts or stops (evidence: `src/app.js`)
- Countdown engine → Clock and progress: updates display (evidence: `src/app.js`)
- Countdown engine → Cycle transitions: dispatches on completion (evidence: `src/app.js`)
- Cycle transitions → Countdown engine: starts next mode (evidence: `src/app.js`)
- Screen styling → Timer screen: styles
