A modern web application that enhances your Spotify experience by providing additional information about your favorite songs using the Spotify and Genius APIs.
- Track Analysis: Get detailed information about your currently playing tracks
- Lyrics Integration: Fetch lyrics from Genius API
- User Statistics: View your top tracks and recently played songs
- Modern UI: Clean and responsive web interface
- Python 3.11+ or Docker
- Spotify Developer Account
- Genius API Account
-
Clone the repository
git clone https://github.com/Phape/SpotifyTools.git cd SpotifyTools -
Set up environment variables
cp .env.example .env # Edit .env with your API credentials -
Create Docker network
docker network create net
-
Start the application
For Development (default - includes hot reload):
docker compose up -d --build
For Production (uses pre-built image):
docker compose -f docker-compose.yml up -d
-
Access the application
- Open your browser and go to:
http://localhost:5000
- Open your browser and go to:
Docker Compose automatically loads docker-compose.override.yml for development. To run in different modes:
Development Mode (Default):
docker-compose up -d --build # Uses override file automatically (hot reload)
docker-compose logs -f flask # Watch logs to see hot reload workingProduction Mode:
docker-compose -f docker-compose.yml up -d # Explicitly use only base file
docker-compose -f docker-compose.yml pull # Update to newest versionKey Differences:
- Development: Uses
docker-compose.override.ymlβ local build, hot reload, Flask dev server - Production: Uses only
docker-compose.ymlβ pre-built image, Gunicorn, stable
-
Clone and navigate
git clone https://github.com/Phape/SpotifyTools.git cd SpotifyTools/flask -
Create virtual environment
python -m venv venv source venv/bin/activate # On Windows: venv\Scripts\activate
-
Install dependencies
pip install -r requirements.txt
-
Set up environment
cp ../.env.example ../.env # Edit .env with your API credentials -
Run the application
python app.py
- Go to Spotify Developer Dashboard
- Create a new application
- Copy your
Client IDandClient Secret - Add
http://127.0.0.1:5000/authorizeto Redirect URIs
- Go to Genius API Clients
- Create a new API client
- Copy your
Client Access Token
Update your .env file with your credentials:
# Flask Configuration
FLASK_SECRET_KEY=your_secret_key_here
# Spotify API
SPOTIPY_CLIENT_ID=your_spotify_client_id
SPOTIPY_CLIENT_SECRET=your_spotify_client_secret
SPOTIPY_REDIRECT_URI=http://127.0.0.1:5000/authorize
# Genius API
GENIUS_CLIENT_ACCESS_TOKEN=your_genius_access_token- Backend: Python, Flask
- Frontend: HTML, CSS, JavaScript
- APIs: Spotify Web API, Genius API
- Deployment: Docker, Gunicorn
- Session Management: Flask-Session (filesystem)
SpotifyTools/
βββ flask/ # Main application
β βββ app/ # Flask application
β β βββ __init__.py # App initialization
β β βββ routes.py # URL routes
β β βββ settings.py # Configuration
β βββ static/ # CSS, JS, images
β βββ templates/ # HTML templates
β βββ requirements.txt # Python dependencies
β βββ Dockerfile # Docker configuration
βββ .env.example # Environment template
βββ docker-compose.yml # Production compose
βββ docker-compose.override.yml # Development overrides
If you're using VS Code, check out the Flask Tutorial in Visual Studio Code for detailed setup instructions.
- Development: Uses
docker-compose.override.ymlwith debug mode - Production: Uses
requirements-prod.txtwith Gunicorn and optimizations
The application is deployed at: spotifytools.phape.de
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature - Commit your changes:
git commit -m 'Add amazing feature' - Push to the branch:
git push origin feature/amazing-feature - Open a Pull Request
This project is open source and available under the MIT License.
If you encounter any issues or have questions:
- Open an issue on GitHub Issues
- Check existing issues for solutions
Made with β€οΈ by Phape