Skip to content
for recruiters
back to work

case study · 2025

VTube

A scalable video-sharing platform built on the MERN stack.

Problem

Video platforms need fast uploads, reliable streaming, and an auth model that scales — without a heavy infrastructure budget.

Approach

A MERN architecture with JWT authentication, MongoDB aggregation pipelines for feeds and analytics, and Multer + Cloudinary for resilient upload and delivery. The React frontend uses the Context API for predictable state.

Architecture

Results

Auth

JWT

Media

Cloudinary

Stack

MERN

// code

vtube.ts
// Aggregation: a creator's feed with view counts
const feed = await Video.aggregate([
  { $match: { owner: userId, published: true } },
  { $lookup: {
      from: "likes", localField: "_id",
      foreignField: "video", as: "likes",
  } },
  { $addFields: { likeCount: { $size: "$likes" } } },
  { $sort: { createdAt: -1 } },
  { $limit: 20 },
]);

lessons learned