2025Live

VividStream

Full-stack video streaming and community platform with production-grade authentication.

ReactNode.jsExpressMongoDB
VividStream preview
01

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).

02

System Architecture & Key Decisions

Architecture 01

Aggregation Pipeline Optimization

Custom multi-stage MongoDB pipelines to calculate view counts, likes, and subscription states in a single database roundtrip.

Architecture 02

Secure Session Lifecycle

Silent token refreshes prevent logout while protecting against cross-site scripting (XSS) attacks.

Architecture 03

RESTful API Separation

Decoupled Express routers for auth, videos, comments, playlists, and user profiles with centralized error handling.

03

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
04

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.