VividStream
Full-stack video streaming and community platform with production-grade authentication.
Overview & Context
VividStream is an end-to-end fullstack platform built with the MERN stack (MongoDB, Express, React, Node.js). It supports video uploads with cloud transcode pipelines, channel subscriptions, like/dislike interactions, and personalized watch histories.
The Technical Challenge
Video platforms require robust backend handling: handling multi-megabyte media uploads reliably, securely managing sessions without storing tokens in vulnerable localStorage, and running complex multi-table queries without MongoDB slowdowns.
The Engineered Solution
Architected an Express backend utilizing Multer for temporary disk staging and direct streaming to Cloudinary. Implemented dual JWT authentication (short-lived access token + long-lived refresh token in HttpOnly cookies) and optimized feed queries using MongoDB Aggregation Pipelines ($lookup, $project, $facet).
System Architecture & Key Decisions
Aggregation Pipeline Optimization
Custom multi-stage MongoDB pipelines to calculate view counts, likes, and subscription states in a single database roundtrip.
Secure Session Lifecycle
Silent token refreshes prevent logout while protecting against cross-site scripting (XSS) attacks.
RESTful API Separation
Decoupled Express routers for auth, videos, comments, playlists, and user profiles with centralized error handling.
Key Features Shipped
- ✓Secure dual JWT authentication with HttpOnly cookie rotation
- ✓Cloudinary media integration with video upload streaming
- ✓MongoDB aggregation pipelines for watch history and subscriber counts
- ✓Interactive commenting system with nested replies
- ✓Responsive video player with full controls and related recommendations
What I Learned
- Mastered MongoDB aggregation frameworks, unravelling arrays, and foreign key projections.
- Deepened understanding of web security best practices (CORS, HttpOnly cookies, token revocation).
- Learned how to design clean RESTful routes that make frontend consumption intuitive.