# jhonoreb711-dev/mistletune architecture

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

- Interactive diagram: https://gitdiagram.com/jhonoreb711-dev/mistletune
- Repository: https://github.com/jhonoreb711-dev/mistletune

## Overview

MistleTunes is an Expo/React Native local music player. The main user journey is importing a music folder, browsing and playing tracks, and viewing lyrics; generated lyrics can use local transcription or the documented companion service. Separate product branches cover podcasts and theme customization. The graph follows explicit imports and the README; several routes and subsystems are unsampled, so their internal links are omitted rather than inferred.

Main entry points: [`components/PlaybackContext.jsx`](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/PlaybackContext.jsx) (Playback State), [`app/Music.jsx`](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/Music.jsx) (Music Home), [`app/podcast.jsx`](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/podcast.jsx) (Podcast Library), [`app/podcast-create.jsx`](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/podcast-create.jsx) (Add Podcasts)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_library["Music Library"]
  node_music["Music Home<br/>[Music.jsx]"]
  node_recent["Recently Played<br/>[RecentlyPlayed.jsx]"]
  node_library_io["Local Library"]
  node_identity["Library Identity"]
end

subgraph group_playback["Playback &amp; Lyrics"]
  node_playback_ctx["Playback State"]
  node_player_ui["Player Screen<br/>[PlayerScreen.jsx]"]
  node_lyrics_store[("Lyrics Storage<br/>[lyricsStorage.js]")]
  node_lyrics_parse["Lyrics Parser<br/>[lyricsParser.js]"]
  node_offline_transcribe["Offline Transcription"]
  node_batch_transcribe["Batch Transcription"]
  node_lyrics_server["Lyrics Service<br/>[server.py]"]
  node_lrclib["LRCLIB Lookup<br/>[lrclib.py]"]
end

subgraph group_podcasts["Podcasts"]
  node_podcast_route["Podcast Library<br/>[podcast.jsx]"]
  node_podcast_create["Add Podcasts<br/>[podcast-create.jsx]"]
  node_podcast_store[("Podcast Storage")]
  node_video_files["Video Files"]
  node_podcast_collections["Podcast Collections"]
end

subgraph group_experience["Themes &amp; App"]
  node_theme_provider["Theme State<br/>[ThemeProvider.jsx]"]
  node_theme_catalog["Theme Catalog<br/>[index.js]"]
  node_theme_picker["Theme Picker<br/>[ThemePicker.jsx]"]
  node_app_entry["App Intro<br/>[index.jsx]"]
end

node_user(("Listener"))

node_user -->|"browses"| node_music
node_music -->|"uses playback"| node_playback_ctx
node_music -->|"loads library"| node_library_io
node_music -->|"shows history"| node_recent
node_playback_ctx -->|"imports tracks"| node_library_io
node_playback_ctx -->|"resolves library"| node_identity
node_playback_ctx -.->|"provides state"| node_player_ui
node_playback_ctx -->|"loads lyrics"| node_lyrics_store
node_playback_ctx -->|"generates lyrics"| node_offline_transcribe
node_playback_ctx -->|"batch generates"| node_batch_transcribe
node_lyrics_store -->|"parses text"| node_lyrics_parse
node_user -->|"opens podcasts"| node_podcast_route
node_podcast_route -->|"manages episodes"| node_podcast_store
node_podcast_route -->|"loads collections"| node_podcast_collections
node_user -->|"adds videos"| node_podcast_create
node_podcast_create -->|"saves episodes"| node_podcast_store
node_podcast_create -->|"copies videos"| node_video_files
node_podcast_store -->|"deletes files"| node_video_files
node_user -->|"customizes theme"| node_theme_picker
node_theme_picker -->|"selects theme"| node_theme_provider
node_theme_provider -->|"reads definitions"| node_theme_catalog
node_app_entry -->|"waits for theme"| node_theme_provider
node_lyrics_server -->|"looks up lyrics"| node_lrclib
node_user -.->|"requests transcription"| node_lyrics_server

