# wes10645/guitarbob architecture

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

- Interactive diagram: https://gitdiagram.com/wes10645/guitarbob
- Repository: https://github.com/wes10645/guitarbob

## Overview

GuitarBob is an AI guitar tutor with two main workflows: upload a song for chord, tab, and note-highway analysis, then practice the result; or play guitar live and view detected notes. Its frontend also offers chord-learning, tuner UI, and character customization. The backend routes uploads through conversion and analysis, while the React app provides the learning and visualization experiences. Arrows follow sampled code or README statements; some frontend/backend and unsampled subsystem links remain unverified.

Main entry points: [`src/App.jsx`](https://github.com/wes10645/guitarbob/blob/main/src/App.jsx) (App routing), [`backend/main.py`](https://github.com/wes10645/guitarbob/blob/main/backend/main.py) (FastAPI service), [`src/pages/Practice.jsx`](https://github.com/wes10645/guitarbob/blob/main/src/pages/Practice.jsx) (Note practice), [`src/pages/Chords.jsx`](https://github.com/wes10645/guitarbob/blob/main/src/pages/Chords.jsx) (Chord library)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_frontend["Tutor frontend"]
  node_app["App routing<br/>[App.jsx]"]
  node_upload["Song upload<br/>[Upload.jsx]"]
  node_results["Analysis results<br/>[Results.jsx]"]
  node_characters["Character and XP state"]
  node_shop["Character shop<br/>[CharacterShop.jsx]"]
end

subgraph group_learning["Practice and learning"]
  node_practice["Note practice<br/>[Practice.jsx]"]
  node_visualizer["Practice visualizers"]
  node_fretboard["Guitar fretboard"]
  node_chordlibrary["Chord library<br/>[Chords.jsx]"]
  node_chorddetail["Chord detail<br/>[ChordDetail.jsx]"]
  node_chorddiagram["Chord diagrams<br/>[ChordDiagram.jsx]"]
  node_tunerdemo["Tuner UI<br/>[Tuner.jsx]"]
end

subgraph group_backend["Song analysis backend"]
  node_api["FastAPI service<br/>[main.py]"]
  node_audioio["Audio conversion<br/>[audio_io.py]"]
  node_songanalysis["Chord analysis<br/>[analyze_song.py]"]
  node_chords["Chord detection<br/>[chords.py]"]
  node_notedetection["Onset note detection<br/>[note_detection.py]"]
  node_highway["Note highway generation<br/>[note_highway.py]"]
  node_tabs["Chord tab generation<br/>[chord_tabs.py]"]
end

subgraph group_live["Live audio"]
  node_livepage["Live transcription UI<br/>[LiveTranscribe.jsx]"]
  node_liveevents["Live note display"]
  node_livestream["Live pitch stream<br/>[live_listen.py]"]
end

node_learner(("Guitar learner"))

node_learner -->|"opens"| node_app
node_app -->|"routes to"| node_upload
node_app -->|"routes to"| node_results
node_app -->|"routes to"| node_practice
node_app -->|"routes to"| node_chordlibrary
node_app -->|"routes to"| node_chorddetail
node_app -->|"routes to"| node_tunerdemo
node_app -->|"routes to"| node_shop
node_app -->|"routes to"| node_livepage
node_learner -->|"submits audio"| node_upload
node_upload -->|"uploads file"| node_api
node_api -->|"converts upload"| node_audioio
node_api -->|"analyzes audio"| node_songanalysis
node_api -->|"builds highway"| node_highway
node_api -->|"detects notes"| node_notedetection
node_api -->|"builds tabs"| node_tabs
node_songanalysis -->|"uses detection"| node_chords
node_api -.->|"returns analysis"| node_results
node_results -.->|"passes song data"| node_practice
node_practice -->|"renders practice"| node_visualizer
node_practice -->|"renders notes"| node_fretboard
node_chordlibrary -.->|"opens chord"| node_chorddetail
node_chorddetail -->|"renders diagram"| node_chorddiagram
node_livepage -.->|"shows notes"| node_liveevents
node_livepage -.->|"connects WebSocket"| node_api
node_api -->|"streams events"| node_livestream
node_practice -->|"uses live notes"| node_liveevents
node_shop -->|"reads character state"| node_characters
node_app -->|"provides state"| node_characters
node_chordlibrary -.->|"shows diagrams"| node_chorddiagram

click node_app "https://github.com/wes10645/guitarbob/blob/main/src/App.jsx"
click node_upload "https://github.com/wes10645/guitarbob/blob/main/src/pages/Upload.jsx"
click node_results "https://github.com/wes10645/guitarbob/blob/main/src/pages/Results.jsx"
click node_practice "https://github.com/wes10645/guitarbob/blob/main/src/pages/Practice.jsx"
click node_visualizer "https://github.com/wes10645/guitarbob/blob/main/src/components/PracticeVisualizer/PracticeVisualizer.jsx"
click node_fretboard "https://github.com/wes10645/guitarbob/blob/main/src/components/GuitarHeroFretboard.jsx"
click node_chordlibrary "https://github.com/wes10645/guitarbob/blob/main/src/pages/Chords.jsx"
click node_chorddetail "https://github.com/wes10645/guitarbob/blob/main/src/pages/ChordDetail.jsx"
click node_chorddiagram "https://github.com/wes10645/guitarbob/blob/main/src/components/ChordDiagram.jsx"
click node_tunerdemo "https://github.com/wes10645/guitarbob/blob/main/src/pages/Tuner.jsx"
click node_characters "https://github.com/wes10645/guitarbob/blob/main/src/context/CharacterContext.jsx"
click node_shop "https://github.com/wes10645/guitarbob/blob/main/src/pages/CharacterShop.jsx"
click node_api "https://github.com/wes10645/guitarbob/blob/main/backend/main.py"
click node_audioio "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/audio_io.py"
click node_songanalysis "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/analyze_song.py"
click node_chords "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/chords.py"
click node_notedetection "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/note_detection.py"
click node_highway "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/note_highway.py"
click node_tabs "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/chord_tabs.py"
click node_livepage "https://github.com/wes10645/guitarbob/blob/main/src/pages/LiveTranscribe.jsx"
click node_liveevents "https://github.com/wes10645/guitarbob/blob/main/src/components/LiveDetectedNotes.jsx"
click node_livestream "https://github.com/wes10645/guitarbob/blob/main/backend/dsp/live_listen.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_app,node_upload,node_results,node_characters,node_shop toneBlue
class node_practice,node_visualizer,node_fretboard,node_chordlibrary,node_chorddetail,node_chorddiagram,node_tunerdemo toneAmber
class node_api,node_audioio,node_songanalysis,node_chords,node_notedetection,node_highway,node_tabs toneMint
class node_livepage,node_liveevents,node_livestream toneRose
class node_learner toneIndigo
```

## Components

### Tutor frontend

- [App routing](https://github.com/wes10645/guitarbob/blob/main/src/App.jsx): `src/App.jsx`
- [Song upload](https://github.com/wes10645/guitarbob/blob/main/src/pages/Upload.jsx): `src/pages/Upload.jsx`
- [Analysis results](https://github.com/wes10645/guitarbob/blob/main/src/pages/Results.jsx): `src/pages/Results.jsx`
- [Character and XP state](https://github.com/wes10645/guitarbob/blob/main/src/context/CharacterContext.jsx): `src/context/CharacterContext.jsx`
- [Character shop](https://github.com/wes10645/guitarbob/blob/main/src/pages/CharacterShop.jsx): `src/pages/CharacterShop.jsx`

### Practice and learning

- [Note practice](https://github.com/wes10645/guitarbob/blob/main/src/pages/Practice.jsx): `src/pages/Practice.jsx`
- [Practice visualizers](https://github.com/wes10645/guitarbob/blob/main/src/components/PracticeVisualizer/PracticeVisualizer.jsx): `src/components/PracticeVisualizer/PracticeVisualizer.jsx`
- [Guitar fretboard](https://github.com/wes10645/guitarbob/blob/main/src/components/GuitarHeroFretboard.jsx): `src/components/GuitarHeroFretboard.jsx`
- [Chord library](https://github.com/wes10645/guitarbob/blob/main/src/pages/Chords.jsx): `src/pages/Chords.jsx`
- [Chord detail](https://github.com/wes10645/guitarbob/blob/main/src/pages/ChordDetail.jsx): `src/pages/ChordDetail.jsx`
- [Chord diagrams](https://github.com/wes10645/guitarbob/blob/main/src/components/ChordDiagram.jsx): `src/components/ChordDiagram.jsx`
- [Tuner UI](https://github.com/wes10645/guitarbob/blob/main/src/pages/Tuner.jsx): `src/pages/Tuner.jsx`

### Song analysis backend

- [FastAPI service](https://github.com/wes10645/guitarbob/blob/main/backend/main.py): `backend/main.py`
- [Audio conversion](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/audio_io.py): `backend/dsp/audio_io.py`
- [Chord analysis](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/analyze_song.py): `backend/dsp/analyze_song.py`
- [Chord detection](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/chords.py): `backend/dsp/chords.py`
- [Onset note detection](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/note_detection.py): `backend/dsp/note_detection.py`
- [Note highway generation](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/note_highway.py): `backend/dsp/note_highway.py`
- [Chord tab generation](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/chord_tabs.py): `backend/dsp/chord_tabs.py`

### Live audio

- [Live transcription UI](https://github.com/wes10645/guitarbob/blob/main/src/pages/LiveTranscribe.jsx): `src/pages/LiveTranscribe.jsx`
- [Live note display](https://github.com/wes10645/guitarbob/blob/main/src/components/LiveDetectedNotes.jsx): `src/components/LiveDetectedNotes.jsx`
- [Live pitch stream](https://github.com/wes10645/guitarbob/blob/main/backend/dsp/live_listen.py): `backend/dsp/live_listen.py`

### Other components

- **Guitar learner**

## Connections

- Guitar learner → App routing: opens (evidence: `src/App.jsx`)
- App routing → Song upload: routes to (evidence: `src/App.jsx`)
- App routing → Analysis results: routes to (evidence: `src/App.jsx`)
- App routing → Note practice: routes to (evidence: `src/App.jsx`)
- App routing → Chord library: routes to (evidence: `src/App.jsx`)
- App routing → Chord detail: routes to (evidence: `src/App.jsx`)
- App routing → Tuner UI: routes to (evidence: `src/App.jsx`)
- App routing → Character shop: routes to (evidence: `src/App.jsx`)
- App routing → Live transcription UI: routes to (evidence: `src/App.jsx`)
- Guitar learner → Song upload: submits audio (evidence: `README.md`)
- Song upload → FastAPI service: uploads file (evidence: `README.md`)
- FastAPI service → Audio conversion: converts upload (evidence: `backend/main.py`)
- FastAPI service → Chord analysis: analyzes audio (evidence: `backend/main.py`)
- FastAPI service → Note highway generation: builds highway (evidence: `backend/main.py`)
- FastAPI service → Onset note detection: detects notes (evidence: `backend/main.py`)
- FastAPI service → Chord tab generation: builds tabs (evidence: `backend/main.py`)
- Chord analysis → Chord detection: uses detection (evidence: `backend/dsp/analyze_song.py`)
- FastAPI service → Analysis results: returns analysis (evidence: `README.md`)
- Analysis results → Note practice: passes song data (evidence: `src/pages/Practice.jsx`)
- Note practice → Practice visualizers: renders practice (evidence: `src/pages/Practice.jsx`)
- Note practice → Guitar fretboard: renders notes (evidence: `src/pages/Practice.jsx`)
- Chord library → Chord detail: opens chord
- Chord detail → Chord diagrams: renders diagram (evidence: `src/pages/ChordDetail.jsx`)
- Live transcription UI → Live note display: shows notes (evidence: `README.md`)
- Live transcription UI → FastAPI service: connects WebSocket (evidence: `README.md`)
- FastAPI service → Live pitch stream: streams events (evidence: `backend/main.py`)
- Note practice → Live note display: uses live notes (evidence: `src/pages/Practice.jsx`)
- Character shop → Character and XP state: reads character state (evidence: `src/pages/CharacterShop.jsx`)
- App routing → Character and XP state: provides state (evidence: `src/App.jsx`)
- Chord library → Chord diagrams: shows diagrams (evidence: `README.md`)
