A web application that analyzes your Spotify listening habits and generates a personality profile using AWS Bedrock with Claude 3.7 Sonnet.
- Authenticate with Spotify
- Fetch your top tracks
- Generate a personality analysis based on your music taste
- View your top tracks with album artwork
- Clone the repository
- Install dependencies:
npm install - Create a
.envfile with the following variables:VITE_SPOTIFY_CLIENT_ID=your_spotify_client_id VITE_SPOTIFY_CLIENT_SECRET=your_spotify_client_secret VITE_REDIRECT_URI=http://localhost:5173/callback VITE_API_ENDPOINT=your_api_gateway_endpoint - Run the development server:
npm run dev
-
Create a new Lambda function in AWS
-
Upload the
spotify_bedrock_lambda.pyfile -
Set the following environment variables:
SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret REDIRECT_URI=your_frontend_redirect_uri -
Configure the Lambda function with the following permissions:
bedrock:InvokeModelfor Claude 3.7 Sonnet- Basic Lambda execution role
-
Create an API Gateway trigger:
- Create a new REST API
- Create a resource with a POST method
- Enable CORS
- Deploy the API
- User authenticates with Spotify
- The app fetches the user's top tracks
- The tracks are sent to AWS Lambda via API Gateway
- Lambda uses AWS Bedrock with Claude 3.7 Sonnet to analyze the tracks
- The personality analysis is returned to the frontend
- The frontend displays the analysis and the user's top tracks
- React + Vite
- Chakra UI
- Spotify Web API
- AWS Lambda
- AWS API Gateway
- AWS Bedrock with Claude 3.7 Sonnet