RidePal is a web application that allows users to generate playlists tailored to their musical preferences for specific travel durations. The application utilizes external services such as Microsoft Bing Maps, Deezer and Pixabay to calculate travel durations, fetch music data and attach an image to a newly created playlist in the system.
- Technologies and Principles
- Main Functionalities
- Public Part
- Private Part
- Administration Part
- REST API
- External Services
- Database
- Installation
- Java, Spring Boot, Spring MVC, Spring Security, Lombok, Thymeleaf, JUnit, Mockito, HTML, CSS, JavaScript, Hibernate, MariaDB
- DRY, KISS, YAGNI, SOLID, OOP, REST API design
- Service layer tests have over 80% code coverage
- Multilayered architecture
- Users can enter starting and destination addresses, select musical genres,adjust the each genre's percentage in a playlist, and click "Begin Journey" to create a playlist
- RidePal calculates travel duration and generates playlists with tracks from specified genres to match the travel time
- Playlists are saved under the user's profile for future listening
- Users can browse playlists created by other users, filter by total duration and genre tags
- Playlists are sorted by average rank in descending order by default
- Users can configure playlist generation algorithm options, including genre preferences and track preview
- There is an option to select 'Use Top Tracks', which will generate a playlist using the highest ranked tracks from the database
- There is an option to select 'Allow tracks from same artists', which includes more than 1 track per artist in the playlist
- Admins have the choice to fetch all genres from the Deezer's database by a single click
- By default, there is a time period after which all genres are automatically fetched from Deezer
- The time can be configured by all admins
- Visible without authentication
- Users have access to the registration page, where they can create a new account
- On the login page there is an option to use Google as a third party authentication, which saves newcomers time for registration
- Unauthenticated users also have access to the home page, where they can see statistics about the website, top 10 playlists by rank and all genres.
- Lastly, the playlists page is also open for unauthenitcated users, where playlists can be filtered by genre, minimum/maximum duration in minutes
- Generating a new playlist
- Checking others users' accounts
- Editing/Deleting owned playlists
- Editing of a playlist lets user change its title and image
System administrators can administer all major information objects in the system. On top of the regular user capabilities, the administrators have the following capabilities:
- Administrators are able to edit/delete users and other administrators
- Administrators are able to edit/delete over the playlists
- Administrators are able to manually trigger Genre synchronization and configure its time period
- Link to the documentation in Swagger -> http://localhost:8080/api (access after you have successfully configured the project)
Deezer's API (https://developers.deezer.com/api)
- Used to fetch tracks, genres, albums and artists
Microsoft Bing Maps's Distance Matrix API (https://www.microsoft.com/en-us/maps/bing-maps/distance-matrix)
- Used to calculate distance and duration between two waypoints. Each waypoint is represented as a combination of longitude and latitude
Microsoft Bing Maps's Locations API (https://learn.microsoft.com/en-us/bingmaps/rest-services/locations/)
- Used to get the latitude and longitude of the starting location and final destination, which are input as location names in our playlist generator.
Pixabay's API (https://pixabay.com/bg/service/about/api/)
- Used to fetch an image every time a new playlist is created
- Java Development Kit (JDK)
- MariaDB
- Clone the project -> https://github.com/RidePal-Team-1/RidePal-project.git
- Configure the database connection in application.properties:
- Build and Run the project using Maven
- As you have successfully established connection with the database, you must execute the two SQL scripts located in the 'db' folder in 'src'. First create the database and then insert the data in it.
- You do not need an API key to work with RidePal, however using Deezer API, Microsoft Bing Maps API and Pixabay API you need to get API key for each API. Check the links provided to the APIs for more information
- After obtaining all API keys, you can access the Config classes of each API and paste your API key.
- Access the application at http://localhost:8080 in your web browser.
- As the project is now successfuly working you can also access the Swagger Documentation at http://localhost:8080/api
spring.datasource.url=jdbc:mariadb://localhost:3306/your_database
spring.datasource.username=your_username
spring.datasource.password=your_password
You can use this code in your Git Bash:
mvn clean installjava -jar target/your-project.jar