A modern, beautiful web application that helps you discover and create personalized Spotify playlists based on genre, era, and language preferences.
- 126+ Genres - Dynamically fetched from Spotify's API
- 8 Era Filters - From 1960s to 2020s
- 18 Languages - Find music in your preferred language
- Intelligent Search - Smart handling of instrumental vs. vocal tracks
When you select instrumental genres (Lofi, Chill, Ambient, etc.), the app automatically shows you two options:
- πΉ Search Instrumental Only - Find pure instrumental tracks
- π€ Search with Language Filter - Find vocal tracks in your selected language
- Glassmorphism Design - Beautiful frosted glass effects
- Modal Results - Immersive full-screen results view
- Toast Notifications - Real-time feedback for all actions
- Responsive Layout - Works on all screen sizes
- Creative Titles - Auto-generated playlist names (e.g., "2020s Pop Hits", "90s Rock Anthems")
- Custom Descriptions - Includes genre, era, and language info
- Direct Spotify Integration - Save directly to your Spotify account
- Track Management - Remove unwanted tracks before saving
- Play in Spotify - Direct links to play full tracks
- Album Artwork - Beautiful cover images
- Artist Information - See all contributing artists
- Regenerate - Get fresh recommendations anytime
- Node.js 18+ installed
- A Spotify account
- Spotify Developer App credentials
git clone https://github.com/GuyOnAKeyboard/spotify_recommender.git
cd spotify_recomendernpm install- Go to Spotify Developer Dashboard
- Create a new app
- Add
http://localhost:3000/api/auth/callback/spotifyto Redirect URIs or usehttp://127.0.0.1:3000/api/auth/callback/spotify - Copy your Client ID and Client Secret
Create a .env.local file in the root directory:
# Spotify API Credentials
SPOTIFY_CLIENT_ID=your_client_id_here
SPOTIFY_CLIENT_SECRET=your_client_secret_here
# NextAuth Configuration
NEXTAUTH_URL=http://localhost:3000 or run http://127.0.0.1:3000 if you have used **http://127.0.0.1:3000** above in your app setup in spotify developer dashboard
NEXTAUTH_SECRET=your_nextauth_secret_hereTo generate a NEXTAUTH_SECRET:
openssl rand -base64 32npm run devOpen http://localhost:3000 in your browser. or Open http://127.0.0.1:3000 in your browser
- Login with Spotify - Click the login button and authorize the app
- Select Filters - Choose genre, era, and/or language
- Search - Click "π Search Tracks" to find recommendations
- Review Results - Browse tracks in the modal view
- Customize - Remove unwanted tracks or regenerate for new options
- Save Playlist - Click "πΎ Save Playlist" to add to your Spotify
When selecting instrumental genres like Lofi or Chill, you'll see a modal with two options:
- Choose Instrumental Only for pure instrumental tracks
- Choose With Language Filter to find vocal tracks in that genre
- Framework: Next.js 16 (App Router)
- Authentication: NextAuth.js with Spotify OAuth
- API: Spotify Web API
- Styling: Custom CSS with Glassmorphism
- State Management: React Hooks
spotify_recomender/
βββ src/
β βββ app/
β β βββ api/
β β β βββ auth/ # NextAuth configuration
β β β βββ genres/ # Genre/era/language metadata
β β β βββ playlist/ # Playlist creation
β β β βββ recommendations/ # Track search
β β βββ layout.js # Root layout with metadata
β β βββ page.js # Home page
β βββ components/
β β βββ Dashboard.js # Main app interface
β β βββ SearchableSelect.js # Custom dropdown
β β βββ Toast.js # Notification component
β β βββ InstrumentalModal.js # Instrumental genre modal
β βββ lib/
β β βββ authOptions.js # NextAuth config
β β βββ spotify.js # Spotify API client
β βββ styles/
β βββ main.css # Global styles
βββ public/
β βββ favicon.png # App icon
βββ .env.local # Environment variables (not in repo)
βββ .gitignore # Git ignore rules
βββ package.json # Dependencies
Edit src/app/api/genres/route.js:
const languages = [
"English", "Spanish", "Korean", // ... add more
];Edit src/components/Dashboard.js in the savePlaylist function.
Edit src/styles/main.css to change the color scheme.
- Try different filter combinations
- For instrumental genres, use "Search Instrumental Only"
- Some genre/language combinations may have limited results
- Verify Redirect URI in Spotify Dashboard matches exactly
- Check
.env.localcredentials are correct - Clear browser cookies and try again
- Ensure your Spotify app has the correct scopes
- Check that your access token hasn't expired (refresh the page)
This project is open source and available under the MIT License.
Built by GuyOnAKeyboard
Uses the Spotify Web API
Contributions are welcome! Feel free to:
- Report bugs
- Suggest new features
- Submit pull requests
For issues or questions, please open an issue on GitHub. or reach out to me on
Enjoy discovering new music! π΅β¨