# jotalexvalencia/reactnativespotifyminiclone architecture

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

- Interactive diagram: https://gitdiagram.com/jotalexvalencia/reactnativespotifyminiclone
- Repository: https://github.com/jotalexvalencia/reactnativespotifyminiclone

## Overview

SpotifyMusic08 is a React Native audio player. The runtime flow initializes Track Player and loads the configured playlist, then presents playback controls, track details, artwork and seek/progress UI. Remote notification, lock-screen and headset controls are handled by the playback service. The README documents background playback and queue repeat; native Android/iOS shells host the app. Edges are limited to relationships shown in excerpts or explicitly documented; the native hosting and some documented capabilities are not expanded into unsampled implementation details.

Main entry points: [`src/screens/MusicPlayer.tsx`](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/screens/MusicPlayer.tsx) (Music player screen), [`musicPlayerServices.js`](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/musicPlayerServices.js) (Track Player service), [`index.js`](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/index.js) (JS entry), [`src/App.tsx`](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/App.tsx) (Player initialization)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_startup["App startup"]
  node_js_entry["JS entry<br/>[index.js]"]
  node_app_init["Player initialization<br/>[App.tsx]"]
end

subgraph group_catalog["Playlist data"]
  node_catalog_data["Playlist tracks<br/>[constants.ts]"]
  node_audio_files["Bundled audio"]
end

subgraph group_player_ui["Player interface"]
  node_music_screen["Music player screen<br/>[MusicPlayer.tsx]"]
  node_controls["Playback controls<br/>[ControlCenter.tsx]"]
  node_song_info["Track details<br/>[SongInfo.tsx]"]
  node_song_slider["Progress slider<br/>[SongSlider.jsx]"]
end

subgraph group_playback["Audio playback"]
  node_player_service["Track Player service"]
  node_track_player["Track Player engine"]
  node_remote_controls["Remote controls"]
end

node_listener(("Listener"))
node_native_app["Native app host"]
node_artwork_service["Artwork source"]

node_listener -->|"opens app"| node_native_app
node_native_app -.->|"loads entry"| node_js_entry
node_js_entry -->|"registers"| node_app_init
node_js_entry -->|"registers service"| node_player_service
node_app_init -->|"initializes and loads"| node_player_service
node_player_service -->|"loads playlist"| node_catalog_data
node_catalog_data -->|"references audio"| node_audio_files
node_app_init -->|"renders"| node_music_screen
node_music_screen -->|"renders playlist"| node_catalog_data
node_music_screen -->|"renders track details"| node_song_info
node_music_screen -->|"renders progress"| node_song_slider
node_music_screen -->|"renders controls"| node_controls
node_music_screen -->|"reads track events"| node_track_player
node_music_screen -.->|"displays artwork"| node_artwork_service
node_controls -->|"controls playback"| node_track_player
node_controls -.->|"imports remote service"| node_player_service
node_song_slider -->|"seeks and reads progress"| node_track_player
node_player_service -->|"sets up queue and repeat"| node_track_player
node_player_service -->|"registers handlers"| node_remote_controls
node_remote_controls -->|"dispatches commands"| node_track_player

click node_js_entry "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/index.js"
click node_app_init "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/App.tsx"
click node_catalog_data "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/constants.ts"
click node_audio_files "https://github.com/jotalexvalencia/reactnativespotifyminiclone/tree/main/src/assets/audio"
click node_music_screen "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/screens/MusicPlayer.tsx"
click node_controls "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/components/ControlCenter.tsx"
click node_song_info "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/components/SongInfo.tsx"
click node_song_slider "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/components/SongSlider.jsx"
click node_player_service "https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/musicPlayerServices.js"

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_js_entry,node_app_init toneBlue
class node_catalog_data,node_audio_files toneAmber
class node_music_screen,node_controls,node_song_info,node_song_slider toneMint
class node_player_service,node_track_player,node_remote_controls toneRose
class node_listener,node_native_app,node_artwork_service toneIndigo
```

## Components

### App startup

- [JS entry](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/index.js): `index.js`
- [Player initialization](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/App.tsx): `src/App.tsx`

### Playlist data

- [Playlist tracks](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/constants.ts): `src/constants.ts`
- [Bundled audio](https://github.com/jotalexvalencia/reactnativespotifyminiclone/tree/main/src/assets/audio): `src/assets/audio`

### Player interface

- [Music player screen](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/screens/MusicPlayer.tsx): `src/screens/MusicPlayer.tsx`
- [Playback controls](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/components/ControlCenter.tsx): `src/components/ControlCenter.tsx`
- [Track details](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/components/SongInfo.tsx): `src/components/SongInfo.tsx`
- [Progress slider](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/src/components/SongSlider.jsx): `src/components/SongSlider.jsx`

### Audio playback

- [Track Player service](https://github.com/jotalexvalencia/reactnativespotifyminiclone/blob/main/musicPlayerServices.js): `musicPlayerServices.js`
- **Track Player engine**
- **Remote controls**

### Other components

- **Listener**
- **Native app host**
- **Artwork source**

## Connections

- Listener → Native app host: opens app (evidence: `README.md`)
- Native app host → JS entry: loads entry
- JS entry → Player initialization: registers (evidence: `index.js`)
- JS entry → Track Player service: registers service (evidence: `index.js`)
- Player initialization → Track Player service: initializes and loads (evidence: `src/App.tsx`)
- Track Player service → Playlist tracks: loads playlist (evidence: `musicPlayerServices.js`)
- Playlist tracks → Bundled audio: references audio (evidence: `src/constants.ts`)
- Player initialization → Music player screen: renders (evidence: `src/App.tsx`)
- Music player screen → Playlist tracks: renders playlist (evidence: `src/screens/MusicPlayer.tsx`)
- Music player screen → Track details: renders track details (evidence: `src/screens/MusicPlayer.tsx`)
- Music player screen → Progress slider: renders progress (evidence: `src/screens/MusicPlayer.tsx`)
- Music player screen → Playback controls: renders controls (evidence: `src/screens/MusicPlayer.tsx`)
- Music player screen → Track Player engine: reads track events (evidence: `src/screens/MusicPlayer.tsx`)
- Music player screen → Artwork source: displays artwork
- Playback controls → Track Player engine: controls playback (evidence: `src/components/ControlCenter.tsx`)
- Playback controls → Track Player service: imports remote service (evidence: `src/components/ControlCenter.tsx`)
- Progress slider → Track Player engine: seeks and reads progress (evidence: `src/components/SongSlider.jsx`)
- Track Player service → Track Player engine: sets up queue and repeat (evidence: `musicPlayerServices.js`)
- Track Player service → Remote controls: registers handlers (evidence: `musicPlayerServices.js`)
- Remote controls → Track Player engine: dispatches commands
