A web application that lets you create Spotify playlists from your listening history within specific date ranges. Built entirely with aider AI coding assistant for less than $2 worth of Anthropic tokens!
- 🔐 Secure Spotify OAuth authentication
- 📅 Date range selection with time precision
- 📝 Customizable playlist names
- 🎵 Interactive track list with drag-and-drop reordering
- 🌙 Modern dark theme UI
- 🔗 Direct links to created playlists
- Next.js
- TypeScript
- Tailwind CSS
- React Beautiful DnD
- FastAPI
- Python
- Spotify Web API
-
Create a Spotify Developer account and register your application:
- Go to Spotify Developer Dashboard
- Create a new application
- Add
http://localhost:3000/callbackto the Redirect URIs
-
Set up the Python environment:
cd backend
python -m venv venv
source venv/bin/activate # On Windows: .\venv\Scripts\activate
pip install -r requirements.txt- Create a
.envfile in thebackenddirectory:
SPOTIFY_CLIENT_ID=your_client_id
SPOTIFY_CLIENT_SECRET=your_client_secret
SPOTIFY_REDIRECT_URI=http://localhost:3000/callback- Start the backend server:
uvicorn app.main:app --reloadThe backend will be available at http://localhost:8000
- Install dependencies:
cd frontend
npm install- Create a
.env.localfile in thefrontenddirectory:
NEXT_PUBLIC_API_URL=http://localhost:8000- Start the development server:
npm run devThe frontend will be available at http://localhost:3000
- Visit
http://localhost:3000 - Log in with your Spotify account
- Select a date range to fetch your listening history
- Customize the track list by dragging and dropping songs
- (Optional) Enter a custom playlist name
- Click "Create Playlist" to save to your Spotify account
- Click OK in the confirmation dialog to open your new playlist in Spotify
- The backend uses FastAPI's automatic OpenAPI documentation, available at
http://localhost:8000/docs - Frontend components are built with TypeScript for better type safety
- The application uses Spotify's Web API with OAuth 2.0 authentication
- All styling is done with Tailwind CSS for consistent design
Feel free to open issues or submit pull requests if you have suggestions for improvements!
MIT License - feel free to use this code for your own projects!
- Built with aider AI coding assistant
- Uses the Spotify Web API
- Inspired by the desire to create playlists from specific time periods in our listening history