# vitaliiermolaev/fw-cat architecture

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

- Interactive diagram: https://gitdiagram.com/vitaliiermolaev/fw-cat
- Repository: https://github.com/vitaliiermolaev/fw-cat

## Overview

FW Cat is a BUSY Bar app that polls GitHub for the five newest open issues and pull requests, then presents them on the bar. Its workflow is refresh and normalize the feed, cycle through item or status screens, and let the user advance or close the app. The README also documents a separate animated back display, while app metadata is present in the tree but its behavior was not sampled. Edges are limited to relationships shown in main.js or explicitly documented in the README.

Main entry points: [`src/main.js`](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js) (App coordinator), [`src/animations/octo.anim`](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/animations/octo.anim) (Cat animation)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_feed["Issue feed"]
  node_github["GitHub REST API"]
  node_refresh["Feed refresh<br/>[main.js]"]
  node_items["Issue and PR items<br/>[main.js]"]
  node_sanitize["Title normalization<br/>[main.js]"]
end

subgraph group_display["Bar displays"]
  node_front["Front display<br/>[main.js]"]
  node_back["Back display<br/>[main.js]"]
  node_display_api["Display API"]
end

subgraph group_interaction["User controls"]
  node_main["App coordinator<br/>[main.js]"]
  node_input["Input handler<br/>[main.js]"]
  node_timers["Screen and refresh timers<br/>[main.js]"]
end

subgraph group_assets["App assets"]
  node_animation["Cat animation<br/>[octo.anim]"]
  node_metadata["App metadata<br/>[manifest.json]"]
end

node_user(("Bar user"))

node_main -->|"shows first"| node_back
node_main -->|"shows intro"| node_front
node_main -->|"starts refresh"| node_refresh
node_refresh -->|"fetches feed"| node_github
node_refresh -->|"normalizes titles"| node_sanitize
node_refresh -->|"stores results"| node_items
node_main -->|"cycles items"| node_items
node_main -->|"shows status"| node_front
node_main -->|"shows item"| node_front
node_main -->|"schedules screens"| node_timers
node_refresh -->|"schedules refresh"| node_timers
node_user -->|"presses keys"| node_input
node_input -->|"advances or stops"| node_main
node_front -->|"draws elements"| node_display_api
node_back -->|"draws elements"| node_display_api
node_back -->|"plays"| node_animation
node_main -->|"removes intro"| node_display_api

click node_main "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_refresh "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_items "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_sanitize "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_input "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_timers "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_front "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_back "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js"
click node_animation "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/animations/octo.anim"
click node_metadata "https://github.com/vitaliiermolaev/fw-cat/blob/main/src/appmeta/manifest.json"

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_github,node_refresh,node_items,node_sanitize,node_user toneBlue
class node_front,node_back,node_display_api toneAmber
class node_main,node_input,node_timers toneMint
class node_animation,node_metadata toneRose
```

## Components

### Issue feed

- **GitHub REST API**
- [Feed refresh](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`
- [Issue and PR items](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`
- [Title normalization](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`

### Bar displays

- [Front display](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`
- [Back display](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`
- **Display API**

### User controls

- [App coordinator](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`
- [Input handler](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`
- [Screen and refresh timers](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/main.js): `src/main.js`

### App assets

- [Cat animation](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/animations/octo.anim): `src/animations/octo.anim`
- [App metadata](https://github.com/vitaliiermolaev/fw-cat/blob/main/src/appmeta/manifest.json): `src/appmeta/manifest.json`

### Other components

- **Bar user**

## Connections

- App coordinator → Back display: shows first (evidence: `src/main.js`)
- App coordinator → Front display: shows intro (evidence: `src/main.js`)
- App coordinator → Feed refresh: starts refresh (evidence: `src/main.js`)
- Feed refresh → GitHub REST API: fetches feed (evidence: `src/main.js`)
- Feed refresh → Title normalization: normalizes titles (evidence: `src/main.js`)
- Feed refresh → Issue and PR items: stores results (evidence: `src/main.js`)
- App coordinator → Issue and PR items: cycles items (evidence: `src/main.js`)
- App coordinator → Front display: shows status (evidence: `src/main.js`)
- App coordinator → Front display: shows item (evidence: `src/main.js`)
- App coordinator → Screen and refresh timers: schedules screens (evidence: `src/main.js`)
- Feed refresh → Screen and refresh timers: schedules refresh (evidence: `src/main.js`)
- Bar user → Input handler: presses keys (evidence: `src/main.js`)
- Input handler → App coordinator: advances or stops (evidence: `src/main.js`)
- Front display → Display API: draws elements (evidence: `src/main.js`)
- Back display → Display API: draws elements (evidence: `src/main.js`)
- Back display → Cat animation: plays (evidence: `src/main.js`)
- App coordinator → Display API: removes intro (evidence: `src/main.js`)
