"Your face is the controller." > Moodify bridges the gap between human emotion and digital auditory experiences. It uses real-time computer vision to detect your mood, age, and local weather to curate the perfect Spotify playlist for the moment.
- 🎭 Real-Time Emotion Detection: Uses
face-api.jsto detect 7 distinct emotions (Happy, Sad, Angry, Fearful, Disgusted, Surprised, Neutral). - 🧠 Context-Aware Logic: It doesn't just check your mood; it combines:
- Age: (e.g., Retro hits for older demographics, Viral pop for Gen-Z).
- Weather: (e.g., Cozy acoustic for rain, Upbeat for sunny days).
- Time: (e.g., Lofi for late nights).
- 🎧 Seamless Spotify Integration: Utilizes the Spotify Web API to fetch and play curated playlists instantly.
- 🌦️ Live Weather Dashboard: Integrated Open-Meteo & BigDataCloud APIs for real-time temperature and location data.
- 📱 Fully Responsive Glassmorphism UI: A modern, aesthetic interface built with Tailwind CSS that adapts from Desktop to Mobile.
- 🔒 Secure & Optimized: Uses Vite environment variables for security and lazy loading for performance.
| Domain | Technologies |
|---|---|
| Frontend | React.js (Vite), JavaScript (ES6+) |
| Styling | Tailwind CSS, Lucide React (Icons) |
| AI / ML | FaceAPI.js (Tensorflow.js based) |
| APIs | Spotify Web API, Open-Meteo (Weather), BigDataCloud (Geolocation) |
| Deployment | Vercel |
| Desktop View ( Befor Emotion Set ) | Desktop View ( After Emotion Set ) |
|---|---|
![]() |
![]() |
Note: Try yourself for better experince.
Follow these steps to set up the project locally on your machine.
- Node.js (v16 or higher)
- npm or yarn
- A Spotify Developer Account
-
Clone the Repository
git clone https://github.com/deepakcode21/face-emotion-music-player.git cd face-emotion-music-player -
Install Dependencies
npm install
-
Configure Environment Variables Create a
.envfile in the root directory and add your Spotify credentials:VITE_SPOTIFY_CLIENT_ID=your_spotify_client_id VITE_SPOTIFY_CLIENT_SECRET=your_spotify_client_secret VITE_SPOTIFY_REDIRECT_URI=http://127.0.0.1:5173
Note: You can get these keys from the Spotify Developer Dashboard. Ensure you add
http://127.0.0.1:5173to the Redirect URIs in your Spotify App settings. -
Run the Development Server
npm run dev
-
Open in Browser Navigate to
http://127.0.0.1:5173to see the app in action!
Contributions are what make the open-source community such an amazing place to learn, inspire, and create. Any contributions you make are greatly appreciated.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature) - Commit your Changes (
git commit -m 'Add some AmazingFeature') - Push to the Branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Distributed under the MIT License. See LICENSE for more information.
- Developer: Deepak (deepakcode21)
- Dedication: Dedicated to Gupta Ji ❤️ for being the muse behind this creation.
- APIs: Thanks to Spotify for Developers and Vincent Mühler for the incredible FaceAPI library.
Built with ❤️ and ☕ by Deepak


