This project is a clone of the youtube app and is only for learning purposes. it includes only basic functionality of the youtube app like sign-in, video streaming, uploading video to firebase, liking- disliking a video and subscribing to a channel. for video demo click here
Note:Avoid cloning the assets folder
- Firebase Account setup-for storing and streaming videos.
- Mongo DB setup- storing the user's data.
- client will be running on
http://localhost:3000
- server will be running on
htp://localhost:8800
To run this project clone this repository
and run npm install
to install all the node
modules both in client and server folder.
After installing all the node modules create .env
file in server's root directory and use these variables
MONGO_URL=your mongo db url
->use yours
PORT=8800
->use as it is.
JWT_KEY=SECRET_JWT_KEY_FOR_AUTH
->use as it is
then just use npm start
to start the server code.
Note: don't forget to allow connection from any where in mangod db dahshboard. inside the network settings, add the IP list 0.0.0.0/0 to allow connection from everywhere.
After installing all the node modules create .env
,.env.development
and .env.production
in the client's root-directory and use these environment variables. want to know more about firebase setup click the link here setup a firebase project
//inside the .env.development file
REACT_APP_FIREBASE_KEY=your firbase key`
REACT_APP_ENV_NAME=dev` |
//inside the .env.production file
REACT_APP_FIREBASE_KEY=your firbase key`
REACT_APP_ENV_NAME=prod` |
//inside the .env file
REACT_APP_FIREBASE_KEY=your firbase key`
REACT_APP_ENV_NAME=dev` |
to run the client navigate to the project client directory and run the command npm start
it will start your client's code at port 3000
. at first you won't see any videos because there is no video stored at firebase so i would recommend you to first import the users collection then login into any of them using their email and password
(password is password
for all users) and then upload videos using upload button.make sure to fill all the fields before you click upload.
you can directly import all the api calls in postman from here postman api.
you can also import all the users directly into mongodb database from here -users.(password is password
for all users). once it is imported you can directly upload videos using credential of any user.