# austinar59/rowdy-24 architecture

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

- Interactive diagram: https://gitdiagram.com/austinar59/rowdy-24
- Repository: https://github.com/austinar59/rowdy-24

## Overview

RowdyKeys turns a browser-selected note and instrument into audio playback and a visual cue. The main path is browser input → REST command → sound selection/playback, while a separate Swing visualizer polls the API and animates note bars. The README also documents keyboard-note mapping and cross-platform visualization. Source excerpts were available only for the browser interaction code, so backend and GUI relationships below rely on the README rather than inspected implementation.

Main entry points: [`RestApi/src/main/java/com/example/RestApi/Controller.java`](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/Controller.java) (REST Controller), [`RestApi/src/main/java/com/example/RestApi/PlayClip.java`](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/PlayClip.java) (Clip Player), [`RestApi/src/main/resources/static/index.html`](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/resources/static/index.html) (Piano Interface), [`RestApi/src/main/resources/static/js/uiFuncs.js`](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/resources/static/js/uiFuncs.js) (Input Controls)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_web["Web Frontend"]
  node_web_page["Piano Interface<br/>[index.html]"]
  node_web_logic["Input Controls<br/>[uiFuncs.js]"]
end

subgraph group_api["REST Processing"]
  node_controller["REST Controller<br/>[Controller.java]"]
  node_parser["Note Parser<br/>[Parser.java]"]
end

subgraph group_audio["Audio Playback"]
  node_player["Clip Player<br/>[PlayClip.java]"]
  node_audio_files["Instrument Clips"]
end

subgraph group_visual["Sound Visualization"]
  node_visualizer["Swing Visualizer"]
end

node_browser_user(("Browser User"))

node_browser_user -->|"selects notes"| node_web_page
node_web_page -.->|"uses controls"| node_web_logic
node_web_logic -->|"POSTs note"| node_controller
node_controller -->|"passes API data"| node_parser
node_controller -->|"triggers playback"| node_player
node_parser -->|"matches clip"| node_player
node_player -->|"loads clips"| node_audio_files
node_visualizer -->|"polls note data"| node_controller
node_controller -->|"signals new note"| node_visualizer

click node_web_page "https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/resources/static/index.html"
click node_web_logic "https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/resources/static/js/uiFuncs.js"
click node_controller "https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/Controller.java"
click node_parser "https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/Parser.java"
click node_player "https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/PlayClip.java"
click node_audio_files "https://github.com/austinar59/rowdy-24/tree/main/RestApi/src/main/resources/rowdyKeys"
click node_visualizer "https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/BackToTheFutureVisualizer.java"

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_web_page,node_web_logic,node_browser_user toneBlue
class node_controller,node_parser toneAmber
class node_player,node_audio_files toneMint
class node_visualizer toneRose
```

## Components

### Web Frontend

- [Piano Interface](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/resources/static/index.html): `RestApi/src/main/resources/static/index.html`
- [Input Controls](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/resources/static/js/uiFuncs.js): `RestApi/src/main/resources/static/js/uiFuncs.js`

### REST Processing

- [REST Controller](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/Controller.java): `RestApi/src/main/java/com/example/RestApi/Controller.java`
- [Note Parser](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/Parser.java): `RestApi/src/main/java/com/example/RestApi/Parser.java`

### Audio Playback

- [Clip Player](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/PlayClip.java): `RestApi/src/main/java/com/example/RestApi/PlayClip.java`
- [Instrument Clips](https://github.com/austinar59/rowdy-24/tree/main/RestApi/src/main/resources/rowdyKeys): `RestApi/src/main/resources/rowdyKeys`

### Sound Visualization

- [Swing Visualizer](https://github.com/austinar59/rowdy-24/blob/main/RestApi/src/main/java/com/example/RestApi/BackToTheFutureVisualizer.java): `RestApi/src/main/java/com/example/RestApi/BackToTheFutureVisualizer.java`

### Other components

- **Browser User**

## Connections

- Browser User → Piano Interface: selects notes (evidence: `README.md`)
- Piano Interface → Input Controls: uses controls
- Input Controls → REST Controller: POSTs note (evidence: `RestApi/src/main/resources/static/js/uiFuncs.js`)
- REST Controller → Note Parser: passes API data (evidence: `README.md`)
- REST Controller → Clip Player: triggers playback (evidence: `README.md`)
- Note Parser → Clip Player: matches clip (evidence: `README.md`)
- Clip Player → Instrument Clips: loads clips (evidence: `README.md`)
- Swing Visualizer → REST Controller: polls note data (evidence: `README.md`)
- REST Controller → Swing Visualizer: signals new note (evidence: `README.md`)
