🚀 Overview 🚀
This project is a backend implementation for a YouTube-like platform, built using Node.js and Express.js. The platform provides a robust and scalable architecture, leveraging MongoDB for database management and integrating various features to ensure a secure and dynamic user experience.
- User Registration & Authentication: Secure user registration, login, and logout functionalities.
- Password Management: Support for changing and updating passwords with enhanced security.
- Token-Based Authentication: Secure access and refresh tokens using
jsonwebtoken
for safe and seamless sessions. - Channel Subscription: Subscribe to channels with dynamic updates to subscriber counts.
- User History Tracking: Track user activities to provide a personalized experience.
- File Uploads: Integrated
multer
for handling avatar (required) and cover image uploads, with support for updating both. - Middleware Injection: Enhanced application security and functionality through strategic middleware injection.
- Data Encryption: Passwords are securely encrypted using
bcrypt
. - Database Management: Utilized MongoDB with the powerful aggregate pipeline to streamline data processing.
I'm currently working on adding the following functionalities:
- Liked Videos
- Playlists
- Tweet Integration
If you're interested in contributing to the frontend development for this project, I'd love to collaborate! Feel free to reach out or submit a pull request.
- Node.js
- Express.js
- MongoDB
- Multer for file uploads
- JWT (jsonwebtoken) for authentication
- Cookie Parser
- Bcrypt for password encryption
- Aggregate Pipeline for data processing in MongoDB
Make sure you have the following installed:
- Node.js (v14 or higher)
- MongoDB (local or cloud-based)
- Git
-
Clone the repository:
git clone https://github.com/yourusername/youtube-platform-backend.git cd youtube-platform-backend
-
Install dependencies:
npm install
-
Set up environment variables:
Create a
.env
file in the root directory and add the following:PORT=8000 MONGO_URI=your_mongodb_connection_string JWT_SECRET=your_jwt_secret_key CLOUD_STORAGE_API_KEY=your_cloud_storage_api_key
Replace the placeholder values with your actual credentials.
-
Run the server:
npm start
The server will start on
http://localhost:8000
.