The Video Streaming App Backend is a robust and scalable backend solution designed to support a video streaming platform. Built with Node.js, Express, and MongoDB, this backend provides essential functionalities such as user authentication, video upload and management, commenting, and more. It ensures secure and efficient handling of user data and media content, making it an ideal choice for modern video streaming applications.
This project aims to deliver a seamless experience for both users and administrators, offering features like JWT-based authentication, cloud storage integration for media files, and comprehensive API endpoints for various operations. Whether you're building a new video streaming service or enhancing an existing one, this backend serves as a solid foundation.
- User authentication and authorization
- Video upload, update, and deletion
- Commenting on videos
- User profile management
- Secure JWT-based authentication
- Cloudinary integration for media storage
- Comprehensive API documentation
Ensure you have the following software installed:
- Node.js (v14.x or higher)
- npm (v6.x or higher)
- MongoDB (v4.x or higher)
- Cloudinary account for media storage
Follow these steps to set up the project:
-
Clone the repository:
git clone [TODO: REPO_URL] cd video-streaming-app-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=mongodb://localhost:27017 ACCESS_TOKEN_SECRET=[TODO: YOUR_ACCESS_TOKEN_SECRET] REFRESH_TOKEN_SECRET=[TODO: YOUR_REFRESH_TOKEN_SECRET] ACCESS_TOKEN_EXPIRY=1h REFRESH_TOKEN_EXPIRY=7d CLOUDINARY_CLOUD_NAME=[TODO: YOUR_CLOUDINARY_CLOUD_NAME] CLOUDINARY_API_KEY=[TODO: YOUR_CLOUDINARY_API_KEY] CLOUDINARY_API_SECRET=[TODO: YOUR_CLOUDINARY_API_SECRET]
-
Start the development server:
npm run dev
Example .env
template:
PORT=8000
MONGO_URI=mongodb://localhost:27017
ACCESS_TOKEN_SECRET=[TODO: YOUR_ACCESS_TOKEN_SECRET]
REFRESH_TOKEN_SECRET=[TODO: YOUR_REFRESH_TOKEN_SECRET]
ACCESS_TOKEN_EXPIRY=1h
REFRESH_TOKEN_EXPIRY=7d
CLOUDINARY_CLOUD_NAME=[TODO: YOUR_CLOUDINARY_CLOUD_NAME]
CLOUDINARY_API_KEY=[TODO: YOUR_CLOUDINARY_API_KEY]
CLOUDINARY_API_SECRET=[TODO: YOUR_CLOUDINARY_API_SECRET]
- User Registration:
POST /api/v1/users/register
- User Login:
POST /api/v1/users/login
- Publish Video:
POST /api/v1/videos
- Get Video by ID:
GET /api/v1/videos/:videoId
- Update Video:
PATCH /api/v1/videos/:videoId
- Delete Video:
DELETE /api/v1/videos/:videoId
Important service configurations can be found in the .env
file. Ensure all required environment variables are set correctly.
We welcome contributions!
For support or inquiries, please contact email or visit our GitHub page.
Thank you for using the Video Streaming App Backend! We hope it serves your needs well. Happy coding! 🚀