StreamVault
Production-Grade REST API with Dual-Token Auth & Media Pipeline
The Problem & Motivation
Building a video platform requires managing heavy media uploads, low-latency streaming delivery, secure credential refreshes, and complex social graphs (subscribers, playlists, likes).
StreamVault provides the complete backend infrastructure for a high-performance video-sharing platform. Written entirely in Node.js and Express, it showcases clean software design patterns, robust error handling, and sophisticated MongoDB aggregation pipelines.
System Architecture & Stack
Structured with strict separation of concerns into controllers, service helpers, route definitions, and custom error classes. Utilizes MongoDB aggregation pipelines for multi-stage analytics calculations (such as calculating channel subscriber counts and video watch time metrics).
Implemented Capabilities
Obstacle & Resolution
Implementing safe refresh-token rotation to mitigate token replay attacks, ensuring tokens are properly invalidated upon logout while handling intermittent network disconnects on mobile clients.
What I Learned
Mastered production API design principles: consistent error responses, modular route handlers, aggregation pipeline optimization, and safe handling of multipart form uploads in memory vs disk buffers.