#+ 🎵 Self Music - Personal Music Library
🌟 A modern personal music management and playback system with playlists, synced lyrics, and responsive UI.
Self Music is a personal music system designed for individuals or small teams. It offers an elegant UI, smooth playback, playlist management, synced lyrics, and public browsing of artists/albums/playlists. An admin console with JWT authentication is built in.
Accept-Ranges/uploadsadmin / admin123^0.104^0.24backend/music.db)15.4.x + React 19^54git clone https://github.com/zkeq/Self-music.git
cd Self-music
cd backend
pip install -r requirements.txt
uvicorn backend.main:app --reload --host 0.0.0.0 --port 8000
http://localhost:8000http://localhost:8000/docsadmin / admin123In production, configure a secure
SECRET_KEYand restrict CORS to trusted origins.
cd ../frontend
pnpm install # or npm install
# Optional (defaults to http://localhost:8000/api):
# echo "NEXT_PUBLIC_API_URL=http://localhost:8000/api" > .env.local
pnpm dev # or npm run dev
http://localhost:3000//play and /play/[id]/songs/artists and /artist/[id]/albums (if enabled)/playlists and /playlist/[id]/admin/loginSelf-Music/ ├── backend/ │ ├── main.py │ ├── user.py │ ├── music.db │ └── requirements.txt ├── frontend/ │ ├── src/ │ │ ├── app/ │ │ ├── components/ │ │ ├── lib/ │ │ └── styles/ │ └── package.json ├── AGENTS.md ├── README.md # Chinese └── README.en.md # English (this file)
Public
GET /api/songs • GET /api/songs/{id} • GET /api/songs/{id}/streamGET /api/artists • GET /api/artists/{id} • GET /api/artists/{id}/songs • GET /api/artists/{id}/albumsGET /api/albums • GET /api/albums/{id} • GET /api/albums/{id}/songsGET /api/playlists • GET /api/playlists/{id}Admin (Bearer token)
POST /api/auth/login/api/admin/{artists|albums|songs|moods|playlists}PUT /api/admin/playlists/{id}/reorderPOST /api/admin/uploadPOST /api/admin/import/*See Swagger at
/docswhen backend is running.
8000 is freesongs.audioUrl must be a valid local pathuvicorn/gunicorn behind Nginx/CaddySECRET_KEY, restrict CORS, persist music.db and uploads/NEXT_PUBLIC_API_URL to your API, e.g., https://api.example.com/apipnpm lint is clean, and API runs locallyAGENTS.mdMIT License — see LICENSE.
⭐ If you find this project useful, please star it! ⭐
Made with ❤️ for music lovers.