MediaGrab Serveris the backend service for MediaGrab, a media downloading and processing platform. It provides secure APIs, background download processing, and real-time progress updates via WebSockets. The backend powers the MediaGrab frontend and manages download orchestration, file handling, and platform integrations.
- 🔐 Secure API Layer — Validates requests, manages download sessions, and controls access to media resources.
- 📥 Media Download Engine — Handles media extraction and downloading from supported platforms using background workers.
- 📡 Real-Time Progress Updates — WebSocket-based live download status (queued, downloading, processing, completed, failed)..
- 🧵 Background Task Processing — Celery workers for long-running download and processing tasks.
- 📁 File Managemen — Temporary storage, processed file handling, and cleanup.
- ⚙️ Modular Architecture — Clean separation of concerns for scalability and maintainability.
| Layer | Technology |
|---|---|
| Framework | FastAPI |
| Task Queue | Celery |
| Message Broker | Redis |
| Realtime | WebSockets |
| Media Engine | yt-dlp |
| Async | Python AsyncIO |
| API Docs | OpenAPI / Swagger |
-
Clone the repository
git clone https://github.com/samiali12/mediagrab-backend.git cd mediagrab-server -
Create and activate virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt -
Start Celery worker
celery -A app.tasks.celery_worker.celery worker --loglevel=info -
Start the FastAPI server
uvicorn app.main:app --reload
This project is licensed under the MIT License — you are free to use and modify it.
Pull requests are welcome. For major changes, please open an issue first to discuss what you'd like to improve.