![](https://private-user-images.githubusercontent.com/7397803/361621022-92ec7762-3762-4f77-8296-35509a5700f3.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MzkzNTcwMzUsIm5iZiI6MTczOTM1NjczNSwicGF0aCI6Ii83Mzk3ODAzLzM2MTYyMTAyMi05MmVjNzc2Mi0zNzYyLTRmNzctODI5Ni0zNTUwOWE1NzAwZjMucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI1MDIxMiUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNTAyMTJUMTAzODU1WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9ZGFjNzcxODFiNmU5ZThhZmVmZmRlZjdmN2QyZWUwZmFiYzY0YjNkNjdlNzE0OThlN2Q4ZmIyYWU2MGIwYTNmMSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QifQ.EssW4qA-tAfmveL3fhZ9MsHMIFDW9d9RGU6QukIapnM)
The Movie Search App allows users to search for movies using the TMDb (The Movie Database) API. The application displays a list of movies based on the user's query, allowing sorting by release date or rating. It supports pagination to navigate through multiple pages of search results.
- React: A JavaScript library for building user interfaces. React is used to create reusable UI components and manage the state of the application.
- Tailwind CSS: A utility-first CSS framework for creating responsive designs quickly. Tailwind CSS is used to style the application and ensure it is visually appealing across different devices.
- JavaScript ES6: Modern JavaScript features are used throughout the codebase for cleaner and more efficient code.
- TMDb API: The Movie Database (TMDb) API is used to fetch movie data. This API provides movie details, including titles, release dates, ratings, and posters.
-
SearchBar:
- Allows users to enter a search query.
- On submitting the query, it triggers a search request to the TMDb API.
-
MoviesTable:
- Displays a table of movie results.
- Includes sorting functionality by release date and rating.
- Shows movie details like poster, title, release date, rating, and description.
-
Pagination:
- Manages navigation between pages of search results.
- Displays the current page number and total pages.
- Provides buttons to navigate to the next or previous page.
-
Searching:
- Users enter a movie name into the search bar.
- The app sends a request to the TMDb API with the search query.
- Results are fetched and displayed in a paginated table.
-
Sorting:
- Users can click on table headers to sort results by release date or rating.
- The table updates to reflect the selected sorting order.
-
Pagination:
- The app calculates the total number of pages based on the total number of results and the number of movies displayed per page.
- Users can navigate between pages using "Next" and "Previous" buttons.
- The current page number and total pages are displayed to the user.
- Base URL:
https://api.themoviedb.org/3/search/movie
- API Key:
da128f0f40bdeb2660ba6801fe504117
- Query Parameters:
query
: The search term entered by the user.page
: The current page number for pagination.include_adult
: Set tofalse
to exclude adult content.
-
Clone the Repository:
git clone https://github.com/topsecretagent007/movie-search-app-test.git cd movie-search-app-test
-
Install Dependencies:
npm install
-
Start the Development Server:
npm start
The app will be accessible at
http://localhost:3000
.
-
Search for Movies:
- Enter a movie name in the search bar and click "Search".
- Results will be displayed in a table.
-
Sort Results:
- Click on the "Release Date" or "Rating" column headers to sort the movies by those attributes.
-
Navigate Pages:
- Use the "Next" and "Previous" buttons to navigate through the pages of results.
Contributions are welcome! Please fork the repository, make your changes, and create a pull request.
This project is licensed under the MIT License.
For any questions or issues, feel free to open an issue on GitHub or contact the project maintainers.
Email : [email protected]
Telegram : lendon1114