Skip to content

StoyanGD/TrackTunes

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 

Repository files navigation

RidePal Web Application

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.


Table of Contents


Technologies and Principles

  • 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

image



Main Functionalities

Playlist Generation

  • 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

Playlist Browsing

  • 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

Configuration Options

  • 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

Genre Synchronization

  • 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


Public Part

  • 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


Private Part

  • Generating a new playlist
  • Checking others users' accounts
  • Editing/Deleting owned playlists
  • Editing of a playlist lets user change its title and image


Administration Part

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


REST API

  • Link to the documentation in Swagger -> http://localhost:8080/api (access after you have successfully configured the project)


External Services

  • 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

  • Used to get the latitude and longitude of the starting location and final destination, which are input as location names in our playlist generator.

  • Used to fetch an image every time a new playlist is created

Database


image



Installation

Prerequisites

  • Java Development Kit (JDK)
  • MariaDB

  1. Clone the project -> https://github.com/RidePal-Team-1/RidePal-project.git

  2. Configure the database connection in application.properties:

  3. spring.datasource.url=jdbc:mariadb://localhost:3306/your_database
    spring.datasource.username=your_username
    spring.datasource.password=your_password

  4. Build and Run the project using Maven

  5. You can use this code in your Git Bash:

    mvn clean install
    java -jar target/your-project.jar

  6. 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.

  7. 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

  8. After obtaining all API keys, you can access the Config classes of each API and paste your API key.

  9. Access the application at http://localhost:8080 in your web browser.

  10. As the project is now successfuly working you can also access the Swagger Documentation at http://localhost:8080/api

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published