click node_music "https://github.com/jhonoreb711-dev/mistletune/blob/main/app/Music.jsx"
click node_recent "https://github.com/jhonoreb711-dev/mistletune/blob/main/app/RecentlyPlayed.jsx"
click node_library_io "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/localMusicLibrary.js"
click node_identity "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/localLibraryIdentity.js"
click node_playback_ctx "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/PlaybackContext.jsx"
click node_player_ui "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/PlayerScreen.jsx"
click node_lyrics_store "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/lyricsStorage.js"
click node_lyrics_parse "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/lyricsParser.js"
click node_offline_transcribe "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/offlineTranscription.js"
click node_batch_transcribe "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/batchTranscription.js"
click node_lyrics_server "https://github.com/jhonoreb711-dev/mistletune/blob/main/server/server.py"
click node_lrclib "https://github.com/jhonoreb711-dev/mistletune/blob/main/server/lrclib.py"
click node_podcast_route "https://github.com/jhonoreb711-dev/mistletune/blob/main/app/podcast.jsx"
click node_podcast_create "https://github.com/jhonoreb711-dev/mistletune/blob/main/app/podcast-create.jsx"
click node_podcast_store "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/podcastVideoStorage.js"
click node_video_files "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/videoFileService.js"
click node_podcast_collections "https://github.com/jhonoreb711-dev/mistletune/blob/main/components/podcastCollections.js"
click node_theme_provider "https://github.com/jhonoreb711-dev/mistletune/blob/main/themes/ThemeProvider.jsx"
click node_theme_catalog "https://github.com/jhonoreb711-dev/mistletune/blob/main/themes/index.js"
click node_theme_picker "https://github.com/jhonoreb711-dev/mistletune/blob/main/themes/ThemePicker.jsx"
click node_app_entry "https://github.com/jhonoreb711-dev/mistletune/blob/main/app/index.jsx"

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_music,node_recent,node_library_io,node_identity toneBlue
class node_playback_ctx,node_player_ui,node_lyrics_store,node_lyrics_parse,node_offline_transcribe,node_batch_transcribe,node_lyrics_server,node_lrclib toneAmber
class node_podcast_route,node_podcast_create,node_podcast_store,node_video_files,node_podcast_collections toneMint
class node_theme_provider,node_theme_catalog,node_theme_picker,node_app_entry toneRose
class node_user toneIndigo
```

## Components

### Music Library

- [Music Home](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/Music.jsx): `app/Music.jsx`
- [Recently Played](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/RecentlyPlayed.jsx): `app/RecentlyPlayed.jsx`
- [Local Library](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/localMusicLibrary.js): `components/localMusicLibrary.js`
- [Library Identity](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/localLibraryIdentity.js): `components/localLibraryIdentity.js`

### Playback & Lyrics

- [Playback State](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/PlaybackContext.jsx): `components/PlaybackContext.jsx`
- [Player Screen](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/PlayerScreen.jsx): `components/PlayerScreen.jsx`
- [Lyrics Storage](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/lyricsStorage.js): `components/lyricsStorage.js`
- [Lyrics Parser](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/lyricsParser.js): `components/lyricsParser.js`
- [Offline Transcription](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/offlineTranscription.js): `components/offlineTranscription.js`
- [Batch Transcription](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/batchTranscription.js): `components/batchTranscription.js`
- [Lyrics Service](https://github.com/jhonoreb711-dev/mistletune/blob/main/server/server.py): `server/server.py`
- [LRCLIB Lookup](https://github.com/jhonoreb711-dev/mistletune/blob/main/server/lrclib.py): `server/lrclib.py`

### Podcasts

- [Podcast Library](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/podcast.jsx): `app/podcast.jsx`
- [Add Podcasts](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/podcast-create.jsx): `app/podcast-create.jsx`
- [Podcast Storage](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/podcastVideoStorage.js): `components/podcastVideoStorage.js`
- [Video Files](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/videoFileService.js): `components/videoFileService.js`
- [Podcast Collections](https://github.com/jhonoreb711-dev/mistletune/blob/main/components/podcastCollections.js): `components/podcastCollections.js`

### Themes & App

- [Theme State](https://github.com/jhonoreb711-dev/mistletune/blob/main/themes/ThemeProvider.jsx): `themes/ThemeProvider.jsx`
- [Theme Catalog](https://github.com/jhonoreb711-dev/mistletune/blob/main/themes/index.js): `themes/index.js`
- [Theme Picker](https://github.com/jhonoreb711-dev/mistletune/blob/main/themes/ThemePicker.jsx): `themes/ThemePicker.jsx`
- [App Intro](https://github.com/jhonoreb711-dev/mistletune/blob/main/app/index.jsx): `app/index.jsx`

### Other components

- **Listener**

## Connections

- Listener → Music Home: browses (evidence: `app/Music.jsx`)
- Music Home → Playback State: uses playback (evidence: `app/Music.jsx`)
- Music Home → Local Library: loads library (evidence: `app/Music.jsx`)
- Music Home → Recently Played: shows history (evidence: `app/Music.jsx`)
- Playback State → Local Library: imports tracks (evidence: `components/PlaybackContext.jsx`)
- Playback State → Library Identity: resolves library (evidence: `components/PlaybackContext.jsx`)
- Playback State → Player Screen: provides state
- Playback State → Lyrics Storage: loads lyrics (evidence: `components/PlaybackContext.jsx`)
- Playback State → Offline Transcription: generates lyrics (evidence: `components/PlaybackContext.jsx`)
- Playback State → Batch Transcription: batch generates (evidence: `components/PlaybackContext.jsx`)
- Lyrics Storage → Lyrics Parser: parses text (evidence: `components/lyricsStorage.js`)
- Listener → Podcast Library: opens podcasts (evidence: `app/podcast.jsx`)
- Podcast Library → Podcast Storage: manages episodes (evidence: `app/podcast.jsx`)
- Podcast Library → Podcast Collections: loads collections (evidence: `app/podcast.jsx`)
- Listener → Add Podcasts: adds videos (evidence: `app/podcast-create.jsx`)
- Add Podcasts → Podcast Storage: saves episodes (evidence: `app/podcast-create.jsx`)
- Add Podcasts → Video Files: copies videos (evidence: `app/podcast-create.jsx`)
- Podcast Storage → Video Files: deletes files (evidence: `components/podcastVideoStorage.js`)
- Listener → Theme Picker: customizes theme (evidence: `themes/ThemePicker.jsx`)
- Theme Picker → Theme State: selects theme (evidence: `themes/ThemePicker.jsx`)
- Theme State → Theme Catalog: reads definitions (evidence: `themes/ThemeProvider.jsx`)
- App Intro → Theme State: waits for theme (evidence: `app/index.jsx`)
- Lyrics Service → LRCLIB Lookup: looks up lyrics (evidence: `server/server.py`)
- Listener → Lyrics Service: requests transcription
