GithubHelp home page GithubHelp logo

techreagan / youtube-clone-nodejs-api Goto Github PK

View Code? Open in Web Editor NEW
628.0 36.0 217.0 1.21 MB

VueTube is a YouTube clone built with nodejs, expressjs & mongodb. This is the RESTful API repository.

JavaScript 99.15% Shell 0.62% Dockerfile 0.23%
youtube-clone vuejs youtube-node nodejs mongoose mongodb expressjs

youtube-clone-nodejs-api's Introduction

VueTube RESTful API - YouTube Clone

VueTube is a YouTube clone built with nodejs, expressjs & mongodb.

Features

CRUD (Create, Read, Update And Delete)

  • Authentication with JWT (Reset Password with email)
    • Login (User/Admin)
    • Register
    • Forgot Password
  • Pagination and search where necessary
  • API Security (NoSQL Injections, XSS Attacks, http param pollution etc)
  • Video (CRUD)
    • Upload video
    • Upload video thumbnail
    • Watch video
    • Increase Views
    • Like and dislike video
    • Download video
    • Comment & reply for video
    • Update video details
    • Delete video
  • Subscribe to a channel
  • View liked videos
  • Trending
  • Subscriptions
  • History (CRUD)
    • Watch history
    • Search history
  • Settings
    • Modify channel name and email
    • Change password
    • Upload channel avatar

Frontend Repo

Frontend was developed with vue js and vuetify VueTube

API Documentation

Hosted on netlify: Coming Soon

Extensive and testing documentation with postman: VueTube API

Database Model

Though the diagram uses sql data type, this diagram is to show you the various collections in the mongo database.

Screenshot

Requirement

  • NodeJS
  • MongoDB

Configuration File

Rename the config/.env.example to .env, then modify to your environment variables, mongodb uri, set your JWT_SECRET and SMTP variables

NODE_ENV=development
PORT=3001

MONGO_URI=YOUR_URL

JWT_SECRET=YOUR_SECRET
JWT_EXPIRE=30d
JWT_COOKIE_EXPIRE=30

FILE_UPLOAD_PATH = ./public/uploads
MAX_FILE_UPLOAD = 1000000

SMTP_HOST=smtp.mailtrap.io
SMTP_PORT=2525
SMTP_EMAIL=
SMTP_PASSWORD=
FROM_EMAIL=[email protected]
FROM_NAME=QuizzApp

Email testing: use mailtrap for email testing, it's easy no stress.

Installation

Install all npm dependecies

npm install

Install nodemon globally

npm install -g nodemon

Note

Make sure you run the seeder to get categories in your database or Create a user with the role admin, then add category with the category endpoint.

Run database seeder

  • Seeder folder is _data/
  • Edit the seeder file if you want to
node seeder -i

Delete all data

node seeder -d

Start web server

node run dev

Screenshots

Delete the screenshot folder if you download this code (Screenshots folder is 3.14mb in size).

Sign In

Screenshot

Sign Up

Screenshot

Home Page

Screenshot

Watch Page

Screenshot

Upload Thumbnail Modal

Screenshot

For more screenshots check out the vue frontend repo VueTube

License

This project is licensed under the MIT License

Developed by Reagan Ekhameye (Tech Reagan)

Reach me on twitter @techreagan

youtube-clone-nodejs-api's People

Contributors

techreagan avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

youtube-clone-nodejs-api's Issues

Error in user model (virtual populate)

There is an error on the User model.
In the subscribers virtual populate

userSchema.virtual('subscribers', {
  ref: 'Subscription',
  localField: '_id',
  foreignField: 'channelId',
  justOne: false,
  count: true,
  match: { subscriberId: this._id }
 });

TypeError: Cannot read property '_id' of undefined

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.