A full-stack web application that uses AI to discover music based on natural language descriptions. Users describe a mood or vibe, and the app generates personalized Spotify playlists powered by OpenAI's GPT API.
- Natural language music discovery using GPT
- Spotify OAuth authentication and playback control
- Real-time song search and playback
- Song history tracking
- Queue management
- Frontend: React, Axios, Bootstrap
- Backend: Django, Django REST Framework
- APIs: Spotify Web API, OpenAI API
- Database: SQLite
- Python 3.x
- Node.js and npm
- Spotify Premium account
- Spotify Developer App credentials (create here)
- OpenAI API key (get here)
- Navigate to backend and create virtual environment:
cd backend/spotifyapp
python -m venv venv- Activate virtual environment:
# Windows
venv\Scripts\activate
# Mac/Linux
source venv/bin/activate- Install dependencies:
pip install -r requirements.txt- Create
.envfile inbackend/spotifyapp/with your credentials:
SECRET_KEY="your-django-secret-key"
DEBUG="True"
SPOTIFY_CLIENT_ID="your-spotify-client-id"
SPOTIFY_CLIENT_SECRET="your-spotify-client-secret"
SPOTIFY_REDIRECT_URI="http://127.0.0.1:8000/redirect"
OPENAI_API_KEY="your-openai-api-key"
FRONTEND_URL="http://127.0.0.1:3000"- Run migrations and start server:
python manage.py migrate
python manage.py runserverBackend runs at http://127.0.0.1:8000
- Navigate to frontend and install dependencies:
cd frontend
npm install- Start development server:
npm startFrontend runs at http://localhost:3000
- Open
http://localhost:3000in your browser - Click "Log in with Spotify" to authenticate
- Enter a mood description (e.g., "upbeat summer road trip music")
- Browse AI-generated recommendations
- Play songs directly or add to queue
├── backend/
│ └── spotifyapp/
│ ├── config/ # Django settings
│ ├── core/ # Main app
│ ├── manage.py
│ └── .env
└── frontend/
└── src/
├── components/ # React components
├── services/ # API service layer
└── App.jsx
MIT