Aurafy is web application that analyzes your music listening habits and assigns humorous "auras" based on audio features.
- π Currently analyzing musical patterns with Spotify API
- π¨βπ» Built with React, FastAPI, and Python
- π΅ Transforms audio features into humorous personality insights
Frontend
Backend
Tools & Platforms
API
- Python 3.8+
- Node.js 14+
- A Spotify Developer Account
-
Clone the Repository
git clone https://github.com/zuck30/aurafy.git cd aurafy -
Configure Spotify Developer App
- Go to the Spotify Developer Dashboard and create a new app.
- Go to your app's settings and add a new "Redirect URI".
- Add
http://127.0.0.1:8000/api/callbackto the list of Redirect URIs. - Take note of your
Client IDandClient Secret.
-
Set Up Environment Variables
- You'll need to set
SPOTIFY_CLIENT_IDandSPOTIFY_CLIENT_SECRETas environment variables. You can do this by creating a.envfile in the root of the project:SPOTIFY_CLIENT_ID=your_spotify_client_id SPOTIFY_CLIENT_SECRET=your_spotify_client_secret - The backend (
main.py) is set up to read these variables.
- You'll need to set
-
Install Backend Dependencies
pip install -r requirements.txt
-
Install Frontend Dependencies
npm install --prefix frontend
You'll need to run the backend and frontend in two separate terminals.
-
Run the Backend
- In the root directory, run:
uvicorn main:app --reload --port 8000
- The backend API will be running at
http://127.0.0.1:8000.
- In the root directory, run:
-
Run the Frontend
- In a new terminal, from the root directory, run:
npm start --prefix frontend
- The frontend application will open automatically in your browser at
http://localhost:3000.
- In a new terminal, from the root directory, run:
-
Open Your Browser
- Navigate to
http://localhost:3000to use the application.
- Navigate to
If you encounter an ERR_CONNECTION_REFUSED error when trying to log in, it likely means your backend server is not running or not accessible. Here's how to debug:
-
Check the Backend Terminal:
- Look at the terminal where you ran the
uvicorncommand. - When you click "Continue with Spotify," you should see a log message like this:
INFO: __main__: Received request for /api/login - If you don't see this message, the frontend is not correctly communicating with the backend.
- Look at the terminal where you ran the
-
Check the Spotify Callback:
- After you log in with Spotify, you should be redirected back to the application. In the backend terminal, you should see:
INFO: __main__: Received callback from Spotify with code: <some_code> - If you see an error here, it could be an issue with your Spotify API credentials or the redirect URI setting in your Spotify Developer Dashboard.
- After you log in with Spotify, you should be redirected back to the application. In the backend terminal, you should see:
-
Directly Access the API:
- With the backend running, open
http://127.0.0.1:8000/in your browser. You should see{"message":"Welcome to aurafy Your Playlist API"}. - If this doesn't load, there is an issue with the backend server itself.
- With the backend running, open
- The Pogo Sticking Toddler: High energy + high danceability
- The Contemplative Emo Poet: Low valence + high acousticness
- The Anxious Hummingbird: High tempo + low energy
- The Euphoric Clubber: High energy + high positivity
- The Moody Vampire: Dark and atmospheric
- The Chill Beach Bum: Acoustic, positive, and relaxed
The application is optimized for all device sizes:
- Mobile phones (320px and up)
- Tablets (768px and up)
- Laptops (1024px and up)
- Large screens (1200px and up)
This project is licensed under the MIT License. LICENSE
If you have any questions or issues, please open an issue on GitHub or contact us at [email protected]
We hope you have fun discovering your musical aura! Share your results with friends and compare your musical personalities.
Note: This app is designed for entertainment purposes only. The "auras" are not scientifically validated assessments of personality or mood.






