8000
Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🎵 Playlist Porter

Transfer playlists between Spotify and YouTube Music — instantly, privately, and for free.

Next.js TypeScript License


✨ Features

  • Spotify ↔ YouTube Music — transfer in either direction
  • Smart track matching — uses ISRC codes for exact matching, falls back to title + artist search
  • Live progress — real-time match count as the transfer runs (Server-Sent Events)
  • Privacy-first — tokens are never stored on the server; everything stays in your browser session
  • One-click Vercel deploy

📸 How It Works

Connect Spotify → Connect YouTube Music → Pick a playlist → Hit Transfer

For each track:
  1. Search by ISRC (exact match, ~99% accuracy)
  2. Fall back to "track + artist" search (~85%)
  3. Fall back to loose search (~70%)

Create new playlist on target → Add all matched tracks

🚀 Running Locally (Step by Step)

Prerequisites

  • Node.js 18+ installed on your machine
  • A free Spotify account
  • A Google account (for YouTube Music)

Step 1 — Clone the repo

git clone https://github.com/nikhil-thomas-a/playlist-porter.git
cd playlist-porter

Step 2 — Install dependencies

npm install

Step 3 — Set up Spotify API credentials

  1. Go to developer.spotify.com/dashboard
  2. Log in and click "Create app"
  3. Fill in:
    • App name: Playlist Porter (or anything you like)
    • Redirect URI: http://localhost:3000/api/auth/callback/spotify
    • Which API/SDKs: check Web API
  4. Click Save
  5. On your app page, click Settings — you'll see your Client ID and Client Secret

Step 4 — Set up Google / YouTube Music API credentials

  1. Go to console.cloud.google.com
  2. Create a new project → enable YouTube Data API v3
  3. Go to APIs & Services → OAuth consent screen → External → create
  4. Go to APIs & Services → Credentials → + Create Credentials → OAuth client ID
    • Application type: Web application
    • Redirect URI: http://localhost:3000/api/auth/callback/google
  5. Copy your Client ID and Client Secret

Step 5 — Create your environment file

Create .env.local in the project root:

SPOTIFY_CLIENT_ID=paste_your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=paste_your_spotify_client_secret_here

GOOGLE_CLIENT_ID=paste_your_google_client_id_here
GOOGLE_CLIENT_SECRET=paste_your_google_client_secret_here

NEXTAUTH_URL=http://localhost:3000
NEXTAUTH_SECRET=any_long_random_string_here

Step 6 — Run the app

npm run dev

Open http://localhost:3000 in your browser. Done!


⚡ Deploy to Vercel

Deploy with Vercel

  1. Click the button above
  2. Add all environment variables from .env.example
  3. Update redirect URIs in Spotify/Google dashboards to your Vercel URL
  4. Set NEXTAUTH_URL to your Vercel deployment URL

⚠️ Known Limitations

Limitation Reason
Only one platform connected at a time per sign-in NextAuth uses a single session; connect one, then switch accounts to connect the other
YouTube transfers are slower YouTube API requires adding tracks one by one; Spotify supports batch writes of 100
YouTube quota: 10,000 units/day Each track search costs 100 units on the free tier — large playlists may hit the daily limit
YouTube "Liked Songs" not readable YouTube Music's liked songs are private and not exposed via the Data API
Podcasts and episodes are skipped Cross-platform podcast support is out of scope

📁 Project Structure

src/
├── app/
│   ├── api/
│   │   ├── auth/[...nextauth]/   # OAuth for Spotify + Google
│   │   ├── playlists/            # Fetch playlists from either platform
│   │   └── transfer/             # Core transfer engine (SSE streaming)
│   ├── globals.css
│   ├── layout.tsx
│   ├── page.tsx                  # All UI in one file
│   └── providers.tsx
├── lib/
│   ├── spotify.ts                # Spotify Web API
│   └── youtube.ts                # YouTube Data API v3
└── types/
    ├── index.ts
    └── next-auth.d.ts

🗺 Roadmap

  • Manual search fallback for unmatched tracks
  • Transfer history
  • Export playlist as CSV / JSON
  • Batch transfer multiple playlists

📄 License

MIT — free to use, modify, and distribute.

About

Transfer playlists between Spotify and YouTube Music — ISRC matching for ~99% accuracy, live SSE progress, privacy-first.

Topics

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages

0