Skip to content

Purvjadh/Backend-Project

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

24 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Backend Project

🎬 Video Platform Backend

This project is a backend service for a video-sharing platform built with Node.js, Express, and MongoDB.
It follows standard backend practices with secure authentication and efficient media handling.


🚀 Project Overview

  • User authentication with JWT (JSON Web Tokens)
  • Password hashing and security using bcrypt
  • Access tokens & Refresh tokens for session management
  • Cloudinary integration for file upload & deletion
  • Video management (upload, update, publish/unpublish, delete)
  • Comment system with likes
  • Playlists and video organization
  • Channel stats, subscriptions, and profiles
  • Tweet-like micro-posts with likes
  • Watch history and liked videos
  • Standard backend structure with controllers & routes

🎥 Video

  • getAllVideos, getVideoById, publishAVideo, updateVideo, deleteVideo, togglePublishStatus

💬 Comments

  • addComments, deleteComment, getVideoComments, updateComment, toggleCommentLike

👍 Likes

  • toggleVideoLike, toggleTweetLike, toggleCommentLike, getLikedVideos

📂 Playlists

  • createPlaylist, getPlaylistById, getUserPlaylists, addVideoToPlaylist, removeVideoFromPlaylist, updatePlaylist, deletePlaylist

📡 Channel & Subscriptions

  • getChannelStats, getChannelVideos, getSubscribedChannels, getUserChannelSubscribers, toggleSubscription, getUserChannelProfile

🐦 Tweets

  • createTweet, deleteTweet, getUserTweet, updateTweet

👤 User

  • registerUser, loginUser, logoutUser, getCurrentUserDetails, updateAccountDetails, updateUserAvatar, updateUserCoverImage, changeUserPassword

🕒 History

  • getWatchHistory

🔑 Auth & Tokens

  • accessRefreshToken

☁️ Cloudinary

  • uploadFromCloudinary, deleteFromCloudinary

🏥 Utility

  • healthCheck

📂 API Routes

🎥 Video Routes

  • GET / → getAllVideos
  • POST /publishVideo → publishAVideo
  • GET /:videoId → getVideoById
  • PATCH /:videoId → updateVideo
  • DELETE /:videoId → deleteVideo
  • PATCH /toggle/publish/:videoId → togglePublishStatus

💬 Comment Routes

  • GET /:videoId → getVideoComments
  • POST /add/:videoId → addComments
  • PATCH /update/:commentId → updateComment
  • DELETE /delete/:commentId → deleteComment
  • POST /comment/:commentId → toggleCommentLike

👍 Like Routes

  • GET /liked-videos → getLikedVideos
  • POST /video/:videoId → toggleVideoLike
  • POST /c/:tweetId → toggleTweetLike

📂 Playlist Routes

  • POST /create-playlist → createPlaylist
  • GET /user/:userId → getUserPlaylists
  • GET /c/:playlistId → getPlaylistById
  • PATCH /add/:playlistId/:videoId → addVideoToPlaylist
  • PATCH /remove/:playlistId/:videoId → removeVideoFromPlaylist
  • DELETE /delete/:playlistId → deletePlaylist
  • PATCH /update/:playlistId → updatePlaylist

📡 Channel & Subscription Routes

  • GET /stats → getChannelStats
  • GET /videos → getChannelVideos
  • POST /c/:channelId → toggleSubscription
  • GET /userChannelSubscribers/:channelId → getUserChannelSubscribers
  • GET /subscribedChannels/:subscriberId → getSubscribedChannels
  • GET /c/:username → getUserChannelProfile

🐦 Tweet Routes

  • POST /create-tweet → createTweet
  • GET /user-tweet → getUserTweet
  • PATCH /:tweetId → updateTweet
  • DELETE /:tweetId → deleteTweet

👤 User Routes

  • POST /register → registerUser
  • POST /login → loginUser
  • POST /logout → logoutUser
  • POST /refresh-token → accessRefreshToken
  • POST /change-password → changeUserPassword
  • GET /current-user → getCurrentUserDetails
  • PATCH /update-account-details → updateAccountDetails
  • PATCH /avatar → updateUserAvatar
  • PATCH /cover-image → updateUserCoverImage

🕒 History Routes

  • GET /watch-history → getWatchHistory

🏥 Utility Routes

  • GET /health-check → healthCheck

⚡ Tech Stack

  • Node.js & Express.js – backend framework
  • MongoDB (Mongoose) – database
  • JWT – secure authentication
  • bcrypt – password hashing & encryption
  • Cloudinary – media upload & storage
  • Access/Refresh Tokens – token-based session handling

🔐 Security Practices

  • Passwords stored using bcrypt hashing
  • Authentication with JWT access & refresh tokens
  • Secure media handling via Cloudinary
  • Middleware-protected routes for authentication and authorization

About

A Backend Project

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published