Skip to content

Latest commit

 

History

19 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Streamline - Media Streaming Backend

Streamline is a high-performance, scalable backend for a media streaming platform, inspired by platforms like YouTube (but not a clone!). This backend powers core features such as user authentication, video uploads, playlist management, and dynamic user interactions including comments, likes, and subscriptions.

🚀 Features

  • User Authentication:
    Secure login/register system using JWT and bcrypt for robust password and session security.

  • Video Uploads & Delivery:
    Supports efficient video uploads and streaming, utilizing Cloudinary for optimized media storage and accelerated delivery (boosted delivery speed by 40%).

  • Playlist Management:
    Users can create, update, and manage playlists for better content organization.

  • User Interactions:

    • Comments: Aggregated with user details and like counts.
    • Likes: Like and unlike videos and comments.
    • Subscriptions: Subscribe/unsubscribe to channels.
    • Tweets: Custom tweet-like feature for short video updates.
  • Performance-Oriented Database Design:
    Built with MongoDB and Mongoose; optimized schemas for users, videos, playlists, and interactions for rapid queries and scalability.

  • Custom Middleware & Routing:
    Modular and maintainable code structure using Express.js, with custom middleware for authentication, error handling, and more.

  • Health Checks & Dashboards:
    Integrated endpoints for service health monitoring and admin dashboards.

  • Controllers: All major business logic, such as handling video, user, comment, playlist, and subscription operations.

  • Middleware: Authentication, validation, and error-handling logic.

  • Routes: API endpoints mapped to controllers.

  • Models: Mongoose schemas for Users, Videos, Playlists, Comments, etc.


🛠️ Tech Stack

  • Backend: Node.js, Express.js
  • Database: MongoDB (with Mongoose ODM)
  • Authentication: JWT, bcrypt
  • Media Storage/Delivery: Cloudinary
  • Other: Custom middleware, RESTful API design

📈 Key Highlights

  • Improved media delivery speed by 40% through Cloudinary integration.
  • Aggregated comment endpoints fetch user details and like counts efficiently.
  • Modular, scalable, and production-ready backend design.

🔒 Security

  • Passwords are hashed using bcrypt before storage.
  • All sensitive routes are protected using JWT-based authentication middleware.
  • Input validation is applied across endpoints.

🚦 Getting Started

Prerequisites

  • Node.js (v14+)
  • MongoDB instance (local or cloud)
  • Cloudinary account (for media storage)

Installation

  1. Clone the repo:

    git clone https://github.com/Itsmeinayath/Backend-Project.git
    cd Backend-Project
  2. Install dependencies:

    npm install
  3. Configure environment variables:
    Create a .env file with the following:

    MONGODB_URI=your_mongodb_connection_string
    JWT_SECRET=your_jwt_secret
    CLOUDINARY_CLOUD_NAME=your_cloud_name
    CLOUDINARY_API_KEY=your_api_key
    CLOUDINARY_API_SECRET=your_api_secret
    
  4. Run the server:

    npm start

    The server will start on http://localhost:3000 (or the port in your .env).


📃 API Documentation

  • API endpoints are organized by resource (users, videos, playlists, etc.).
  • See the /routes directory and controller files for detailed endpoint documentation.

🤝 Contributing

Contributions are welcome! Please open an issue or submit a pull request for feature requests, bug fixes, or improvements.


📄 License

This project is licensed under the MIT License.


📬 Contact

For questions, suggestions, or collaborations, please open an issue or reach out via GitHub.


About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Used by

Contributors

Languages