# atz-dsampath/work-radar architecture

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

- Interactive diagram: https://gitdiagram.com/atz-dsampath/work-radar
- Repository: https://github.com/atz-dsampath/work-radar

## Overview

Work Radar is a SwiftBar menu-bar dashboard for tracking review work and current-sprint Jira stories. SwiftBar runs the Python plugin; its main refresh workflow fetches GitHub PR data and Jira sprint issues, then formats clickable menu rows and refresh/status links. GitHub results distinguish PRs awaiting approval from PRs awaiting the user’s review; Jira results are split by In Progress and To Do. The README documents cached display between refreshes and CLI-based authentication. Some implementation details are unsampled, so the graph shows only relationships supported by the excerpt or README.

Main entry points: [`dashboard.5m.py`](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py) (Refresh coordinator)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_refresh["Refresh workflow"]
  node_plugin["Refresh coordinator<br/>[dashboard.5m.py]"]
end

subgraph group_github["GitHub review"]
  node_github_fetch["Fetch PR data<br/>[dashboard.5m.py]"]
  node_approval_prs["Approval-needed PRs<br/>[dashboard.5m.py]"]
  node_review_prs["Review-requested PRs<br/>[dashboard.5m.py]"]
end

subgraph group_jira["Jira sprint"]
  node_jira_fetch["Fetch sprint issues<br/>[dashboard.5m.py]"]
  node_sprint_status["Sprint status lists<br/>[dashboard.5m.py]"]
end

subgraph group_menu["Menu display"]
  node_menu_output["Menu rendering<br/>[dashboard.5m.py]"]
end

node_user(("Developer"))
node_swiftbar["SwiftBar"]
node_gh_cli["GitHub CLI"]
node_jira_cli["Jira CLI"]
node_keychain[("macOS Keychain")]

node_user -->|"opens menu"| node_swiftbar
node_swiftbar -->|"runs plugin"| node_plugin
node_plugin -->|"submits fetch"| node_github_fetch
node_github_fetch -->|"queries"| node_gh_cli
node_github_fetch -->|"filters and sorts"| node_approval_prs
node_github_fetch -->|"parses results"| node_review_prs
node_plugin -->|"submits status fetches"| node_jira_fetch
node_jira_fetch -->|"runs sprint queries"| node_jira_cli
node_plugin -->|"reads token"| node_keychain
node_approval_prs -->|"renders rows"| node_menu_output
node_review_prs -->|"renders rows"| node_menu_output
node_sprint_status -->|"renders rows"| node_menu_output
node_jira_fetch -->|"parses issues"| node_sprint_status
node_plugin -->|"prints footer"| node_menu_output
node_menu_output -->|"prints menu"| node_swiftbar

click node_plugin "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"
click node_github_fetch "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"
click node_approval_prs "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"
click node_review_prs "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"
click node_jira_fetch "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"
click node_sprint_status "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"
click node_menu_output "https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py"

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_plugin toneBlue
class node_github_fetch,node_approval_prs,node_review_prs,node_keychain toneAmber
class node_jira_fetch,node_sprint_status toneMint
class node_menu_output toneRose
class node_user,node_swiftbar,node_gh_cli,node_jira_cli toneIndigo
```

## Components

### Refresh workflow

- [Refresh coordinator](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`

### GitHub review

- [Fetch PR data](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`
- [Approval-needed PRs](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`
- [Review-requested PRs](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`

### Jira sprint

- [Fetch sprint issues](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`
- [Sprint status lists](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`

### Menu display

- [Menu rendering](https://github.com/atz-dsampath/work-radar/blob/main/dashboard.5m.py): `dashboard.5m.py`

### Other components

- **Developer**
- **SwiftBar**
- **GitHub CLI**
- **Jira CLI**
- **macOS Keychain**

## Connections

- Developer → SwiftBar: opens menu (evidence: `README.md`)
- SwiftBar → Refresh coordinator: runs plugin (evidence: `README.md`)
- Refresh coordinator → Fetch PR data: submits fetch (evidence: `dashboard.5m.py`)
- Fetch PR data → GitHub CLI: queries (evidence: `README.md`)
- Fetch PR data → Approval-needed PRs: filters and sorts (evidence: `dashboard.5m.py`)
- Fetch PR data → Review-requested PRs: parses results (evidence: `dashboard.5m.py`)
- Refresh coordinator → Fetch sprint issues: submits status fetches (evidence: `dashboard.5m.py`)
- Fetch sprint issues → Jira CLI: runs sprint queries (evidence: `dashboard.5m.py`)
- Refresh coordinator → macOS Keychain: reads token (evidence: `dashboard.5m.py`)
- Approval-needed PRs → Menu rendering: renders rows (evidence: `dashboard.5m.py`)
- Review-requested PRs → Menu rendering: renders rows (evidence: `dashboard.5m.py`)
- Sprint status lists → Menu rendering: renders rows (evidence: `dashboard.5m.py`)
- Fetch sprint issues → Sprint status lists: parses issues (evidence: `dashboard.5m.py`)
- Refresh coordinator → Menu rendering: prints footer (evidence: `dashboard.5m.py`)
- Menu rendering → SwiftBar: prints menu (evidence: `README.md`)
