Spotify Judger is a Next.js application that leverages OpenAI's chat completion capabilities to generate a conversation with users about their music taste based on their top tracks and artists from Spotify. This application provides an interactive and engaging experience for users to explore their music preferences in a conversational manner.
Before running Spotify Judger, ensure that you have the following prerequisites installed:
- Node.js (v18 or above)
- npm or yarn package manager
- Spotify Developer Account (to obtain API credentials)
- OpenAI API Key
To set up and run Spotify Judger, follow these steps:
- Clone the repository:
git clone https://github.com/FinnBuick/spotify-judger.git
- Navigate to the project directory:
cd spotify-judger
- Install the dependencies:
yarn install
- Configure the environment variables:
-
Rename the
.env.example
file to.env
. -
Fill in the necessary environment variables in the
.env
file:OPENAI_API_KEY=your-openai-api-key SPOTIFY_CLIENT_ID=your-spotify-client-id SPOTIFY_CLIENT_SECRET=your-spotify-client-secret NEXTAUTH_URL=http://localhost:3000 NEXTAUTH_SECRET=your-nextauth-secret
Replace
your-spotify-client-id
,your-spotify-client-secret
, andyour-openai-api-key
with your respective credentials. You can obtain your Spotify API credentials by creating a Spotify Developer Account and registering a new application. You can obtain your OpenAI API key by creating an OpenAI account and generating an API key. You can generate a NextAuth secret by running the following command:openssl rand -base64 32
- Start the application:
yarn dev
- Navigate to
http://localhost:3000
in your browser to view the application.
- Next.js - The React framework for production
- Tailwind CSS - The utility-first CSS framework
- DaisyUI - The component library for Tailwind CSS
- Spotify API - The API for retrieving user data from Spotify
- OpenAI API - The API for generating conversational responses
Contributions to Spotify Judger are welcome! If you encounter any bugs, have suggestions for improvements, or would like to add new features, please open an issue or submit a pull request on the project's GitHub repository.
Spotify Judger is open-source software licensed under the MIT License. Feel free to modify and distribute the application as per the terms of the license.