Design Music Streaming Service like Spotify
| Difficulty: Hard | Source: awesome-low-level-design |
Requirements
- Browse/search songs, albums, artists
- Create/manage playlists
- User authentication/authorization
- Play, pause, skip, seek within songs
- Recommendations based on preferences/history
- Handle concurrent requests
- Scalable
- Extensible (social sharing, offline playback)
Class Diagram

Classes, Interfaces and Enumerations
| Class/Interface | Description |
|---|---|
| Song | Core music entity with title, artist, album, duration |
| Album | Collection of songs by an artist with release info |
| Artist | Artist name, albums, songs catalog |
| User | Id, username, password, playlists list |
| Playlist | List of songs with add/remove operations |
| MusicLibrary | Singleton; stores and manages songs, albums, artists |
| UserManager | Singleton; registration, login |
| MusicPlayer | Play, pause, skip, seek functionality |
| MusicRecommender | Singleton; recommendations from preferences/history |
Design Patterns Used
| Pattern | Application |
|---|---|
| Singleton | MusicLibrary centralizes the music catalog; UserManager handles all user operations; MusicRecommender provides a single recommendation engine |
Code Implementations
| Language | Source Code |
|---|---|
| Java | View on GitHub |
| Python | View on GitHub |
| C++ | View on GitHub |
| C# | View on GitHub |
| Go | View on GitHub |