Skip to content

From a database of ratings from users on books, suggest a user a list of books they might like based on the collaborative filtering algorithm.

Notifications You must be signed in to change notification settings

aloiva/book-recommender

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Book Recommendation Engine

From a database of ratings from users on books, suggest a user a list of books they might like based on the collaborative filtering algorithm. The app is built on ReactJS for fast rendering of UI and FastAPI for fast and efficient server performance. Made for Microsoft Engage 2022 Mentorship program.

Features

  1. An efficient recommendation system making use of collaborative filtering algorithm to suggest the current user 10 books that they might like.
  2. Easy switching between FIVE users in the same environment.
  3. Simple and quick click on stars rating system.
  4. Rating system for every user that influences the recommendations real time!!
  5. Fully functioning search feature to search a book with its title, author and even isbn.
  6. Retrieve all the books that the current user has rated so far and in app feature to change them.
  7. Browse books from New York times best sellers and top rated books in genres, all in app while also having an option to rate them.
  8. List the books that are in our huge database.

Tech Stack used

Frontend - ReactJS Backend - FastAPI, a web framework based on Python to build APIs Database - SQLite3, a disk based database packed with Python Standard Library

External API used

Install dependencies

To install dependencies and required packages, clone the repo. Initialise a terminal in the project folder.

Frontend

The following dependencies can also be found in package.json.

  • bootstrap 5.1.3 or above
  • react 18.1.0 or above
  • react-dom 18.1.0 or above
  • react-icons 4.3.1 or above
  • react-responsive-carousel 3.2.23 or above
  • react-router-dom 6.3.0 or above
  • react-script 5.0.1 or above
  • react-slick 0.29.0 or above
  • slick-carousel 1.8.1 or above
  • web-vitals 2.1.4 or above

To install all the packages at once, cd into ./client and run the command

npm install

or

yarn install

Backend

The following packages are required to run the backend. The list can also be found in requirements.txt. Make sure that Python 3.6 or above is installed before running the following commands.

  • pip install fastapi
  • pip install pydantic
  • pip install uvicorn[standard]
  • pip install pandas

Running app

Database

The database can be created at the instance from the .csv files provided (taken from Kaggle) or downloaded. Downloading is suggested. Changes made while the app is being hosted will be reflected locally in the database as well.

Download the database extracted at an instance here into ./server directory

or

Although not suggested due to the amount of resources and time it consumes, to create the initial database, run ./server/makedb.py

Backend

To start running the backend on uvicorn server run the following command in ./server folder.

uvicorn main:app --reload

The server by default runs at http://localhost:8000/

Frontend

To start the frontend, cd into the ./client folder and run

npm start

This will start the app, and run it by default on http://localhost:3000/

Screenshots

Homepage

Homepage

Users page

Users page

Recommendations page

Recommendations

recommendations when the user is changed

Recommendations_other_user

Search page

search page

About

From a database of ratings from users on books, suggest a user a list of books they might like based on the collaborative filtering algorithm.

Resources

Stars

Watchers

Forks