This project is a Spotify Clone implemented in C++ with integrated YouTube APIs, providing playing capabilities. The application utilizes various libraries for seamless functionality.
Ensure that you have the following libraries installed before running the project:
-
CURL
-
Nlohmann JSON
-
MPV
Follow these steps to set up the project on your local machine:
-
Install CURL:
- Follow the CURL documentation for installation instructions.
-
Install Nlohmann JSON:
- Clone the Nlohmann JSON GitHub repository and follow the provided installation instructions.
-
Install MPV:
- Download and install MPV from the official website.
-
Clone the Spotify Clone repository:
git clone https://github.com/aahalani/spotifyclonecpp.git cd spotifyclonecpp
- Clone the repository.
- Update
clientIDandclientSecretwith your Spotify application credentials. - Update the
apiKeyvariable with your YouTube API key. - Compile the code using a C++ compiler. While compiling, incude the path for the
nlohmann/jsonlibrary. - Use the command
g++ -std=c++11 -o res spotify.cpp -lcurl -l/Users/username/Documents/json-develop/include(Change the path according to the location of thejsonlibrary on your machine and-std=c++11is optional) - Run the compiled executable.
- Account Creation/Login: Users can create an account and log in using a username/password.
- Search: Search for songs using the Spotify API and play them.
- Play Favorites: Play a playlist of favorite songs added by the user.
- YouTube Integration: Fetches YouTube videos related to searched songs.
- Start the application.
- Choose between creating an account or logging in.
- After logging in, choose options to search for songs, play favorites, or log out.
Block Diagram:
- This application utilizes the Spotify and YouTube APIs.
- The
nlohmann/jsonlibrary for JSON parsing. MPVandCURL- Avval and Co.
