Skip to content

DeepakSuryaS/netflix_clone

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

49 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

LinkedIn

Netflix

A clone of netflix.com where users can authenticate themselves, select viewer profiles, browse films and series, and watch vidoes online.
Explore the docs »

View Demo · Report Bug · Request Feature

Table of Contents

  1. About The Project
  2. Getting Started
  3. Usage
  4. Contributing
  5. License
  6. Contact
  7. Acknowledgements

About The Project

Logo

Built With

Getting Started

To get a local copy up and running, follow these simple steps.

Prerequisites

  • npm
    npm install npm@latest -g
    or
    npm install --global yarn

Installation

  1. Clone the repo

    git clone https://github.com/DeepakSuryaS/netflix_clone.git
  2. Install NPM packages

    npm install

    or

    yarn install
  3. Start the development server

    npm start

    or

    yarn start

    Open http://localhost:3000 to view it in the browser.

Usage

Authentication

We authenticate users using an email address and a password with Firebase.

Data

We have used Firestore to store our films and series data. We hydrate Firestore by importing data from src/seed.js that produces two collections of the film and series. Each entry of a collection has a genre property. To display data categorically, we filter each collection by genre of each entry which looks like this:

{
  series: [
    {
        title: 'Documentaries',
        data: [{}, {}, {}],
      },
      {
        title: 'Comedies',
        data: [{}, {}, {}],
      },
  ],
  films: []
}

Beautification

We have adopted the CSS-in-JS approach to style this application and used styled components. It helps us to encapsulate the styles within the components. Styled components also give us out-of-the-box CSS support like nesting styles and variables with exceptional theming support.

Modularity

We have built a component library using compound components design pattern. It helps us to encapsulate most of the component-related logic within the components.

Routing

We have enabled application routing using React Router's BrowserRouter that uses HTML5 history API.

State Management

We have used Context API for global state management and sharing states between the parent and children within compound components.

Play Video

The challenge with the video player was it lives deep in the DOM, but we needed to bring it on top of all other DOM nodes whenever the user decides to play a video preserving its position in the React hierarchy. We have accomplished this via React Portal.

Architecture

.
├── app.js
├── components
│   ├── accordion
│   │   ├── index.js
│   │   └── styles
│   │       └── accordion.js
│   ├── activityIndicator
│   │   ├── index.js
│   │   └── styles
│   │       └── activityIndicator.js
│   ├── card
│   │   ├── index.js
│   │   └── styles
│   │       └── card.js
│   ├── feature
│   │   ├── index.js
│   │   └── styles
│   │       └── feature.js
│   ├── footer
│   │   ├── index.js
│   │   └── styles
│   │       └── footer.js
│   ├── form
│   │   ├── index.js
│   │   └── styles
│   │       └── form.js
│   ├── header
│   │   ├── index.js
│   │   └── styles
│   │       └── header.js
│   ├── index.js
│   ├── jumbotron
│   │   ├── index.js
│   │   └── styles
│   │       └── jumbotron.js
│   ├── opt-form
│   │   ├── index.js
│   │   └── styles
│   │       └── opt-form.js
│   ├── player
│   │   ├── index.js
│   │   └── styles
│   │       └── player.js
│   └── profile
│       ├── index.js
│       └── styles
│           └── profile.js
├── constants
│   └── routes.js
├── containers
│   ├── browse.js
│   ├── faq.js
│   ├── footer.js
│   ├── header.js
│   ├── jumbotron.js
│   └── profile.js
├── context
│   ├── firebase.js
│   └── themeContext.js
├── fixtures
│   ├── faqs.json
│   └── jumbo.json
├── global-styles.js
├── helpers
│   └── routes.js
├── hooks
│   ├── index.js
│   ├── use-auth-listener.js
│   └── use-content.js
├── index.js
├── pages
│   ├── add-profile.js
│   ├── browse.js
│   ├── home.js
│   ├── index.js
│   ├── signin.js
│   └── signup.js
├── seed.js
├── theme
│   └── schema.json
└── utils
    ├── index.js
    └── selection-map.js

Contributing

Contributions are what make the open source community such an amazing place to be learn, inspire, and create. Any contributions you make are greatly appreciated.

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request

License

Distributed under the MIT License. See LICENSE for more information.

Contact

Deepak Surya S - @ideepaksuryas - [email protected]

Project Link: https://github.com/DeepakSuryaS/netflix_clone

Acknowledgements