Skip to content

jimmy213/movie-db

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

51 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Movie DB Search

Overview

A React based web app that displays movie information and allow users to search and add them to their favorites.

For the fetched movie information, I used the TMDb API.

How to run

Install the required node packages by running the following in the project's directory.

yarn install

For the application to work as intended and start fetching data, you need an API key. You should create a .env.local file in the project's root directory and add your key as following:

REACT_APP_TMDB_API_KEY=YOUR_API_KEY

For the favorites functionality to work, you need to be running:

npx json-server --watch data/db.json --port 4000

and add the corresponding url to the .env.local file that we created.

REACT_APP_TMDB_API_KEY=a066e9bd01a7c0cf2ddd9ecf589e8a13
REACT_APP_LOCAL_SERVER_IP=http://localhost:4000/favorites

Finally, we can start the local development environment by running:

yarn start

How it works

Home page

There is a search box at the top where you can search for a movie. The submit query is passed via the press of the Enter keyboard button. After that, you should see the results down below (unless there aren't any).

By clicking on a movie, a modal is opened with a bit more information about the movie and a button (heart) to add/remove it from your favorites list. This modal should close either by pressing the close button, or by clicking outside of it.

Down the page, you will find a Top 10 list as fetched by the API and a Top 10 Favorites list (in order of addition).

Movies page

In this page, you will find a list of movies (20 per page) with some sort filters at the top. By clicking a movie, the modal discussed above will open.

Favorites page

Here you will find the movies that you marked as favorite. This list is saved locally as JSON data.

Powered by

the movie database

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published