A full-stack web application that connects to the Spotify API to display album information, track details, and user interactions such as likes, ratings, and reviews.
Built using:
- Python (Flask) for the backend
- HTML/CSS/JavaScript for the frontend
- SQLite for the database
- Spotify Web API for album and track data
You will need two terminal windows (or tabs) open.
In the first terminal:
python dev/backend/partC/app.pyThis will start the backend server at: http://127.0.0.1:5000
In the second terminal:
cd dev/frontend
python -m http.serverThis will start a basic HTTP server for the frontend at:
http://127.0.0.1:8000Visit:
http://127.0.0.1:8000/login.htmlFrom there, you can sign up, log in, browse albums, view tracks, leave reviews, and more!
Before running the app, ensure you have a .env file at the root of the project containing your Spotify API credentials:
SPOTIFY_CLIENT_ID=your_spotify_client_id_here
SPOTIFY_CLIENT_SECRET=your_spotify_client_secret_here(Do not include your Spotify access token — it will be auto-generated at runtime.)
You must have the following Python packages installed:
pip install Flask flask-cors python-dotenv requests- User authentication (sign up / login)
- View albums with real-time Spotify album covers
- View track details
- Like albums and tracks
- Rate albums and tracks
- Leave reviews on albums and tracks
- Fully automated Spotify API token refresh
- The project uses dynamic access tokens from Spotify and does not require manual updates of tokens.
- Album and track images are fetched from Spotify and cached to minimize API calls.
.envshould never be committed to version control — make sure it is listed in.gitignore.