This Node.js project provides a foundation for building a platform with video sharing and social features inspired by YouTube and Twitter.
Features:
- User authentication secured with bcrypt
- Video upload and storage using Multer and Cloudinary
- Session management with JWT and cookie-parser
- Cross-origin requests enabled with CORS
- Built-in "like" feature
- Extendable for "tweet" functionalities with additional logic and database design
Dependencies:
- Express (framework)
- Mongoose (database)
- bcrypt (authentication)
- multer (file upload)
- cloudinary (storage)
- cookie-parser (session)
- jsonwebtoken (authentication)
- cors (cross-origin requests)
- dotenv (environment variables)
- mongoose-aggregate-paginate-v2 (pagination)
Getting Started:
- Clone the repository and install dependencies:
git clone https://github.com/AmanKumar1115/YouTube-Backend.git cd youtube-backend npm install
- Configure environment variables (
.env
) with details like database connection and Cloudinary keys with the help of (.env.sample). - Start the server:
npm run dev
- Explore and customize the code in
routes
,models
, and other directories.
Note: This is a basic project structure and requires further development for specific functionalities.
- Consider using a framework like Next.js or Nuxt.js for the frontend.
- Explore additional features like comments, playlists, and user channels.
- Implement robust security measures for user data and video content.