This is a mini YOUTUBE-BACKEND
project that covers the major functionalities of youtube
This comprehensive backend application replicates the core functionality of YouTube, providing a robust foundation for video platform. Find more about his project in the documentaion below.
Content | Link |
---|---|
Postman collection Documentation | click here |
Model | click here |
- Registration, login, logout, change-current-password, delete-user-account
- Profile management (avatar, cover image, details)
- Session Management using JWT (JSON Web Tokens) and signedCookies:
- Managing Watch history
- Video upload and publishing
- Video search, sorting, and pagination
- Video editing and deletion
- Visibility control (publish/unpublish)
- Tweet creation and publishing
- Viewing user tweets
- Updating and deleting tweets
- Subscribing to channels
- Viewing subscriber and subscribed channel lists
- Creating, updating, and deleting playlists
- Adding and removing videos from playlists
- Viewing user playlists
- Liking and unliking videos, comments, and tweets
- Viewing liked videos
- Adding, updating, and deleting comments on videos
- Viewing channel statistics (views, subscribers, videos, likes)
- Accessing all uploaded videos by user
- Endpoint to verify the backend's health
- Api documention using swagger-ui-express
- seed fake data into database using faker package
- Node.js (v21.1.0)
- Express.js (4.18.2)
- MongoDB
- Cloudinary
-
Clone the repository:
git clone https://github.com/manishpali17/youtube-backend.git
-
Install dependencies:
# change direactory cd youtube-backend npm i
-
Set up environment variables: Create a .env in root of project and fill in the required values
# Create .env file for environment variables touch .env
PORT=3000 NODE_ENV=<development> # if you want stack and seeding functionality MONGO_URI=<mongodb connection string> CORS_ORIGIN=* ACCESS_TOKEN_SECRET=<your token secret> ACCESS_TOKEN_EXPIRY=1d REFRESH_TOKEN_SECRET=< your refresh token secret> REFRESH_TOKEN_EXPIRY=10d CLOUDINARY_CLOUD_NAME=<your cloud name> CLOUDINARY_API_KEY=<your api key> CLOUDINARY_API_SECRET=<your api secret>
-
Start the server:
# Start the server using npm npm run dev
Server will start on Port:3000
If you wish to contribute to this project, please feel free to contribute.