MP3 Video Converter

Explore
  • Python
  • Flask
  • Docker
  • Kubernetes
  • Minikube
  • k9s
  • MySQL
  • MongoDB
  • RabbitMQ
  • Distributed Systems
Project architecture

What Is This Project?

This is a full-stack microservices application that takes an uploaded MP4 video, converts it into MP3 audio, and lets the user download the result. The user also receives an email notification once the conversion is done.

But the true goal of this project is not just converting files β€” it's about understanding how to build and run microservice-based applications inside a Kubernetes cluster.

Everything is built from the ground up using containerized services, asynchronous queues, and cloud-native patterns β€” deployed in a fully functioning local K8s environment using Minikube.

🧩 Services Overview

Here’s what each part of the application does:

πŸ›‚ Auth Service

  • Handles user authentication and JWT validation
  • Connects to a MySQL database containing user credentials
  • Exposes /login and /verify endpoints

πŸšͺ Gateway Service

  • Acts as the entry point for all external requests
  • First checks if the user is authorized (via the Auth Service)
  • Stores uploaded videos in a MongoDB database
  • Sends a message to a queue (video) for further processing
  • Exposed via a Kubernetes Ingress to allow traffic from outside the cluster

🎞️ Converter Service

  • Listens to the video queue as a consumer
  • Downloads the MP4 video from MongoDB
  • Converts it into an MP3 file using MoviePy
  • Stores the MP3 in another MongoDB collection
  • Publishes a new message to the mp3 queue

πŸ“© Notification Service

  • Listens to the mp3 queue
  • When a new MP3 is ready, it sends an email notification to the user
  • Uses Google SMTP for email delivery

πŸ“¬ RabbitMQ

  • Contains two queues: video and mp3
  • Enables asynchronous communication between services

πŸ—ƒοΈ Databases

  • MySQL (users) – for authentication and login
  • MongoDB (videos) – stores uploaded MP4s (via GridFS)
  • MongoDB (mp3s) – stores converted MP3s (also via GridFS)
GridFS is used instead of BSON to handle large binary files like video/audio.

πŸŒ€ Full Workflow

  1. User sends a POST request with a video to the /upload endpoint
  2. The Gateway validates the JWT with the Auth Service
  3. If valid, it stores the video and pushes a message to the video queue
  4. The Converter picks it up, converts it to MP3, stores the result, and pushes a message to the mp3 queue
  5. The Notification service reads the queue and sends an email to the user
  6. The user can then download the MP3 via a /download link
MP3 Video Converter | Project