-
Notifications
You must be signed in to change notification settings - Fork 7
Add Full Movie Watchlist Management Feature with Search, Filter, and Rating #3
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Open
demilade111
wants to merge
16
commits into
langaracpsc:main
Choose a base branch
from
demilade111:main
base: main
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
- Added Movie model with fields for title, releaseYear, genres (referencing Genre model), watched status, and rating - Added Genre model to manage unique genres, avoiding repetition and enabling easy updates - Implemented endpoints for Movies: - POST /movies: Create a new movie with validations - GET /movies: List movies with pagination and filtering by genre, watched status, and rating - GET /movies/:id: Retrieve movie details by ID - PUT /movies/:id: Update movie details (title, watched status, rating, etc.) - DELETE /movies/:id: Remove a movie from the watchlist - Implemented endpoints for Genres: - POST /genres: Create a new genre - GET /genres: List all genres - PUT /genres/:id: Update a genre by ID - DELETE /genres/:id: Remove a genre - Updated Movie model to reference genres by ObjectId, ensuring data integrity - Improved error handling for invalid input, duplicate entries, and not found cases
…plement Home page and movie service
…amic filters, search, and pagination - Added MovieList component with dynamic fetching of movies from the backend - Integrated filter options for genre, watched status, rating, and a search bar for searching movies by title - Fetch genres dynamically from the backend via `fetchGenres` API and populate the genre dropdown - Implemented dynamic pagination for the movie list, allowing users to navigate through movie pages - Created MovieCard component to display individual movie details, including title, release year, genres, and status - Added logic for marking movies as watched/unwatched with automatic rating reset when marking as unwatched - Implemented rating change functionality with a dropdown for selecting and updating movie ratings - Ensured real-time UI updates when watched status or rating changes, syncing data with the backend - Enhanced UI with responsive grid layouts for movie cards and smooth hover animations - Optimized component structure and state management for better performance and user experience - Improved error handling and loading states for fetching movies, genres, and updating actions
…ebounced search, enhance component structure, and clean up API handling - Added debounced search functionality to optimize performance and reduce unnecessary API calls when searching for movies - Refactored `MovieList` to integrate debounced search and cleanly separate concerns - Modularized API utility functions for cleaner, reusable GET requests (fetchMovies, fetchGenres, getMovieById) - Updated `MovieDetails` and `MovieFilters` components for improved readability and maintainability - Improved error handling and loading states for better UX - Applied DRY principles and SOLID practices for more maintainable and scalable code - Cleaned up redundant code, organized hooks, and enhanced UI with optimized movie cards - Ensured better pagination and filtering of movies based on genre, rating, and watch status
…roller code - Moved movie filtering logic to a separate utility file (`filterUtils.js`) - Improved code readability and reusability by separating concerns in the `getAllMovies` controller - Applied SOLID and DRY principles for cleaner and more maintainable code - Added robust filtering with search, genre, rating, and watched status capabilities - Refactored movie controller to use modular filtering logic for better scalability
…rtup logic, and remove obsolete genre seeding utility
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Pull Request Description:
This pull request implements a full movie watchlist management feature, covering both frontend and backend functionality. The application allows users to add, update, and manage a list of movies with options to filter, search, and rate them. The following key features are included:
Core Features:
NOTE:
Database URL in .env: The MongoDB connection string has been intentionally removed from the
.envfile. This allows the reviewer to easily add their own connection string and test the application with their MongoDB setup.Movie List View: Displays a list of movies with pagination, search, and filtering by genre, watch status, and rating.Movie Details View: View detailed information about each movie, mark movies as watched/unwatched, and rate them (1-5 stars).
Add Movie Form: Users can add new movies with the title, release year, and genres (multi-selection supported).
Movie Search: Search movies by title, using a case-insensitive search.