All Projects → productioncoder → Youtube React

productioncoder / Youtube React

A Youtube clone built in React, Redux, Redux-saga

Programming Languages

javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to Youtube React

React Adventure
⛰ React high-ending architecture & patterns ready for use. Made for big and small projects. PWA Ready.
Stars: ✭ 62 (-85.27%)
Mutual labels:  jest, enzyme, redux-saga
React Social Network
Simple React Social Network
Stars: ✭ 409 (-2.85%)
Mutual labels:  create-react-app, react-redux, redux-saga
React Redux Boilerplate
A minimal React-Redux boilerplate with all the best practices
Stars: ✭ 799 (+89.79%)
Mutual labels:  jest, react-redux, redux-saga
egghead-bookshelf
An example React application to accompany the "Add Internationalization (i18n) to a React app using React Intl" Egghead.io course
Stars: ✭ 28 (-93.35%)
Mutual labels:  enzyme, jest, create-react-app
Todo Redux Saga
Todo app with Create-React-App • React-Redux • Redux-Saga • Firebase • OAuth
Stars: ✭ 184 (-56.29%)
Mutual labels:  create-react-app, react-redux, redux-saga
What The Splash
Tutorial for building an unsplash image gallery with redux saga :atom:
Stars: ✭ 107 (-74.58%)
Mutual labels:  tutorial, jest, redux-saga
Reeakt
A modern React boilerplate to awesome web applications
Stars: ✭ 116 (-72.45%)
Mutual labels:  jest, enzyme, redux-saga
coconat
🍥 StarterKit Builder for rocket-speed App creation on 🚀 React 17 + 📙 Redux 4 + 🚠 Router 5 + 📪 Webpack 5 + 🎳 Babel 7 + 📜 TypeScript 4 + 🚔 Linters 23 + 🔥 HMR 3
Stars: ✭ 95 (-77.43%)
Mutual labels:  enzyme, redux-saga, jest
Reactjs Crud Boilerplate
Live Demo
Stars: ✭ 83 (-80.29%)
Mutual labels:  create-react-app, jest, enzyme
React Curd
【React全家桶入门系列文章项目】http://blog.csdn.net/awaw00/article/category/6692955
Stars: ✭ 137 (-67.46%)
Mutual labels:  tutorial, react-redux, redux-saga
React-Redux-Enterprise
A React-Redux boilerplate for enterprise/large scaled web applications
Stars: ✭ 77 (-81.71%)
Mutual labels:  enzyme, jest, react-redux
React Redux Boilerplate
Awesome React Redux Workflow Boilerplate with Webpack 4
Stars: ✭ 307 (-27.08%)
Mutual labels:  jest, enzyme, redux-saga
OneArtical
learning and practice redux,react-redux,redux-saga,redux-persist,redux-thunk and so on
Stars: ✭ 61 (-85.51%)
Mutual labels:  redux-saga, react-redux
react-redux-crud
An example react-redux-saga CRUD application
Stars: ✭ 47 (-88.84%)
Mutual labels:  redux-saga, react-redux
react-boilerplate
Sets the ground up for CRA-like projects.
Stars: ✭ 23 (-94.54%)
Mutual labels:  enzyme, jest
personal-blog
✍️ 个人技术博客
Stars: ✭ 79 (-81.24%)
Mutual labels:  enzyme, jest
create-react-redux-app
React boilerplate based on create-react-app
Stars: ✭ 49 (-88.36%)
Mutual labels:  redux-saga, create-react-app
redux-login
React & Redux 实现注册登录认证系统 - 视频源码
Stars: ✭ 26 (-93.82%)
Mutual labels:  create-react-app, react-redux
react-testing-talk
No description or website provided.
Stars: ✭ 12 (-97.15%)
Mutual labels:  enzyme, jest
ReactNativeSagaFrame
RN开发(一切尽在代码中)
Stars: ✭ 13 (-96.91%)
Mutual labels:  redux-saga, react-redux

1 About

This repository is the source code for the epic length Build Youtube in React tutorial series provided by productioncoder.com.

Please help this repo with a ⭐️ if you find it useful! 😁

2 Demo

Please watch the demo on Youtube

Build Youtube in React demo video

3 Screenshots

UI-wise this application looks almost exactly like the original Youtube application

It uses real data by leveraging the Youtube Data API v3. Youtube in React Home feed

Youtube in React Watch-1

Youtube in React Watch-2

4 How to run this application

This application loads information using the Youtube Data API v3.

To use it, you need to set up a Youtube Data v3 API key and run the project with npm or yarn.

Below, you'll find a step by step explanation

4.1. Getting a Youtube Data API key

  1. Head over to the Google developers console
  2. Create a new project by clicking on Select project drop down right next to the logo. Click the New Project button an give it a speaking name.
  3. Select your project by choosing it in the Select Dropdown directly next to the logo in the header.
  4. Click the Enable APIs and Services button
  5. Search for youtube data
  6. Click on the Youtube Data API v3
  7. Click the blue enable button
  8. In the dashboard, click Credentials on the left sidebar
  9. Click the Create Credential button
  10. Which API are you using: Youtube Data API v3
  11. Where will you be calling the API from: Web browser
  12. What data are you accessing: Public data
  13. Click the What credentials do I need button
  14. Copy the API key

4.2. Providinng the API key to your application

4.2.1 Option 1 - Environment variable (recommended)

Provide your Youtube Data API key with the REACT_APP_YT_API_KEY environment variable.

Create a .env.local file (alread gitignored) with

touch .env.local

and then define the REACT_APP_YT_API_KEY environment variable which is supposed to hold your Youtube Data v3 API key in the .env.local file like so:

REACT_APP_YT_API_KEY=AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

4.2.2 Option 2 - hardcode API key

As an alternative, you could just hardcode the API key in the src/App.js file.

In general, we'd recommend going with the environment variable approach to prevent you to accidentially commiting the API key go Git.

However, if you do want to hardcode the Youtube Data API key, you can head over to the src/App.js file and paste your API key in:

const API_KEY = 'AIzaxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx';

4.3. Installing dependencies

To install the dependencies run

npm install

With yarn

yarn install

4.4 Running the application

4.4.1 Running locally with local env vars

You can run:

npm run dev

which will source your .env.local file and then start then run npm start.

Note that if you change the value of the .env.local file, you need to run npm run dev again so that the new env var changes are picked up.

As an alternative, you can manually source the .env.local file with

source .env.local

and then run

npm start

You can also use yarn to run the application.

yarn start

If you close the terminal, you will need to source the file again. That's why it is recommended to just run npm run dev so you don't need to think about it.

4.4.2 Running locally with hardcoded Youtube API key

If you copied and pasted the API key directly into the code, you do not need to source anything and you can just run:

npm start

If you are using yarn, you can do

yarn start

Make sure to not commit your file to Git!

5 Tests

This project contains an extensive suite of tests and makes use of Jest and Enzyme.

Run all tests by executing.

npm test

You can also use yarn to run the tests.

yarn test

6 Features

This application includes the major features of Youtube such as

  • home feed with infinite scroll
  • trending videos
  • searching for videos
  • watching videos
  • displaying comments and video details

7 Used technologies

8 Disclaimer

This project is solely intended for educational purposes and is created under fair use.

It is not intended to create any kind of Youtube competitor, but to teach advanced concepts in frontend development.

Just see it a nice educational project that will help you to improve your coding skills.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].