A modern web application for streaming your personal music collection with a beautiful, responsive interface.
- 🎵 Stream your personal music collection
- 🔍 Search through your music library
- 🎧 Modern music player with controls
- 📱 Responsive design for all devices
- 🐳 Docker-based deployment
- 🔄 Real-time music streaming with range support
- Docker and Docker Compose installed
- Your music files (MP3, WAV, FLAC, OGG, AAC, M4A)
-
Clone the repository
git clone <repository-url> cd songsurge
-
Add your music files
# Copy your music files to the music directory cp /path/to/your/music/* music/
-
Start the application
docker-compose up -d
-
Access the application
- Frontend: http://localhost:3000
- Backend API: http://localhost:5000
- Port: 3000
- Technology: React 18, Axios, Lucide React
- Proxy: Nginx handles API routing to backend
- CORS: Configured to avoid cross-origin issues
- Port: 5000
- Technology: Flask, Flask-CORS, Mutagen
- Features: Music metadata extraction, streaming with range support
- CORS: Configured to allow all origins for development
GET /api/health- Health checkGET /api/music- List all music filesGET /api/music/search?q=query- Search music filesGET /api/music/stream/<file_path>- Stream audio fileGET /api/music/info/<file_path>- Get music file info
The application is configured to handle CORS properly:
- Frontend: Uses relative URLs to avoid cross-origin issues
- Nginx Proxy: Routes
/api/*requests to backend with proper CORS headers - Backend: Configured with Flask-CORS to allow all origins
If you encounter CORS errors:
- Ensure both containers are running:
docker-compose ps - Check logs:
docker-compose logs frontendanddocker-compose logs backend - Verify API endpoints:
curl http://localhost:3000/api/health
If the music library is empty:
- Add music files to the
music/directory - Restart the backend:
docker-compose restart backend
If ports 3000 or 5000 are already in use:
- Modify
docker-compose.ymlto use different ports - Update the frontend API configuration if needed
# Backend
cd backend
pip install -r requirements.txt
python app.py
# Frontend
cd frontend
npm install
npm startdocker-compose build --no-cacheThis project is licensed under the MIT License.
- Fork the repository
- Create a feature branch
- Make your changes
- Submit a pull request
Made with ❤️ for music lovers