A powerful backend for a full-fledged video-sharing platform built with Node.js, Express, MongoDB, and Cloudinary. It handles everything from user authentication to video uploads, playlists, likes, subscriptions, and much more.
- JWT Authentication (Access + Refresh Tokens)
- Cloudinary File Uploads (Thumbnail + Video)
- Video CRUD with pagination, filters, sorting
- Likes / Subscriptions / Comments / Playlists
- User profile with avatar & cover image updates
- Postman-tested REST API
- MongoDB Aggregations for advanced queries
- Node.js + Express.js
- MongoDB + Mongoose
- Cloudinary for file uploads
- JWT for authentication
- Multer for file handling
- Postman for API testing
- Render for backend hosting
├── src
│ ├── controllers/ # Business logic of each route
│ ├── middlewares/ # JWT, error handling, file handling
│ ├── models/ # Mongoose schemas (User, Video, Comment, etc.)
│ ├── routes/ # All Express routes
│ ├── utils/ # Utility files (Cloudinary logic, error handlers, etc.)
│ ├── index.js # Entry point
│ └── app.js # Express App config
├── .env # Environment variables
├── .gitignore # Files to be ignored by Git
├── package.json # Project metadata and dependencies
git clone https://github.com/your-username/your-repo-name.git
cd your-repo-name
npm install
npm run dev
Create a .env
file in the root with the following:
PORT=8000
MONGODB_URI=your_mongodb_uri
ACCESS_TOKEN_SECRET=your_access_token_secret
REFRESH_TOKEN_SECRET=your_refresh_token_secret
CLOUDINARY_CLOUD_NAME=your_cloud_name
CLOUDINARY_API_KEY=your_api_key
CLOUDINARY_API_SECRET=your_api_secret
All routes have been tested with Postman. You can import the collection and start playing around.
This backend is live and deployed on Render:
🔗 VideoTube
You can use this live URL in your frontend or Postman to interact with the API — no local setup needed.
Feel free to raise issues or submit PRs to improve the project.
Made with ❤️ by Kartik Garg Github:Github LinkedIn:LinkedIn
A Big Thanks To Hitesh Sir Chai aur Code for this wonderful journey of learning this project and backend.