"Sound" is the innovative application we intend to build, aiming to fully implement the logic, features, and functionalities of a digital music streaming service. Our goal is to provide a seamless and immersive music listening experience, allowing the integration of features that redefine the way people engage with music.
Build the project with the following steps:
- Clone the repository
- Open the project in your IDE (IntelliJ IDEA recommended)
- Make sure you are using the JDK version 17.0.9 and Gradle version 8.5
- Browse the Gradle
build.gradlefile for details of dependencies and versions used in the project
Dependencies used in the project:- Spring Web
- MySQL Driver
- Validation
- Mockito
- Configure the database connection in the
application.propertiesfile (check the Database section below for more info) - Run the project
Mockito, a Java-based framework used for unit testing, is used to test some services of the project, ensuring the reliability and functionality of key components.
To run the tests, you have a couple of options:
- Run all tests using the command
./gradlew testin the project's root directory. - Open the project in your preferred IDE (IntelliJ IDEA recommended), navigate to the
src/test/javadirectory, and right-click on the package or individual test file. Choose the "Run [TestName]" option from the context menu.
MySQL or MariaDB can be used as the database for this project. Prior to configuring the database connection you have to create a database. The database connection can be configured in the application.properties file, with the appropriate values for the following properties:
server.port=8080
spring.datasource.url=jdbc:mysql://localhost:3306/[database_name]
spring.datasource.username=[username]
spring.jpa.properties.hibernate.dialect=org.hibernate.dialect.MySQLDialect
spring.jpa.hibernate.ddl-auto=update
spring.jpa.show-sql=true
The Entity-Relationship (ER) Diagram illustrates the structure of our database. This visual representation showcases the relationships between entities in our system. Use the diagram as a reference to understand the data model and the connections between key components in our application.
http://localhost:8080
Please reference the Endpoint Documentation page to read in detail about all the endpoints of the project.
GET /albums: Gets all the albumsGET /albums/{id}: Gets a specific albumPOST /artists/{artistId}/albums: Creates an albumPUT /artists/{artistId}/albums/{albumId}: Updates an albumDELETE /artists/{artistId}/albums/{albumId}: Deletes an album
GET /songs: Gets all the songsGET /songs/{id}: Gets a specific songPOST /artists/create-song: Creates a songPUT /artists/songs/{songId}: Updates a songDELETE /artists/songs/{songId}: Deletes a song
GET /playlists: Gets all playlistsGET /playlists/{id}: Gets a specific playlistPOST /playlists: Creates a playlistPUT /playlists/{id}: Updates a playlistDELETE /playlists/{id}: Deletes a playlistPOST /playlists/{playlistId}/add-song/{songId}: Adds a song to a playlistDELETE /playlists/{playlistId}/remove-song/{songId}: Removes a song from a playlist
GET /users: Gets all usersGET /users/{id}: Gets a specific userPOST /users: Creates a userPUT /users/{id}: Updates a userDELETE /users/{id}: Deletes a userPOST /users/{userId}/play-song/{songId}: Plays a songGET /users/{userId}/recommendations: Gets the recommended songs
GET /artists: Gets all artistsGET /artists/{id}: Gets a specific artistPOST /artists: Creates an artistPUT /artists/{id}: Updates an artistDELETE /artists/{id}: Deletes an artist
GET /genres: Gets all genresGET /genres/{id}: Gets a specific genrePOST /genres: Creates a genrePUT /genres/{id}: Updates a genreDELETE /genres/{id}: Deletes a genre
