# wtfutil/wtf architecture

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

- Interactive diagram: https://gitdiagram.com/wtfutil/wtf
- Repository: https://github.com/wtfutil/wtf

## Overview

WTF is a terminal-based personal information dashboard. Users configure modules, launch the app, and view selected information in a terminal interface; module clients fetch data from external services. The README documents the configurable-module workflow and highlights DigitalOcean, GitHub, Google Calendar, Hacker News, HIBP, New Relic, OpsGenie, Security, and Transmission. The excerpts show startup configuration and several service clients, but not how the app registers or renders modules, so those internal links are left out.

Main entry points: [`main.go`](https://github.com/wtfutil/wtf/blob/trunk/main.go) (Program entry), [`cfg`](https://github.com/wtfutil/wtf/tree/trunk/cfg) (Configuration), [`modules/jira/client.go`](https://github.com/wtfutil/wtf/blob/trunk/modules/jira/client.go) (Jira integration), [`modules/grafana/client.go`](https://github.com/wtfutil/wtf/blob/trunk/modules/grafana/client.go) (Grafana alerts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["Startup and configuration"]
  node_entry["Program entry<br/>[main.go]"]
  node_config["Configuration"]
end

subgraph group_dashboard["Terminal dashboard"]
  node_manager["App manager<br/>[app_manager.go]"]
  node_app["Terminal app<br/>[wtf_app.go]"]
  node_views["Terminal views"]
end

subgraph group_work["Work and operations"]
  node_jira["Jira integration<br/>[client.go]"]
  node_grafana["Grafana alerts<br/>[client.go]"]
  node_jenkins["Jenkins jobs<br/>[client.go]"]
  node_travis["Travis builds<br/>[client.go]"]
  node_github["GitHub module"]
  node_digitalocean["DigitalOcean module"]
  node_opsgenie["OpsGenie module"]
end

subgraph group_personal["Personal information"]
  node_gcal["Google Calendar<br/>[client.go]"]
  node_sheets["Google Sheets<br/>[client.go]"]
  node_analytics["Google Analytics<br/>[client.go]"]
  node_security["Security module"]
  node_news["Hacker News module"]
  node_hibp["HIBP module"]
  node_transmission["Transmission module"]
end

node_user(("Dashboard user"))
node_jira_service(("Jira service"))
node_calendar_service(("Google Calendar"))
node_sheets_service(("Google Sheets"))
node_analytics_service(("Google Analytics"))
node_grafana_service(("Grafana"))
node_jenkins_service(("Jenkins"))
node_travis_service(("Travis CI"))

node_user -->|"launches"| node_entry
node_entry -->|"loads"| node_config
node_entry -->|"creates"| node_manager
node_user -->|"configures modules"| node_config
node_jira -->|"requests data"| node_jira_service
node_gcal -->|"fetches events"| node_calendar_service
node_sheets -->|"reads values"| node_sheets_service
node_analytics -->|"fetches reports"| node_analytics_service
node_grafana -->|"fetches alerts"| node_grafana_service
node_jenkins -->|"fetches jobs"| node_jenkins_service
node_travis -->|"fetches builds"| node_travis_service

click node_entry "https://github.com/wtfutil/wtf/blob/trunk/main.go"
click node_config "https://github.com/wtfutil/wtf/tree/trunk/cfg"
click node_manager "https://github.com/wtfutil/wtf/blob/trunk/app/app_manager.go"
click node_app "https://github.com/wtfutil/wtf/blob/trunk/app/wtf_app.go"
click node_views "https://github.com/wtfutil/wtf/tree/trunk/view"
click node_jira "https://github.com/wtfutil/wtf/blob/trunk/modules/jira/client.go"
click node_gcal "https://github.com/wtfutil/wtf/blob/trunk/modules/gcal/client.go"
click node_sheets "https://github.com/wtfutil/wtf/blob/trunk/modules/gspreadsheets/client.go"
click node_analytics "https://github.com/wtfutil/wtf/blob/trunk/modules/googleanalytics/client.go"
click node_grafana "https://github.com/wtfutil/wtf/blob/trunk/modules/grafana/client.go"
click node_jenkins "https://github.com/wtfutil/wtf/blob/trunk/modules/jenkins/client.go"
click node_travis "https://github.com/wtfutil/wtf/blob/trunk/modules/travisci/client.go"
click node_security "https://github.com/wtfutil/wtf/tree/trunk/modules/security"
click node_github "https://github.com/wtfutil/wtf/tree/trunk/modules/github"
click node_digitalocean "https://github.com/wtfutil/wtf/tree/trunk/modules/digitalocean"
click node_news "https://github.com/wtfutil/wtf/tree/trunk/modules/hackernews"
click node_hibp "https://github.com/wtfutil/wtf/tree/trunk/modules/hibp"
click node_opsgenie "https://github.com/wtfutil/wtf/tree/trunk/modules/opsgenie"
click node_transmission "https://github.com/wtfutil/wtf/tree/trunk/modules/transmission"

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_config,node_user toneBlue
class node_manager,node_app,node_views toneAmber
class node_jira,node_grafana,node_jenkins,node_travis,node_github,node_digitalocean,node_opsgenie toneMint
class node_gcal,node_sheets,node_analytics,node_security,node_news,node_hibp,node_transmission toneRose
class node_jira_service,node_calendar_service,node_sheets_service,node_analytics_service,node_grafana_service,node_jenkins_service,node_travis_service toneIndigo
```

## Components

### Startup and configuration

- [Program entry](https://github.com/wtfutil/wtf/blob/trunk/main.go): `main.go`
- [Configuration](https://github.com/wtfutil/wtf/tree/trunk/cfg): `cfg`

### Terminal dashboard

- [App manager](https://github.com/wtfutil/wtf/blob/trunk/app/app_manager.go): `app/app_manager.go`
- [Terminal app](https://github.com/wtfutil/wtf/blob/trunk/app/wtf_app.go): `app/wtf_app.go`
- [Terminal views](https://github.com/wtfutil/wtf/tree/trunk/view): `view`

### Work and operations

- [Jira integration](https://github.com/wtfutil/wtf/blob/trunk/modules/jira/client.go): `modules/jira/client.go`
- [Grafana alerts](https://github.com/wtfutil/wtf/blob/trunk/modules/grafana/client.go): `modules/grafana/client.go`
- [Jenkins jobs](https://github.com/wtfutil/wtf/blob/trunk/modules/jenkins/client.go): `modules/jenkins/client.go`
- [Travis builds](https://github.com/wtfutil/wtf/blob/trunk/modules/travisci/client.go): `modules/travisci/client.go`
- [GitHub module](https://github.com/wtfutil/wtf/tree/trunk/modules/github): `modules/github`
- [DigitalOcean module](https://github.com/wtfutil/wtf/tree/trunk/modules/digitalocean): `modules/digitalocean`
- [OpsGenie module](https://github.com/wtfutil/wtf/tree/trunk/modules/opsgenie): `modules/opsgenie`

### Personal information

- [Google Calendar](https://github.com/wtfutil/wtf/blob/trunk/modules/gcal/client.go): `modules/gcal/client.go`
- [Google Sheets](https://github.com/wtfutil/wtf/blob/trunk/modules/gspreadsheets/client.go): `modules/gspreadsheets/client.go`
- [Google Analytics](https://github.com/wtfutil/wtf/blob/trunk/modules/googleanalytics/client.go): `modules/googleanalytics/client.go`
- [Security module](https://github.com/wtfutil/wtf/tree/trunk/modules/security): `modules/security`
- [Hacker News module](https://github.com/wtfutil/wtf/tree/trunk/modules/hackernews): `modules/hackernews`
- [HIBP module](https://github.com/wtfutil/wtf/tree/trunk/modules/hibp): `modules/hibp`
- [Transmission module](https://github.com/wtfutil/wtf/tree/trunk/modules/transmission): `modules/transmission`

### Other components

- **Dashboard user**
- **Jira service**
- **Google Calendar**
- **Google Sheets**
- **Google Analytics**
- **Grafana**
- **Jenkins**
- **Travis CI**

## Connections

- Dashboard user → Program entry: launches (evidence: `README.md`)
- Program entry → Configuration: loads (evidence: `main.go`)
- Program entry → App manager: creates (evidence: `main.go`)
- Dashboard user → Configuration: configures modules (evidence: `README.md`)
- Jira integration → Jira service: requests data (evidence: `modules/jira/client.go`)
- Google Calendar → Google Calendar: fetches events (evidence: `modules/gcal/client.go`)
- Google Sheets → Google Sheets: reads values (evidence: `modules/gspreadsheets/client.go`)
- Google Analytics → Google Analytics: fetches reports (evidence: `modules/googleanalytics/client.go`)
- Grafana alerts → Grafana: fetches alerts (evidence: `modules/grafana/client.go`)
- Jenkins jobs → Jenkins: fetches jobs (evidence: `modules/jenkins/client.go`)
- Travis builds → Travis CI: fetches builds (evidence: `modules/travisci/client.go`)
