A video sharing platform inspired by YouTube, built with Node.js, Express, and MongoDB. VideoTube allows users to upload, view, and manage videos, create playlists, and interact with content in a dynamic environment.
- User Authentication: Secure login and registration with JWT-based sessions.
- Video Management: Upload, view, and delete videos.
- Playlist System: Create, update, and manage playlists.
- Video Comments: Users can comment on videos.
- Like System: Rate videos with likes and dislikes.
- Search Functionality: Search for videos by title, description.
- Subscription Functionality: User can subscribe any channel.
- Dashboard Functionality: Get all video of a channel and channel stats.
- Tweet System: User can create, update,delete tweets.
- Backend: Node.js, Express.js
- Database: MongoDB, Mongoose
- Authentication: JWT (JSON Web Tokens)
- File Storage: Multer for handling video uploads
- Environment Management: dotenv
- Development Tools: Nodemon,prettier
VideoTube/
│
├── public/
│ └──temp/ # Temporary media files
├── src/
│ │
│ ├── controllers/ # Route controllers
│ │ ├── comment.controller.js
│ │ ├── dashboard.controller.js
│ │ ├── healthcheck.controller.js
│ │ ├── like.controller.js
│ │ ├── playlist.controller.js
│ │ ├── subscription.controller.js
│ │ ├── tweet.controller.js
│ │ ├── user.controller.js
│ │ └── video.controller.js
│ │
│ ├── db/ # Database connection
│ │ └── index.js
│ │
│ ├── models/ # Mongoose models
│ │ ├── like.models.js
│ │ ├── like.models.js
│ │ ├── like.models.js
│ │ ├── comment.models.js
│ │ ├── like.models.js
│ │ ├── playlist.models.js
│ │ ├── subscription.models.js
│ │ ├── tweet.models.js
│ │ ├── user.models.js
│ │ └── video.model.js
│ │
│ ├── routes/ # API routes
│ │ ├── comment.routes.js
│ │ ├── dashboard.routes.js
│ │ ├── healthcheck.routes.js
│ │ ├── like.routes.js
│ │ ├── playlist.routes.js
│ │ ├── subscription.routes.js
│ │ ├── tweet.routes.js
│ │ ├── user.routes.js
│ │ └── video.routes.js
│ │
│ ├── middleware/ # Custom middleware
│ │ ├── auth.middleware.js
│ │ ├── multer.middleware.js
│ │ └── validators.middleware.js
│ │
│ ├── utils/ # Utility functions
│ │ ├── ApiError.js
│ │ ├── ApiResponse.js
│ │ ├── asyncHandler.js
│ │ └── cloudinary.js
│ │
│ ├── validators/ #Validations
│ │ └── user.validators.js
│ │
│ ├── app.js # Router, middlewares setup
│ ├── constant.js
│ └── index.js # Entry point
│
├── .env
├── .env.sample # Sample environment variables
├── .gitignore
├── package-lock.json
├── package.json
├── readme.md
└── VideoTube.postman_collection.json
-
Clone the repository:
git clone https://github.com/iamsoumaditya/VideoTube.git cd VideoTube -
Install Dependencies
npm install
-
Set up environment
copy all enviroment variables from .env.sample and add your own credentials -
Run Command
npm run dev #development
npm run start #production
- Visit
http://localhost:{PORT}to access the backend API. - Use a tool like Postman to test endpoints.
- You can create users, upload videos, and manage playlists & etc.
- Refer to the postman collection documentation
Contributions are always welcome!
- Fork the repository.
- Create your feature branch
git checkout -b feature/new-feature
- git commit -m "Added new feature"
Soumaditya Roy
GitHub: @iamsoumaditya