Skip to content

hseyaj04/video-streaming-app-backend

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

39 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Video Streaming App Backend Node.js Express MongoDB

📌 Overview

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.

✨ Features

  • 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

🚀 Getting Started

Prerequisites

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

Installation

Follow these steps to set up the project:

  1. Clone the repository:

    git clone [TODO: REPO_URL]
    cd video-streaming-app-backend
  2. Install dependencies:

    npm install
  3. 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]
  4. Start the development server:

    npm run dev

Environment Variables

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]

Key Endpoints

  • 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

⚙️ Configuration

Important service configurations can be found in the .env file. Ensure all required environment variables are set correctly.

🤝 Contributing

We welcome contributions!

📬 Contact

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! 🚀

About

Backend

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published