This project is a backend system inspired by YouTube's functionality, developed using Node.js, Express.js, MongoDB, JWT Tokens, Multer, Cloudinary, and other related technologies. It aims to replicate core features of YouTube, including user authentication, video uploads, likes, comments, and subscriptions. The implementation follows industry best practices for scalability, maintainability, and security.
- User Authentication: Implemented JWT-based authentication for secure user access and management of resources.
- Video Uploads: Provided functionality for users to upload videos, utilizing Multer for file handling and Cloudinary for storage.
- Likes and Comments: Enabled users to express their engagement with videos through likes and comments, enhancing interactivity.
- Subscription System: Implemented a subscription model allowing users to follow other channels and receive updates on new content.
- Node.js: Server-side runtime environment for JavaScript.
- Express.js: Web application framework for Node.js, facilitating routing and middleware integration.
- MongoDB: NoSQL database management system for flexible data storage.
- JWT Tokens: Secure method for user authentication and authorization.
- Multer: Middleware for handling multipart/form-data, enabling file uploads.
- Cloudinary: Cloud-based media management service for storing and delivering multimedia content.
- Clone the repository:
git clone https://github.com/AdarshKashyap14/Backend
- Install dependencies:
npm install
- Set up environment variables:
- Create a
.env
file in the root directory. - Define the following variables:
PORT=3000 MONGODB_URI=<your_mongodb_uri> ACCESS_TOKEN_SECRET=<your_access_token> ACCESS_TOKEN_EXPIRY=<givenumberofdays> REFRESH_TOKEN_SECRET = <your_refresh_token> REFRESH_TOKEN_EXPIRY = <givenumberofdays> CLOUDINARY_NAME=<your_cloudinary_name> CLOUDINARY_API_KEY=<your_cloudinary_api_key> CLOUDINARY_API_SECRET=<your_cloudinary_api_secret>
- Create a
- Start the server:
npm start
- Use tools like Postman or curl to interact with the API endpoints.
- Refer to the API documentation for details on available endpoints and request/response formats.
Contributions are welcome! Feel free to open issues or pull requests for bug fixes, improvements, or new features.
This project is licensed under the MIT License.