A full-stack application to convert playlists between music streaming platforms. Supports Spotify → YouTube conversion with intelligent track matching and an embedded player.
Live Demo: tune-bridge.netlify.app
- 🎧 Fetch playlist tracks from Spotify
- 🔍 Convert Spotify tracks to YouTube matches
- 📋 Display standardized track information (name, artists, album, duration, ISRC)
- 🎯 Intelligent search using YouTube Data API v3
▶️ Embedded YouTube player with autoplay and track navigation- 🔗 Shareable playlist links - share converted playlists with friends
- 🎛️ Alternate video selection - pick from multiple YouTube matches per track
- 🎨 Responsive, modern UI built with React and Tailwind CSS
- ⚡ Fast parallel batch processing for quick conversions
- 🛡️ Rate limiting to prevent API abuse
- 💾 Redis/memory caching for playlist storage
- Node.js with Express
- Axios for HTTP requests
- Spotify Web API integration
- YouTube Data API v3 integration via googleapis
- Redis (optional) for playlist caching
- Rate limiting middleware
- Modular platform architecture in
/backend/platforms/
- React with Vite
- React Router for SPA routing
- Tailwind CSS for styling
- YouTube IFrame Player API integration
- Responsive design
- Loading states and error handling
- Node.js (v18 or higher)
- Spotify Developer Account (Sign up here)
- Google Cloud Account with YouTube Data API v3 enabled (Get started here)
git clone https://github.com/steph-sabotasan/TuneBridge.git
cd TuneBridgecd backend
# Install dependencies
npm install
# Create .env file from example
cp .env.example .env
# Edit .env and add your API credentials- Go to Spotify Developer Dashboard
- Create a new app
- Copy the Client ID and Client Secret
- Paste them into your
.envfile
- Go to Google Cloud Console
- Create a new project or select an existing one
- Enable YouTube Data API v3
- Go to Credentials and create an API Key
- (Optional but recommended) Restrict the key to YouTube Data API v3
- Paste the API key into your
.envfile
cd ../frontend
# Install dependencies
npm installcd backend
npm start
# Server runs on http://localhost:3001cd frontend
npm run dev
# Frontend runs on http://localhost:3000- Open http://localhost:3000 in your browser
- Select "Spotify" as the source platform
- Paste a Spotify playlist URL (e.g.,
https://open.spotify.com/playlist/37i9dQZF1DXcBWIGoYBM5M) - Click "Fetch Playlist"
- View the playlist tracks with detailed information
Use the API endpoint directly or integrate into your frontend:
# Example: Convert Spotify tracks to YouTube matches
curl -X POST http://localhost:3001/api/playlist/youtube/convert \
-H "Content-Type: application/json" \
-d '{
"tracks": [
{
"name": "Bohemian Rhapsody",
"artists": ["Queen"],
"album": "A Night at the Opera"
}
]
}'TuneBridge/
├── backend/
│ ├── platforms/ # Platform-specific modules
│ │ ├── spotify.js # Spotify API integration
│ │ └── youtube.js # YouTube Data API integration
│ ├── routes/ # Express routes
│ │ └── playlist.js # Playlist endpoints
│ ├── server.js # Express server setup
│ ├── package.json
│ └── .env.example
├── frontend/
│ ├── src/
│ │ ├── components/ # React components
│ │ │ ├── PlaylistConverter.jsx
│ │ │ └── TrackList.jsx
│ │ ├── services/ # API services
│ │ │ └── api.js
│ │ ├── App.jsx
│ │ ├── main.jsx
│ │ └── index.css
│ ├── index.html
│ ├── vite.config.js
│ ├── tailwind.config.js
│ └── package.json
└── README.md
Fetch playlist tracks from a streaming platform.
Request Body:
{
"url": "https://open.spotify.com/playlist/...",
"platform": "spotify"
}Response:
{
"tracks": [
{
"name": "Song Title",
"artists": ["Artist 1", "Artist 2"],
"album": "Album Name",
"durationMs": 240000,
"isrc": "USUM71234567"
}
],
"count": 1
}Convert Spotify track data to YouTube Music matches.
Request Body:
{
"tracks": [
{
"name": "Bohemian Rhapsody",
"artists": ["Queen"],
"album": "A Night at the Opera",
"durationMs": 354000,
"isrc": "GBUM71029604"
}
]
}Response:
{
"results": [
{
"original": {
"name": "Bohemian Rhapsody",
"artists": ["Queen"],
"album": "A Night at the Opera",
"durationMs": 354000,
"isrc": "GBUM71029604"
},
"youtube": {
"matches": [
{
"videoId": "fJ9rUzIMcZQ",
"title": "Queen – Bohemian Rhapsody (Official Video)",
"channelTitle": "Queen Official",
"channelId": "UCiMhD4jzUqG-IgPzUmmytRQ",
"thumbnail": "https://i.ytimg.com/vi/fJ9rUzIMcZQ/mqdefault.jpg",
"publishedAt": "2008-08-01T09:25:15Z",
"url": "https://www.youtube.com/watch?v=fJ9rUzIMcZQ"
}
],
"topMatch": { /* same as first match */ }
}
}
],
"summary": {
"total": 1,
"successful": 1,
"failed": 0,
"successRate": "100.0%"
}
}Health check endpoint.
Response:
{
"status": "ok",
"message": "TuneBridge API is running"
}All tracks are returned in a standardized format:
- name (string): Track title
- artists (array): List of artist names
- album (string): Album name
- durationMs (number): Track duration in milliseconds
- isrc (string | null): International Standard Recording Code
YouTube Data API v3 has daily quota limits. TuneBridge has been approved for 100,000 units per day. Each search request costs approximately 100 units. Monitor your usage at Google Cloud Console.
The current implementation:
- Searches YouTube using track name + artist names
- Filters for music category videos
- Orders by relevance
- Returns top 5 matches per track
- Provides the top match as the primary suggestion
The codebase includes a placeholder for OAuth-based playlist creation. This will enable:
- Creating playlists in user's YouTube Music account
- Adding tracks to playlists
- Managing user playlists
- YouTube Music search integration
- Embedded YouTube player
- Shareable playlist links
- Alternate video selection
- Rate limiting and caching
- YouTube Music OAuth and playlist creation
- Improved track matching with duration comparison
- User authentication
- Save conversion history
- Download playlist as CSV/JSON
TuneBridge uses YouTube Data API Services. By using TuneBridge, you agree to the following:
- Privacy Policy: Available at
/privacywhen running the application - Terms of Service: Available at
/termswhen running the application
For questions, concerns, or inquiries about TuneBridge:
📧 Email: tunebridge.contact@gmail.com
MIT
Contributions are welcome! Please feel free to submit a Pull Request.