Note: This project is currently a work in progress and is not yet ready for production use. It is being actively developed and may undergo significant changes. Contributions and suggestions are welcome!
IMPORTANT: This is in Java 11, so make sure you have Java 11 installed on your system.
Movie Recommendation System is a Java-based project developed using Spring Boot (version: 2.3.4) and MySQL (version: 8.0). It provides a platform for users to register, rate movies, and receive personalized movie recommendations based on their preferences and ratings.
- User Registration:
- Movie Database:
- Rating System:
- Recommendation Algorithm:
- User Interface:
- Search Functionality:
- Top Rated Movies:
- User Profile:
- Persistence:
- Error Handling:
- Clone the repository:
git clone https://github.com/username/MovieRecommendationSystem.git
- Download Docker Desktop and MySQL 8.0 (use MySQL Installer) and run the following commands:
Configure the MySQL container in docker-compose-mysql.yml (change out the
MYSQL_ROOT_PASSWORD
value to whatever password you want to use when logging in to MySQL Command Line Client/MySQL Workbench):version: '3.8' services: localmysql: container_name: db restart: always image: 'mysql' environment: MYSQL_DATABASE: 'movie_recommendation' MYSQL_ROOT_PASSWORD: yourpassword # Change this to your own password ports: - 3308:3306 # volumes: # - 'db:/var/lib/mysql' ## - './db/init.sql:/docker-entrypoint-initdb.d/init.sql' #volumes: # mysqldata:
Open a terminal, and the Docker Desktop application, and run the following command to start a MySQL container:
cd /path/to/MovieRecommendationSystem docker-compose -f docker-compose-mysql.yml up -d
Update the database configuration in
src/main/resources/application-default.properties
:spring: task: execution: pool: core-size: 10 max-size: 20 queue-capacity: 50 datasource: url: jdbc:mysql://127.0.0.1:3308/movie_recommendation username: root # Change this to your own username password: yourpassword # Change this to your own password jpa: hibernate: ddl-auto: update # lifecycle: # timeout-per-shutdown-phase: 20s # #logging: # level: # com.movie.recommendation: debug server: port: 8080 shutdown: graceful
Install maven dependencies:
cd MovieRecommendationSystem mvn install
Download MovieLens Dataset and Extract Data:
- Make sure you have Git Bash installed on your system. If you are using Windows, open Git Bash for the following steps.
- Open your terminal or Git Bash and navigate to the root directory of your
MovieRecommendationSystem
project. Copy and paste the following one-liner command into your terminal or Git Bash:
if [ ! -d "src/main/resources/data/ml-25m" ]; then curl -O https://files.grouplens.org/datasets/movielens/ml-25m.zip && unzip ml-25m.zip -d src/main/resources/data/ && rm ml-25m.zip; fi
(Note: If you're on Windows and don't have Git Bash, you can download it from the official website: https://git-scm.com/downloads )
- Press Enter to execute the command. The script will download the zip file containing the MovieLens dataset and extract its contents to
src/main/resources/data/ml-25m/
. - After the command completes, the zip file will be removed, and you should see the MovieLens dataset files in the
src/main/resources/data/ml-25m/
directory of your project.
Build and run the application using Maven:
cd MovieRecommendationSystem mvn spring-boot:run
Create an HTTPS request to any of the endpoints, for example, to load in the data from the MovieLens dataset, you can create a POST http://localhost:8080/loadDefaultMovies request using Postman, or commands like:
curl -X POST http://localhost:8080/loadDefaultMovies
Or on Windows:
Invoke-WebRequest -Method POST -Uri http://localhost:8080/loadDefaultMovies"
Contributions are welcome ❤️! If you find any issues or have suggestions for improvements, please feel free to submit a pull request.
This project is licensed under the MIT License. See the LICENSE file for more information.
For any inquiries or support, please reach out to me on Discord: bruhs.