Repository: Azazel5/NetflixClone Branch: master Commit: 327558846a62 Files: 87 Total size: 112.2 KB Directory structure: gitextract_mptik5yv/ ├── .gitignore ├── README.md ├── cypress/ │ ├── integration/ │ │ ├── browse-home.spec.js │ │ ├── browse-navbar.spec.js │ │ ├── landing-section.spec.js │ │ ├── login-form.spec.js │ │ └── sign-in-flow.spec.js │ ├── plugins/ │ │ └── index.js │ └── support/ │ ├── commands.js │ └── index.js ├── cypress.json ├── jsconfig.json ├── package.json ├── public/ │ ├── 404.html │ ├── index.html │ └── manifest.json └── src/ ├── App.js ├── assets/ │ └── images/ │ └── index.js ├── baseAxios.js ├── components/ │ ├── Modals/ │ │ ├── ProfileModal/ │ │ │ ├── ProfileModal.css │ │ │ └── ProfileModal.js │ │ └── VideoModal/ │ │ ├── VideoModal.css │ │ └── VideoModal.js │ ├── Navigation/ │ │ └── Dropdown/ │ │ ├── Dropdown.css │ │ └── Dropdown.js │ ├── StaticPages/ │ │ ├── ErrorPage/ │ │ │ ├── ErrorPage.css │ │ │ └── ErrorPage.js │ │ ├── LoadingScreen/ │ │ │ ├── LoadingScreen.css │ │ │ └── LoadingScreen.js │ │ └── NotFoundPage/ │ │ ├── NotFoundPage.css │ │ └── NotFoundPage.js │ ├── UI/ │ │ ├── Button/ │ │ │ ├── Button.css │ │ │ └── Button.js │ │ ├── CircularSoundButton/ │ │ │ ├── CircularSoundButton.css │ │ │ └── CircularSoundButton.js │ │ ├── DarkComponent/ │ │ │ └── DarkComponent.js │ │ ├── FAQComponent/ │ │ │ ├── FAQComponent.css │ │ │ └── FAQComponent.js │ │ └── ProfileCard/ │ │ ├── ProfileCard.css │ │ └── ProfileCard.js │ └── Video/ │ ├── TopTrailerComponent/ │ │ ├── TopTrailerComponent.css │ │ └── TopTrailerComponent.js │ ├── VideoCard/ │ │ ├── VideoCard.css │ │ └── VideoCard.js │ └── VideoCarousel/ │ ├── VideoCarousel.css │ └── VideoCarousel.js ├── containers/ │ ├── Browse/ │ │ ├── Browse.js │ │ ├── BrowseContent/ │ │ │ ├── BrowseContent.css │ │ │ └── BrowseContent.js │ │ ├── SearchContent/ │ │ │ ├── SearchContent.css │ │ │ └── SearchContent.js │ │ └── routes/ │ │ ├── Home.js │ │ ├── LatestVideo.js │ │ ├── List.js │ │ ├── Movies.js │ │ ├── Tv.js │ │ └── index.js │ ├── LandingSection/ │ │ ├── LandingSection.css │ │ ├── LandingSection.js │ │ └── LandingSectionTexts.js │ ├── Login/ │ │ ├── Login.css │ │ └── Login.js │ ├── NavBar/ │ │ ├── NavBar.css │ │ └── NavBar.js │ └── Search/ │ ├── Search.css │ └── Search.js ├── context/ │ └── Authentication.js ├── hoc/ │ ├── Layout.js │ └── ScrollToTop/ │ └── ScrollToTop.js ├── hooks/ │ ├── useDropdown.js │ ├── useHoverStyleButton.js │ ├── useNavbar.js │ └── useVideoInfoHandlers.js ├── index.js ├── store/ │ └── reducers/ │ ├── slices/ │ │ ├── latestVideoSlice.js │ │ ├── moviesByGenreSlice.js │ │ ├── netflixOriginalsSlice.js │ │ ├── topratedSlice.js │ │ ├── trendingSlice.js │ │ └── tvByGenreSlice.js │ └── store.js ├── styles.css └── utils/ ├── animations.js ├── sorting.js ├── time.js ├── transformations.js └── validation.js ================================================ FILE CONTENTS ================================================ ================================================ FILE: .gitignore ================================================ .idea/ .vscode/ node_modules/ build .DS_Store *.tgz my-app* template/src/__tests__/__snapshots__/ lerna-debug.log npm-debug.log* yarn-debug.log* yarn-error.log* /.changelog .npm/ yarn.lock .env ================================================ FILE: README.md ================================================ # Netflix-Clone ![DemoGif](flixdemo.gif) A Netflix clone I created for the sake of practicing React and Redux. It features design patterns recommended by the documentation. Some of the tools used include:
* Hooks (and custom hooks) * React Router * Redux Toolkit * Context API * Responsive web design * Cypress end-to-end testing
It is a work in progress, and my first real project with React. Any tips on how to better write the code, manage the folder structure, etc would be really appreciated.
The future of this project:
* Integrate it with a Django backend * Create an authentication flow * Add REST API endpoints for every user-related event, such as adding Netflix profiles ## Architecture Diagram ![CloneFlow](https://user-images.githubusercontent.com/36729591/90905326-08c9c400-e39e-11ea-977c-76212f63b2b6.png) ================================================ FILE: cypress/integration/browse-home.spec.js ================================================ /// describe(' -> ', () => { beforeEach(() => { localStorage.setItem('profileSelected', true) cy.visit('/browse') cy.window() .its('store') .invoke('getState') .as('reduxState') }) it('fetches trending, top-rated, and netflix originals successfully', () => { cy.get('@reduxState') .its('trending') .its('ids') .should('have.length', 20) cy.get('@reduxState') .its('toprated') .its('ids') .should('have.length', 20) cy.get('@reduxState') .its('netflixOriginals') .its('ids') .should('have.length', 20) }) it('Ensure that the first video of trending section is placed on the