TuneRipperBot
TuneRipperBot is a Telegram bot that allows users to download Spotify tracks and playlists by matching them with audio from YouTube. Built using .NET 8 and following Clean Architecture principles, this project integrates the Spotify API, YouTube Data API, and yt-dlp to deliver high-quality audio to users through a simple Telegram interface.
Uses TgBotPlat.WebAPI for telegram bot implementation.
🚀 What It Does
- Accepts Spotify links (tracks, albums, playlists) via Telegram messages
- Accepts search queries for tracks, albums, playlists, and artists
- Searches for matching audio on YouTube
- Downloads and processes audio using yt-dlp
- Sends the final audio files back to the user through Telegram
- Includes track metadata (title, artist, album art, etc.)
🧰 Tech Stack
Area |
Tools/Frameworks |
Backend |
C#, .NET 8, Clean Architecture |
APIs |
Spotify Web API, YouTube Data API, Telegram Bot API |
Media Handling |
yt-dlp |
Database |
MSSQL Server (Production), SQLite (Local/Dev) |
ORM |
Entity Framework Core |
Web Hosting |
RESTful API hosted with IIS |
Deployment |
Docker, CI/CD Pipelines |
💡 Features
- 🔗 Accepts Spotify track, album, and playlist URLs
- 🔍 Accepts commands for searcing spotify tracks, artists, albums, and playlists
- 🔍 Uses YouTube API to find the best audio match
- 📥 Downloads high-quality audio via yt-dlp
- 🖼️ Embeds album art and metadata
- 📤 Sends audio back to user through Telegram
- 🧠 Caches downloads and metadata for speed
- 🛠️ Clean, layered architecture for easy testing and maintenance
- 🐳 Dockerized for easy deployment
- 🔁 CI/CD ready for automated build and deployment
- 🩺 Health check endpoints to monitor services, infrastructures, and external APIs status
🛠️ Architecture Overview
The project follows Clean Architecture, separating concerns across the following layers:
- Domain – Core business logic and entities
- Application – Use cases, services, interfaces
- Infrastructure – External API integrations, database, file system
- Presentation – REST API for Telegram Bot endpoints and Telegram bot user interaction interface
- CrossCutting – For implementing cross cutting concerns
📌 Usage (High-Level Flow)
- User sends a Spotify link to the Telegram bot
- Bot parses the link and extracts metadata via Spotify API
- YouTube is queried for the closest match using title/artist info
- Audio is downloaded using yt-dlp and enriched with metadata
- Bot sends the MP3 (or preferred format) back to the user in chat
📦 Deployment
- The app can be deployed using Docker or IIS
- Supports both SQL Server and SQLite via configuration
- CI/CD pipelines can be set up to auto-deploy on push or tag
For sensitive API keys (Spotify, YouTube, Telegram), use environment variables or Docker secrets.
📬 Coming Soon
- ✅ User authentication or bot usage limits
- 🔧 Configurable audio quality and format options