Code Monkey home page Code Monkey logo

youtube-twitter-backend's Introduction

Youtube Backend In Nodejs

We are building a complete video hosting website similar to youtube with all the features like login, signup, upload video, like, dislike, comment, reply, subscribe, unsubscribe, and many more along with the features using tweets.

Check the links to understand

Summary of this project

This project is a complex backend project that is built with nodejs, expressjs, mongodb, mongoose, jwt, bcrypt, and many more. This project is a complete backend project that has all the features that a backend project should have. Project uses all standard practices like JWT, bcrypt, access tokens, refresh Tokens and many more. We have spent a lot of time in building this project and we are sure that you will learn a lot from this project.


Doc

Get all the doc after running the server

http://localhost:8000/api-docs/


Features

  • User Authentication
  • Video Upload
  • Like, Dislike, Comment, Reply
  • Subscribe, Unsubscribe
  • Tweet, Retweet, Like, Comment, Reply
  • and many more

Getting Started

Prerequisite

$npm install -g nodemon

# or using yarn:
$yarn global add nodemon
  • dotenv
$npm i dotenv

Run Locally

  • check npm
$npm -v
  • check nodemon
$nodemon -v
  • install all the node_modules
$npm install
  • create a .env file
Youtube-Twitter-Backend/
│
|── doc/
|   └── swagger.json
├── src/
│   ├── controllers/
│   │   ├── user.controller.js
│   │   ├── video.controller.js
│   │   └── ...
│   │
│   ├── models/
│   │   ├── user.model.js
│   │   ├── video.model.js
│   │   └── ...
│   ├── db/
|   |   └──index.js
|   |
│   ├── routes/
│   │   ├── user.routes.js
│   │   ├── playlist.routes.js
│   │   └── ...
│   │
│   ├── middleware/
│   │   ├── auth.middleware.js
│   │   ├── multer.middleware.js
│   │   └── ...
│   │
│   ├── utils/
│   │   ├── cloudinary.js
│   │   ├── ApiError.js
│   │   └── ...
│   │
│   ├── app.js
│   ├── constant.js
│   └── index.js
├── .env      #add .env files to add environment variables 
├── .gitignore
├── .prettierignore
├── .prettierrc
├── package.json
├── package-lock.json
└── README.md


  • create the cloudinary account(free version)
  • get the cloudinary credential

cloudinary console screenshot

in the .env file

PORT=8000
MONGODB_URI="Your mongodb URI string"
CORS_ORIGIN=*
ACCESS_TOKEN_SECRET="yours secret key"
ACCESS_TOKEN_EXPIRY="yours secret key"
REFRESH_TOKEN_SECRET="yours secret key"
REFRESH_TOKEN_EXPIRY="yours secret key"

CLOUDINARY_CLOUD_NAME="your cloud name"
CLOUDINARY_API_KEY=your-api-key
CLOUDINARY_API_SECRET=your-api-secret
  • run the server
$npm run dev

Wanna Learn Production Level backend

Hitesh Sir's video


youtube-twitter-backend's People

Contributors

0prashantyadav0 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.