# 🎵 Songs2YT

<p align="center">
  <img src="https://img.shields.io/badge/Status-100%25%20Operational-brightgreen?style=for-the-badge" alt="Status">
  <img src="https://img.shields.io/badge/Docker-Supported-blue?style=for-the-badge&logo=docker" alt="Docker">
  <img src="https://img.shields.io/badge/Edition-Self--hosted-orange?style=for-the-badge" alt="Self-hosted">
  <img src="https://img.shields.io/badge/License-MIT-yellow?style=for-the-badge" alt="License">
</p>

<p align="center">
  <b>Turn your cover art + audio files into YouTube videos automatically. No manual rendering BS.</b><br>
  <i>The ultimate life-saver for creators who waste hours opening Premiere/Vegas just to upload a single track.</i>
</p>

---

## 🔥 What's the deal?

**Songs2YT** is a self-hosted automation beast that takes your audio files (MP3/WAV) and cover images, smashes them together with FFmpeg in a background queue, and uploads them straight to your YouTube channel.

This is the **open-source (self-hosted) edition**:
* 🚫 **Zero limits:** No video upload quotas, no API rate limit bullshit.
* 🔓 **Fully Unlocked:** Playlists and REST API are completely unlocked (`S2YT_EDITION=selfhosted`).
* ☁️ **Full Control:** Run it on your own server. Your data, your rules.

> Check out the hosted version: [songs2yt.com](https://songs2yt.com)

https://www.atakanozban.com/Content/uploads/projects-media/48c48767246741dda0ce3f67e480882f.png
---

## 🛠️ Requirements

* **Docker & Docker Compose** (highly recommended, saves your mental health)
* *Or:* Node 20+, Postgres, Redis, FFmpeg
* Google Cloud OAuth client with **YouTube Data API v3** enabled

---

## 🚀 Quick Start (Docker)

Skip the setup headache. Copy the env, spin it up, and go touch grass:

```bash
# Copy env template
cp .env.example .env

# Fill in GOOGLE_CLIENT_ID, GOOGLE_CLIENT_SECRET, NEXTAUTH_SECRET, and NEXTAUTH_URL
nano .env

# Fire up the engine
docker compose up -d --build
```
* Open `http://localhost:3000`
* OAuth Redirect URL on Google Console: `{NEXTAUTH_URL}/api/auth/callback/google`

## 💻 Local Development 

Want to hack on the codebase? Follow this:

```bash
# 1. Prepare env
cp .env.example .env

# 2. Spin up Postgres & Redis
docker compose -f docker-compose.dev.yml up -d

# 3. Get dependencies
npm install

# 4. Push database schema
npm run db:push

# 5. Run it (open two terminals)
npm run dev      # Terminal 1 (Next.js)
npm run worker   # Terminal 2 (BullMQ/FFmpeg Worker)
```

## 🏗️ Stack

* Next.js (Frontend & API)
* Postgres (Database)
* Redis / BullMQ (Background render queue)
* NextAuth (Google OAuth)
* FFmpeg (The engine merging audio + image)
* YouTube Data API (The rocket launcher pushing to YT)

## 📄 License

This project is licensed under the MIT License.