A clone of the Netflix website using React.
This application uses React, React router, Styled-Components to build the Netflix Frontend Web application.
- Clone the Repository to your local machine: Run this in the terminalin the location you would like to save the repository locally:
git clone https://github.com/cynepton/netflix-clone.git
Or fork the repository and work on your own version.
- Install Dependencies: Enter the repository folder and install the dependencies. You need to have Node and NPM installed to run this step.
cd netflix-clone
npm install
This will install the dependencies based on the information in the package.json
file.
- Environment Variables
Create a
.env
file in the folder
touch .env
Copy the contents of the public env file, and paste in the .env
file.
- Run the Application
npm start
All the components take in ...restProps
which are the props for the component and spread it to the HTML tags within them. Please see the component structure to accurately understand where the props are placed.
Most components also take {children}
. Tags like the input
tag do not take children since it doesn't need a closing tag and there is nothing to be nested within it's tags.
See KarlHadwen's Youtube Video on Compound Components and Github Repo.
It's a Compound Component responsible for rendering the sections of the body of the webpage that contain the marketing boards. Currently, It renders each of the Jumbotron marketing items in the Jumbo Data JSON file. It also has the following sub-components:
Jumbotron.Container
defined in the JumbotronIndex.js
file. Renders the Overall container for all the Jumbotron components that gets passed to the Jumbotron container JSX element that is in the jumbotron container file.Jumbotron.Pane
defined in the JumbotronIndex.js
file. The Jumbotron Pane renders it's contents which could be either text or an image. The Pane is half the width of the Jumbotron Div container within which it is placed.Jumbotron.Title
defined in the JumbotronIndex.js
file. This renders the Jumbotron Title H1 header within the Jumbotron Pane.Jumbotron.SubTitle
defined in the JumbotronIndex.js
file. This renders the Jumbotron SubTitle H2 header within the Jumbotron Pane.Jumbotron.Image
defined in the JumbotronIndex.js
file. This renders the Jumbotron Image within the Jumbotron Pane.
The CSS styles for the Jumbotron are located in the Jumbotron.js
file. The Styled-Components library is used for the styling.
It's a Compound Component responsible for rendering the footer of the webpage. It also has the following sub-components:
Footer.Container
defined in the FooterIndex.js
file. Renders the Overall container for all the Footer components.Footer.Column
defined in the FooterIndex.js
file. Renders each similar set of links within the footer. Refer to the Footer Container file to see how it is used.Footer.Row
defined in the FooterIndex.js
file. This contains all the columns to be renderedFooter.Title
defined in the FooterIndex.js
file. This renders the larger footer text.Footer.Link
defined in the FooterIndex.js
file. This renders each footer text that should have a link.Footer.Text
defined in the FooterIndex.js
file. This renders static footer text.Footer.Break
defined in the FooterIndex.js
file. This renders a break to create spacing within the footer.
The CSS styles for the Footer are located in the Footer.js
file. The Styled-Components library is used for the styling.
It's a Compound Component responsible for rendering the accordion feature within the webpage. In this case, the accordion feature contains the FAQs, but it can also be reused elsewhere. It also has the following sub-components:
Accordion
defined in the AccordionIndex.js
file. Renders the Overall container for all the Footer components.Accordion.Frame
defined in the AccordionIndex.js
file. Currently unused.Accordion.Inner
defined in the AccordionIndex.js
file. Renders the inner div element within the full container. It may not always be necessary. In this case it is used to set the width of the actual accordion to be less than the full container width.Accordion.Title
defined in the AccordionIndex.js
file. Renders the title of the Accordion component.Accordion.Item
defined in the AccordionIndex.js
file. Contains each accordion item. The item contains the header and the body.Accordion.Header
defined in the AccordionIndex.js
file. Renders the accordion header. When the accordion is closed, only the header shows.Accordion.Body
defined in the AccordionIndex.js
file. Renders the contents of the accordion. When the header is clicked, it toggles the body to either open or close.
The CSS styles for the Accordion are located in the Accordion.js
file. The Styled-Components library is used for the styling.
It's a Compound Component responsible for rendering an input bar that allows the user to type in their email to subcribe to the service. It also has the following sub-components:
OptForm
defined in the OptFormIndex.js
file. Renders the container for the optForm.OptForm.Input
defined in the OptFormIndex.js
file.OptForm.Button
defined in the OptFormIndex.js
file.OptForm.Text
defined in the OptFormIndex.js
file.OptFor.Break
defined in the OptFormIndex.js
file. Renders a line break to seperate items within the flexbox.
The CSS styles for the Accordion are located in the OptForm.js
file. The Styled-Components library is used for the styling.
The react router endpoints are defined in the Routes file. Any new routes should be added there to make it easier to monitor all the routes from a single location.
This is the base route and renders the home page defined in the Home Page File