# galih1250/music-player architecture

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

- Interactive diagram: https://gitdiagram.com/galih1250/music-player
- Repository: https://github.com/galih1250/music-player

## Overview

This Laravel/Inertia application provides a song library with song listing, artist filtering, and song create, update, and delete operations, alongside Jetstream/Fortify account features. A browser request enters Laravel’s HTTP kernel, is routed to application handlers, and returns JSON or an Inertia page rendered by Vue. Song records and uploaded media are handled separately. The tree also shows profile, API-token, and two-factor screens; their detailed server-side wiring is not established by the sampled excerpts, so those links are omitted.

Main entry points: [`app/Http/Controllers/SongController.php`](https://github.com/galih1250/music-player/blob/main/app/Http/Controllers/SongController.php) (Song operations), [`public/index.php`](https://github.com/galih1250/music-player/blob/main/public/index.php) (Laravel entry), [`app/Models/User.php`](https://github.com/galih1250/music-player/blob/main/app/Models/User.php) (User accounts), [`app/Providers/FortifyServiceProvider.php`](https://github.com/galih1250/music-player/blob/main/app/Providers/FortifyServiceProvider.php) (Fortify workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_request["HTTP and routing"]
  node_entry["Laravel entry<br/>[index.php]"]
  node_bootstrap["App bootstrap<br/>[app.php]"]
  node_http["HTTP middleware<br/>[Kernel.php]"]
  node_routing["Route registration"]
  node_web_routes["Web routes<br/>[web.php]"]
end

subgraph group_songs["Song library"]
  node_song_controller["Song operations<br/>[SongController.php]"]
  node_song_model[("Song records<br/>[Song.php]")]
  node_media["Uploaded media<br/>[SongController.php]"]
end

subgraph group_accounts["Accounts and security"]
  node_auth_provider["Fortify workflows"]
  node_create_user["User registration<br/>[CreateNewUser.php]"]
  node_update_user["Profile updates"]
  node_delete_user["Account deletion<br/>[DeleteUser.php]"]
  node_jetstream["Jetstream setup"]
  node_user_model[("User accounts<br/>[User.php]")]
end

subgraph group_client["Vue interface"]
  node_dashboard["Song dashboard<br/>[Dashboard.vue]"]
  node_inertia["Inertia Vue startup<br/>[app.js]"]
  node_auth_pages["Auth pages<br/>[Register.vue]"]
  node_profile_pages["Profile features<br/>[Show.vue]"]
  node_api_tokens["API token manager"]
  node_two_factor["Two-factor settings"]
end

node_browser(("Browser user"))

node_browser -->|"sends request"| node_entry
node_entry -->|"loads app"| node_bootstrap
node_entry -->|"dispatches request"| node_http
node_routing -->|"registers routes"| node_web_routes
node_web_routes -->|"routes requests"| node_song_controller
node_song_controller -->|"queries and saves"| node_song_model
node_song_controller -->|"stores and deletes"| node_media
node_song_controller -->|"renders page"| node_dashboard
node_inertia -->|"resolves page"| node_dashboard
node_auth_provider -->|"registers action"| node_create_user
node_auth_provider -->|"registers action"| node_update_user
node_create_user -->|"creates user"| node_user_model
node_update_user -->|"updates user"| node_user_model
node_jetstream -->|"registers action"| node_delete_user
node_delete_user -->|"deletes user"| node_user_model

click node_entry "https://github.com/galih1250/music-player/blob/main/public/index.php"
click node_bootstrap "https://github.com/galih1250/music-player/blob/main/bootstrap/app.php"
click node_http "https://github.com/galih1250/music-player/blob/main/app/Http/Kernel.php"
click node_routing "https://github.com/galih1250/music-player/blob/main/app/Providers/RouteServiceProvider.php"
click node_web_routes "https://github.com/galih1250/music-player/blob/main/routes/web.php"
click node_song_controller "https://github.com/galih1250/music-player/blob/main/app/Http/Controllers/SongController.php"
click node_song_model "https://github.com/galih1250/music-player/blob/main/app/Models/Song.php"
click node_media "https://github.com/galih1250/music-player/blob/main/app/Http/Controllers/SongController.php"
click node_dashboard "https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Dashboard.vue"
click node_inertia "https://github.com/galih1250/music-player/blob/main/resources/js/app.js"
click node_auth_provider "https://github.com/galih1250/music-player/blob/main/app/Providers/FortifyServiceProvider.php"
click node_create_user "https://github.com/galih1250/music-player/blob/main/app/Actions/Fortify/CreateNewUser.php"
click node_update_user "https://github.com/galih1250/music-player/blob/main/app/Actions/Fortify/UpdateUserProfileInformation.php"
click node_delete_user "https://github.com/galih1250/music-player/blob/main/app/Actions/Jetstream/DeleteUser.php"
click node_jetstream "https://github.com/galih1250/music-player/blob/main/app/Providers/JetstreamServiceProvider.php"
click node_user_model "https://github.com/galih1250/music-player/blob/main/app/Models/User.php"
click node_auth_pages "https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Auth/Register.vue"
click node_profile_pages "https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Profile/Show.vue"
click node_api_tokens "https://github.com/galih1250/music-player/blob/main/resources/js/Pages/API/Partials/ApiTokenManager.vue"
click node_two_factor "https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Profile/Partials/TwoFactorAuthenticationForm.vue"

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_entry,node_bootstrap,node_http,node_routing,node_web_routes,node_browser toneBlue
class node_song_controller,node_song_model,node_media toneAmber
class node_auth_provider,node_create_user,node_update_user,node_delete_user,node_jetstream,node_user_model toneMint
class node_dashboard,node_inertia,node_auth_pages,node_profile_pages,node_api_tokens,node_two_factor toneRose
```

## Components

### HTTP and routing

- [Laravel entry](https://github.com/galih1250/music-player/blob/main/public/index.php): `public/index.php`
- [App bootstrap](https://github.com/galih1250/music-player/blob/main/bootstrap/app.php): `bootstrap/app.php`
- [HTTP middleware](https://github.com/galih1250/music-player/blob/main/app/Http/Kernel.php): `app/Http/Kernel.php`
- [Route registration](https://github.com/galih1250/music-player/blob/main/app/Providers/RouteServiceProvider.php): `app/Providers/RouteServiceProvider.php`
- [Web routes](https://github.com/galih1250/music-player/blob/main/routes/web.php): `routes/web.php`

### Song library

- [Song operations](https://github.com/galih1250/music-player/blob/main/app/Http/Controllers/SongController.php): `app/Http/Controllers/SongController.php`
- [Song records](https://github.com/galih1250/music-player/blob/main/app/Models/Song.php): `app/Models/Song.php`
- [Uploaded media](https://github.com/galih1250/music-player/blob/main/app/Http/Controllers/SongController.php): `app/Http/Controllers/SongController.php`

### Accounts and security

- [Fortify workflows](https://github.com/galih1250/music-player/blob/main/app/Providers/FortifyServiceProvider.php): `app/Providers/FortifyServiceProvider.php`
- [User registration](https://github.com/galih1250/music-player/blob/main/app/Actions/Fortify/CreateNewUser.php): `app/Actions/Fortify/CreateNewUser.php`
- [Profile updates](https://github.com/galih1250/music-player/blob/main/app/Actions/Fortify/UpdateUserProfileInformation.php): `app/Actions/Fortify/UpdateUserProfileInformation.php`
- [Account deletion](https://github.com/galih1250/music-player/blob/main/app/Actions/Jetstream/DeleteUser.php): `app/Actions/Jetstream/DeleteUser.php`
- [Jetstream setup](https://github.com/galih1250/music-player/blob/main/app/Providers/JetstreamServiceProvider.php): `app/Providers/JetstreamServiceProvider.php`
- [User accounts](https://github.com/galih1250/music-player/blob/main/app/Models/User.php): `app/Models/User.php`

### Vue interface

- [Song dashboard](https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Dashboard.vue): `resources/js/Pages/Dashboard.vue`
- [Inertia Vue startup](https://github.com/galih1250/music-player/blob/main/resources/js/app.js): `resources/js/app.js`
- [Auth pages](https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Auth/Register.vue): `resources/js/Pages/Auth/Register.vue`
- [Profile features](https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Profile/Show.vue): `resources/js/Pages/Profile/Show.vue`
- [API token manager](https://github.com/galih1250/music-player/blob/main/resources/js/Pages/API/Partials/ApiTokenManager.vue): `resources/js/Pages/API/Partials/ApiTokenManager.vue`
- [Two-factor settings](https://github.com/galih1250/music-player/blob/main/resources/js/Pages/Profile/Partials/TwoFactorAuthenticationForm.vue): `resources/js/Pages/Profile/Partials/TwoFactorAuthenticationForm.vue`

### Other components

- **Browser user**

## Connections

- Browser user → Laravel entry: sends request
- Laravel entry → App bootstrap: loads app (evidence: `public/index.php`)
- Laravel entry → HTTP middleware: dispatches request (evidence: `public/index.php`)
- Route registration → Web routes: registers routes (evidence: `app/Providers/RouteServiceProvider.php`)
- Web routes → Song operations: routes requests (evidence: `routes/web.php`)
- Song operations → Song records: queries and saves (evidence: `app/Http/Controllers/SongController.php`)
- Song operations → Uploaded media: stores and deletes (evidence: `app/Http/Controllers/SongController.php`)
- Song operations → Song dashboard: renders page (evidence: `app/Http/Controllers/SongController.php`)
- Inertia Vue startup → Song dashboard: resolves page (evidence: `resources/js/app.js`)
- Fortify workflows → User registration: registers action (evidence: `app/Providers/FortifyServiceProvider.php`)
- Fortify workflows → Profile updates: registers action (evidence: `app/Providers/FortifyServiceProvider.php`)
- User registration → User accounts: creates user (evidence: `app/Actions/Fortify/CreateNewUser.php`)
- Profile updates → User accounts: updates user (evidence: `app/Actions/Fortify/UpdateUserProfileInformation.php`)
- Jetstream setup → Account deletion: registers action (evidence: `app/Providers/JetstreamServiceProvider.php`)
- Account deletion → User accounts: deletes user (evidence: `app/Actions/Jetstream/DeleteUser.php`)
