Giter Site home page Giter Site logo

mi-movie-database's Introduction

Movie database

Project header

This is an assignment project in an in-depth JavaScript course. Generally speaking, I was tasked with creating a version of a movie database application that meets the requirements a user would expect when visiting a similar service. The solution is built with React, React Query, and Axios. As for the API, the application uses The Movie Database (TMDb) API (https://www.themoviedb.org/). The challenge here was to reuse my components as much as possible. For more information, please check out the "Documentation" section further down in this README file.

The solution

Checkout the solution:

โญ Solution URL: https://mi-mbmovie.netlify.app/

Built with

Documentation

Structure

Structure of the data flow in the application is as follows:

App -> Pages -> Sections -> Components

๐Ÿ“ Sections

Description

The sections are responsible for setting the main layout of a specific section on the page and handle the fetch query depending on what properties it has. Then it will pass down the data to other components that displays the data accordingly.

Section name should reflect what kind of layout that is being used:

<GridMovies> <GridActors> <MenuGenres> <ListMovies> <GridRecentVisited>

GridMovies

Description

GridMovies uses 4 properties:url identifier option useRelated

url: string : Define the base-url

Identifier: string: Can be an ID or something uniq to construct the endpoint.

Option: string[] : (Optional) Is being used to construct endpoint

useRelated: boolean : This is used for selecting between endpoints that are specific and endpoints with a general fetch request.

๐Ÿ“ฆ Components

Description

Components CAN handle:

  • Its own Interfaces

GridButtons

Description

GridButtons use 2 properties, id and title/name. This component is designed for genre buttons and contains a grid system that will display the buttons in a certain order.

ImageAvatar

Description

ImageAvatar use 3 properties:

  • data - Contains the dataset
  • displayData - If text data as "name" and "character" should be displayed with the avatar.
  • size - Size of the image in the avatar

ListPagination

Description

ListPagination use 5 properties:

  • page - Handles the what page is being clicked
  • total_pages - How many pages the dataset contains
  • id_param - specific id to construct reload url
  • genre_param - Specific category
  • type - Where is the pagination being used

OptionButtons

Description

OptionButtons is designed to be a generic component to be used in different scenarios.

ListPagination use 5 properties:

  • handleClickOption - (data: string, localStorage: boolean) => void. Returns a function call
  • data - What the button set will contain for information

๐Ÿ“ Interface

Description

The folder Interface will contain all GLOBAL interfaces for the main data that is collected from the API.

Actors Genres Movie Movies

๐Ÿ†Ž Types

Description

Types in this case imports all the interfaces to construct the types for the returning data from the API where the endpoint is similar. Example of this is movieActorType and allRelatedActorMovieType.

mi-movie-database's People

Contributors

devjoppe avatar github-classroom[bot] avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.