Case Study

Mega Drive.

A full-stack, production-ready cloud storage SaaS engineered to replicate a native operating system file explorer in the browser.

Overview

### ☁️ Overview MDrive bridges the gap between native desktop environments and web-based file management. It provides a highly responsive UI with comprehensive support for deep file tree operations, avoiding typical platform limitations like serverless execution timeouts and structural bottlenecks. ### ✨ Core Features * **Direct-to-Cloud Uploads:** Bypasses Vercel's 4.5MB serverless payload cap by handling unsigned client-side streaming straight to Cloudinary, tracking file data via automated post-upload DB syncing. * **Advanced File System Logic:** Full support for Cut, Copy, and Paste operations across deeply nested systems with built-in cyclic prevention (`isDestInsideSource`). * **Secure Public Sharing:** Generates unguessable URL access tokens built over the Edge-compatible Web Crypto API with instant visibility toggles. * **Bulk Operations & Global Search:** Offers batch-deletions, batch-moving, and debounced custom APIs to control server load and eradicate the Thundering Herd issue. * **Cloud Pulse Tracker:** A dynamic, dashboard capacity monitor that mirrors storage expansions and reductions in real-time. ### 🧠 Engineering Challenges Solved 1. **The Serverless Cap:** Avoided HTTP 413 errors completely by shifting processing architecture to client-side direct presets. 2. **Infinite Recursion Loops:** Eliminated server-crashing directory loops (e.g., pasting Folder A into Folder A) using an optimized recursive tree-checking condition. 3. **MongoDB Null Trap:** Resolved `E11000 Duplicate Key` errors on unique sparse indices during access revocation by engineering updates with the `$unset` operator instead of resetting to null.

Technical Stack

NextJS
Typescript
TailwindCSS
MongoDB
icon
Clerk
icon
Stream
FramerMotion
Cloudinary

Core Features

  • Fully Responsive Architecture
  • Optimized Asset Delivery
  • End-to-End Data Flow