ajaynegi45 / LibraryMan-API

Revolutionize book management with LibraryMan! Easily track stock, borrowers, and due dates, streamlining operations for schools, companies, and libraries worldwide, ensuring efficient and organized book lending.
MIT License
43 stars 50 forks source link

[FEATURE] Implement Personalized Book Recommendations Based on User Search History #92

Open shreya5653 opened 1 week ago

shreya5653 commented 1 week ago

Is this feature already requested?

Problem or Missing Functionality

Currently, the system lacks personalized recommendations for users based on their interests and search behavior. Without targeted suggestions, users might struggle to discover new books relevant to their preferences, reducing engagement and retention. This feature aims to address this gap by tracking user search history and providing book recommendations based on previously searched genres, thereby enhancing the user experience and promoting book discovery.

Feature Description

The Personalized Book Recommendation feature suggests books based on a user’s past searches, primarily focusing on the last-searched genre. It enhances user engagement by offering relevant recommendations and promotes book discovery. If no search history is available, the system defaults to popular books, ensuring continuous functionality with minimal changes to the existing system.

Screenshots

No response

Would you like to work on this feature?

Yes

Implementation Plan

Implementation Plan

  1. Create User Search History Entity: Add a UserSearchHistory table to store user ID, searched genre, and timestamp.
  2. Implement Search Logging: Modify the search API to log each user's search with the genre and time.
  3. Update Repository Layer: Create methods in UserSearchHistoryRepository to retrieve the last-searched genre for a user.
  4. Build Recommendation Logic: Add a method in BookService to fetch books based on the user’s last-searched genre or return popular books if no history is found.
  5. Create API Endpoint:Add a new /recommendations/{userId} endpoint in BookController to serve the recommendations.
  6. Test and Verify: Use tools like Postman to test search logging and validate that appropriate recommendations are returned based on search history.
shreya5653 commented 1 week ago

@ajaynegi45 I would like to work on this issue as well. Can you please assign it to me.

Tanisha0708 commented 6 days ago

@ajaynegi45 i would like to work on issue would you assign me this issue .

ajaynegi45 commented 5 days ago

@ajaynegi45 I would like to work on this issue as well. Can you please assign it to me.

Start working on it

Tanisha0708 commented 4 days ago

@ajaynegi45 i would like to work on this issue please assign me this