You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A next-generation music platform combining AI, real-time social features, and a seamless artist experience
π Overview
TunePal is a full-stack, microservices-based music streaming platform that leverages cutting-edge AI technologies to revolutionize how users discover and interact with music. The platform features:
π§ AI-Powered Mood Detection using real-time facial expression analysis
π€ Conversational AI Assistant (TunePal Agent) built with LangChain & Google Gemini
π§ Real-Time Live Sessions for synchronized music listening with friends
π¨ Dedicated Artist Dashboard for music upload and analytics
π§ Event-Driven Notifications via RabbitMQ message queue
β¨ Key Features
π§ AI & Machine Learning
Feature
Description
Technology
Mood Detection
Analyzes user facial expressions via webcam to recommend mood-matching songs
face-api.js, TinyFaceDetector, FaceExpressionNet
Song Mood Analysis
Automatically detects mood of uploaded songs using AI
Google Gemini 2.5 Flash
TunePal AI Agent
Conversational assistant that can create playlists, play songs, and recommend music
LangChain, LangGraph, Gemini
Smart Recommendations
AI-powered song suggestions based on mood, activity, and preferences
Gemini Generative AI
π Real-Time Features (Socket.io)
Feature
Description
Live Sessions (Control Room)
Create password-protected listening rooms where friends join and listen together in perfect sync
Check User Online
Real-time presence detection to see which friends are currently active
Synchronized Playback
Host controls playback (play, pause, skip) - all members stay in sync
Queue Management
Collaborative song queue that updates in real-time for all room members
π¨ Artist Dashboard
Feature
Description
Music Upload
Upload tracks with cover art; AI automatically detects song mood
Playlist Management
Create and curate playlists for fans
Artist Profile
Customize your artist profile and bio
Analytics Dashboard
Track your music performance and listener engagement
Google OAuth
Easy login via Google authentication
π€ User Platform
Feature
Description
Home Feed
Discover trending songs with infinite scroll pagination
# Clone the repository
git clone https://github.com/your-username/tunepal.git
cd tunepal
# Start all services
docker-compose up --build
# Access the applications# User Platform: http://localhost:5174# Artist Dashboard: http://localhost:5173# RabbitMQ Manager: http://localhost:15672
Running Locally (Development)
# Terminal 1 - Auth Servicecd auth && npm install && node server.js
# Terminal 2 - Music Servicecd music && npm install && node server.js
# Terminal 3 - TunePal Agentcd TunePal && npm install && node server.js
# Terminal 4 - Notification Servicecd notification && npm install && node server.js
# Terminal 5 - User Frontendcd Users && npm install && npm run dev
# Terminal 6 - Artist Frontendcd Artist && npm install && npm run dev
π‘ API Endpoints
Auth Service (:3000)
Method
Endpoint
Description
POST
/api/auth/register
User registration
POST
/api/auth/login
User login
GET
/api/auth/google
Google OAuth initiation
GET
/api/auth/google/callback
Google OAuth callback
GET
/api/auth/user/me
Get current user
GET
/api/auth/logout
Logout user
Music Service (:3001)
Method
Endpoint
Description
GET
/api/music/
Get all songs (paginated)
GET
/api/music/get-details/:id
Get song by ID
POST
/api/music/upload
Upload new song (Artist)
GET
/api/music/artist-music
Get artist's songs
GET
/api/music/allPlaylist
Get all public playlists
POST
/api/music/playlist
Create playlist (Artist)
GET
/api/music/playlist/:id
Get playlist by ID
POST
/api/music/createUserPlaylist
Create user playlist
GET
/api/music/userPlaylists
Get user's playlists
POST
/api/music/likeSong/:id
Like/unlike a song
GET
/api/music/all/likedSongs
Get liked songs
GET
/api/music/mood-dectect
Get songs by mood
GET
/api/music/search/:query
Search songs
TunePal Agent Tools
Tool
Description
CreatePlaylist
Creates a new playlist with specified songs
PlayPlaylistSong
Plays songs from a playlist
SongDetails
Fetches detailed information about a song
RecommendSong
Recommends songs based on mood/activity
π Socket Events
Music Service (Live Sessions)
Event
Direction
Description
createroom
Client β Server
Create a new listening room
joinroom
Client β Server
Join existing room with code
play
Bidirectional
Sync play action across room
check-user-online
Client β Server
Check if user is online
user-status
Server β Client
Online status response
TunePal Service (AI Chat)
Event
Direction
Description
user-message
Client β Server
Send message to AI
ai-response
Server β Client
Receive AI response
π§ͺ TunePal AI Agent - How It Works
// LangGraph State Machine FlowSTARTβCHAT(Gemini)β[FunctionCall?]βTOOLSβCHATβEND// Available Tools1.CreatePlaylistβCreatesplaylistviaMusicAPI2.PlayPlaylistSongβStreamsplaylistsongs3.SongDetailsβFetchessongmetadata4.RecommendSongβAIrecommendationsbymood
Example Conversation:
User: "I'm feeling sad, can you recommend some songs?"
Agent: [Calls RecommendSong tool with mood="sad"]
β Returns: "Here are some comforting songs for you: ..."
User: "Create a playlist called 'Rainy Day' with those songs"
Agent: [Calls CreatePlaylist tool]
β Returns: "I've created your 'Rainy Day' playlist! π΅"
π― Future Roadmap
Progressive Web App (PWA) support
Offline mode with cached songs
Lyrics display with karaoke mode
Artist verification system
Social features (follow artists, share playlists)
Advanced analytics dashboard
Multi-language support
Podcast support
π¨βπ» Author
[Your Name]
π License
This project is licensed under the MIT License - see the LICENSE file for details.
Built with β€οΈ using React, Node.js, LangChain & Gemini AI
β Star this repo if you found it helpful!
About
π΅ AI-powered music streaming platform featuring real-time mood detection via face-api.js, a conversational AI assistant built with LangChain + Gemini, live synchronized listening rooms (Socket.io), and a full artist dashboard. Microservices architecture with Docker.