A modern web application that helps you organize your SoundCloud liked tracks into smart playlists with AI-powered suggestions, featuring a gamified Tinder-style interface and seamless drag-and-drop functionality.
- π Secure OAuth 2.1 Authentication - PKCE-based SoundCloud login with encrypted session storage
- π΄ Tinder-Style Categorization - Swipe through your tracks in a fun, gamified interface
- π― Smart Suggestions - Automatic playlist buckets based on genre, BPM, artist, and tags
- π¨ Drag & Drop Editor - Effortlessly reorder tracks and move them between playlists
- βοΈ One-Click Sync - Create and update playlists directly on SoundCloud
- π Beautiful UI/UX - Modern design with glassmorphism effects and smooth animations
- π± Fully Responsive - Optimized for both desktop and mobile devices
- Node.js 18+ and npm/yarn/pnpm
- A SoundCloud Developer account and registered app
git clone <your-repo-url>
cd my-soundcloudnpm install
# or
yarn install
# or
pnpm install- Go to SoundCloud Developers
- Create a new app or use an existing one
- Set the redirect URI to:
http://localhost:3000/api/auth/soundcloud/callback - Note your Client ID and Client Secret
Create a .env.local file in the root directory:
SOUNDCLOUD_CLIENT_ID=your_client_id_here
SOUNDCLOUD_CLIENT_SECRET=your_client_secret_here
SESSION_SECRET=your_random_32_character_secret_here
NEXTAUTH_URL=http://localhost:3000Generate a secure SESSION_SECRET:
node -e "console.log(require('crypto').randomBytes(32).toString('hex'))"npm run dev
# or
yarn dev
# or
pnpm devOpen http://localhost:3000 in your browser.
my-soundcloud/
βββ app/
β βββ api/
β β βββ auth/
β β β βββ soundcloud/ # OAuth endpoints
β β β βββ refresh/ # Token refresh
β β β βββ logout/ # Logout endpoint
β β β βββ me/ # Get session
β β βββ soundcloud/
β β βββ likes/ # Fetch liked tracks
β β βββ playlists/ # Playlist CRUD
β βββ dashboard/ # Main dashboard
β βββ categorize/ # Tinder-style interface
β βββ playlists/ # Playlist editor
β βββ layout.tsx # Root layout
β βββ page.tsx # Landing page
β βββ globals.css # Global styles
βββ components/
β βββ Navbar.tsx # Navigation bar
β βββ SwipeCard.tsx # Swipe card component
β βββ BucketGrid.tsx # Bucket selection grid
β βββ PlaylistCard.tsx # Playlist card with editor
β βββ SortableTrackList.tsx # Drag & drop track list
β βββ SortableTrackItem.tsx # Individual track item
βββ lib/
β βββ pkce.ts # PKCE utilities
β βββ auth.ts # Session management
β βββ soundcloud.ts # SoundCloud API client
β βββ matching.ts # Playlist matching algorithm
βββ public/ # Static assets
- User clicks "Connect with SoundCloud"
- App generates PKCE code verifier and challenge
- User authorizes on SoundCloud
- App exchanges code for access token
- Token stored in encrypted session cookie
The app analyzes your liked tracks and creates buckets based on:
- Genre - Groups tracks by their primary genre
- BPM Ranges - Creates tempo-based playlists (90-110, 110-130, etc.)
- Artist - Collects multiple tracks from the same artist
- Tags - Identifies popular tags and creates themed playlists
- Swipe right (or click a bucket) to add track to playlist
- Swipe left to skip
- Progress bar shows categorization status
- Real-time stats display
- Drag tracks to reorder within playlists
- Edit playlist names and descriptions
- Remove unwanted tracks
- Sync to SoundCloud with one click
- Framework: Next.js 14 (App Router)
- Language: TypeScript
- Styling: Tailwind CSS
- Animations: Framer Motion
- Drag & Drop: @dnd-kit
- Session: iron-session
- Notifications: react-hot-toast
- Deployment: Vercel
git add .
git commit -m "Initial commit"
git push origin main- Go to vercel.com
- Import your GitHub repository
- Configure environment variables:
SOUNDCLOUD_CLIENT_IDSOUNDCLOUD_CLIENT_SECRETSESSION_SECRETNEXTAUTH_URL(set to your production URL)
- Deploy!
After deployment, add your production URL to the SoundCloud app's redirect URIs:
https://your-domain.vercel.app/api/auth/soundcloud/callback
Edit tailwind.config.ts to customize colors, animations, and more:
theme: {
extend: {
colors: {
soundcloud: {
orange: '#ff5500',
dark: '#111',
gray: '#333',
},
},
},
}Adjust the matching algorithm in lib/matching.ts:
- Minimum tracks per bucket
- BPM range sizes
- Tag popularity threshold
- Genre filtering
- Check that environment variables are set correctly
- Clear browser cookies and try again
- Ensure SESSION_SECRET is at least 32 characters
- The app should auto-refresh tokens
- Check
/api/auth/refreshendpoint - Verify refresh token is stored in session
- Check browser console for API errors
- Verify SoundCloud API is accessible
- Ensure you have liked tracks on your account
SoundCloud API has rate limits. The app handles pagination automatically, but be aware:
- Max 200 items per request
- Rate limits apply per client
- Refresh tokens to maintain access
Contributions are welcome! Please feel free to submit a Pull Request.
This project is licensed under the MIT License.
If you have any questions or need help, please open an issue on GitHub.
Made with β€οΈ and π΅