ViewTube API
A robust, scalable REST API powering a comprehensive video-sharing platform.
Technologies Used
Project Overview
ViewTube API is the foundational backend infrastructure for the ViewTube ecosystem. It handles secure user authentication, optimized video and image uploads, and complex engagement metrics. Engineered with modern Node.js practices, it offers performant endpoints for managing user subscriptions, video comments, likes, dynamic playlists, and a micro-blogging tweet feature, making it a highly complex domain-driven data layer.
Key Features
Secure user authentication using JSON Web Tokens (JWT) and bcrypt.
Optimized file handling and external storage via Multer and Cloudinary.
Advanced engagement tracking including video likes, comments, and micro-blogging.
Complex user relationship mapping enabling channel subscriptions.
Comprehensive video and custom playlist management endpoints.
High-Level Architecture
Constructed as a modular REST API mapped with Express.js routers. State and relational structures are persisted via MongoDB utilizing Mongoose schemas and complex aggregation pipelines to calculate engagement metrics. Incoming media streams are intercepted via Multer middleware and immediately offloaded to Cloudinary for scalable asset storage, ensuring the main application server remains completely decoupled from heavy file I/O operations.
Challenges & Learnings
Architecting performant MongoDB aggregation pipelines to swiftly calculate real-time user engagement metrics—such as subscriber counts, total video views, and like-to-dislike ratios—without causing application bottlenecks during high concurrency requests.