{"id":49553216,"url":"https://github.com/deathmaz/mpd-web-ui","last_synced_at":"2026-05-03T00:32:51.531Z","repository":{"id":344473764,"uuid":"1181963444","full_name":"deathmaz/mpd-web-ui","owner":"deathmaz","description":"A web-based frontend for MPD (Music Player Daemon) with browser audio streaming. Control playback and listen to your music library from any device on your network.","archived":false,"fork":false,"pushed_at":"2026-03-15T06:23:57.000Z","size":112,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-03-15T06:48:53.486Z","etag":null,"topics":["mpd","mpd-client","snapcast","snapcast-client","webui"],"latest_commit_sha":null,"homepage":"https://github.com/deathmaz/mpd-web-ui","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/deathmaz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-03-14T21:29:15.000Z","updated_at":"2026-03-15T06:24:00.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/deathmaz/mpd-web-ui","commit_stats":null,"previous_names":["deathmaz/mpd-web-ui"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/deathmaz/mpd-web-ui","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathmaz%2Fmpd-web-ui","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathmaz%2Fmpd-web-ui/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathmaz%2Fmpd-web-ui/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathmaz%2Fmpd-web-ui/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/deathmaz","download_url":"https://codeload.github.com/deathmaz/mpd-web-ui/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/deathmaz%2Fmpd-web-ui/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32554152,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T00:31:16.350Z","status":"ssl_error","status_checked_at":"2026-05-03T00:31:15.546Z","response_time":132,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["mpd","mpd-client","snapcast","snapcast-client","webui"],"created_at":"2026-05-03T00:32:50.462Z","updated_at":"2026-05-03T00:32:51.525Z","avatar_url":"https://github.com/deathmaz.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# mpd-web-ui\n\nA web-based frontend for [MPD](https://www.musicpd.org/) (Music Player Daemon) with browser audio streaming. Control playback and listen to your music library from any device on your network.\n\n## Features\n\n- Playback control (play, pause, stop, skip, seek, volume)\n- Queue management (add, remove, reorder, shuffle, clear)\n- Library browsing by artist and album with album art\n- Full-text search across your music library\n- Stored playlist support\n- Playback modes (repeat, random, single, consume)\n- Audio output toggling\n- Browser audio streaming via MPD's httpd output\n- Snapcast integration for synchronized multiroom audio playback\n- Real-time state sync across all connected clients via WebSocket\n- Mobile-friendly dark UI\n\n## Prerequisites\n\n- [Node.js](https://nodejs.org/) \u003e= 18\n- [pnpm](https://pnpm.io/) \u003e= 9\n- MPD running with:\n  - TCP socket enabled (default port 6600)\n  - httpd output enabled for browser streaming (default port 8000)\n\n### MPD httpd output\n\nTo stream audio to the browser, enable an httpd output in your `mpd.conf`:\n\n```\naudio_output {\n    type            \"httpd\"\n    name            \"HTTP Stream\"\n    encoder         \"opus\"\n    port            \"8000\"\n    bitrate         \"128000\"\n    format          \"48000:16:2\"\n    always_on       \"yes\"\n}\n```\n\n## Setup\n\n```sh\ngit clone \u003crepo-url\u003e mpd-web-ui\ncd mpd-web-ui\npnpm install\n```\n\n## Development\n\n```sh\n# Start both server and client in dev mode\nMPD_HOST=your-mpd-host pnpm dev\n```\n\nOpen the **Vite dev server** URL shown in the terminal (default `http://localhost:5173/`). Vite proxies `/api` and `/ws` to the backend automatically and provides hot module replacement for instant client updates.\n\nThe backend only serves API and WebSocket endpoints in dev mode — client files are served by Vite.\n\n## Production\n\n```sh\npnpm build\npnpm start\n```\n\nThe server serves the built client SPA and exposes everything on a single port (default 3000).\n\n### Running as a systemd service\n\nA service file example is provided. To start mpd-web-ui automatically with your system:\n\n```sh\n# Copy and edit the example service file\ncp mpd-web-ui.service.example mpd-web-ui.service\n# Edit WorkingDirectory and paths to match your setup\nvim mpd-web-ui.service\n\n# Link the service file (stays in the project directory)\nsystemctl --user link $(pwd)/mpd-web-ui.service\nsystemctl --user daemon-reload\nsystemctl --user enable --now mpd-web-ui\n\n# Allow user services to start at boot without login\nloginctl enable-linger $USER\n```\n\n### Running with Docker\n\nNo Node.js or pnpm needed on the host — only Docker:\n\n```sh\ngit clone \u003crepo-url\u003e mpd-web-ui\ncd mpd-web-ui\n\n# Copy and edit the example compose file\ncp docker-compose.example.yml docker-compose.yml\n# Edit MPD_HOST, PORT, etc. to match your setup\ndocker compose up -d --build\n```\n\nThe default config uses `network_mode: host` so the container can reach MPD on localhost.\n\n**Rootless Docker**: `network_mode: host` is silently ignored. Set `MPD_HOST` to your machine's IP address (e.g. `192.168.1.50`), add `ports: [\"3000:3000\"]`, and remove `network_mode: host`. See the comments in `docker-compose.example.yml`.\n\n## Configuration\n\nEnvironment variables:\n\n| Variable | Default | Description |\n|---|---|---|\n| `HOST` | `0.0.0.0` | Server bind address |\n| `PORT` | `3000` | Server port |\n| `MPD_HOST` | `localhost` | MPD server address |\n| `MPD_PORT` | `6600` | MPD TCP port |\n| `MPD_PASSWORD` | — | MPD password (if set) |\n| `MPD_STREAM_PORT` | `8000` | MPD httpd stream port |\n| `CLIENT_DIST_PATH` | `../client/dist` | Path to built client files |\n\n## Project structure\n\n```\nmpd-web-ui/\n├── packages/\n│   ├── shared/          # Shared TypeScript types\n│   └── mpd-client/      # MPD TCP protocol client library\n├── apps/\n│   ├── server/          # Fastify backend (REST + WebSocket + stream proxy)\n│   └── client/          # Vue 3 SPA (Vite + Pinia + Tailwind CSS v4)\n│       └── src/snapcast/ # Snapcast client (binary protocol, FLAC decoder, Web Audio)\n├── package.json\n└── pnpm-workspace.yaml\n```\n\n## Architecture\n\n```\nBrowser ──WebSocket──▶ Fastify ──TCP──▶ MPD (control)\nBrowser ──GET /api/stream──▶ Fastify ──HTTP──▶ MPD httpd (audio)\nBrowser ──WebSocket──▶ Snapserver (audio via Snapcast, optional)\n```\n\nThe server maintains two persistent TCP connections to MPD:\n- **Command connection** — serialized command queue for playback control, library queries, album art\n- **Idle connection** — permanent `idle` loop that receives subsystem change events and broadcasts them to all WebSocket clients in real time\n\nThe `/api/stream` endpoint proxies MPD's httpd output so only one port needs to be exposed on your network.\n\n### Snapcast integration\n\nThe UI can optionally act as a [Snapcast](https://github.com/snapcast/snapcast) client for synchronized multiroom audio. The browser connects directly to your snapserver — no backend proxy needed.\n\nTo use Snapcast:\n\n1. Configure MPD with a FIFO output for Snapcast:\n   ```\n   audio_output {\n       type            \"fifo\"\n       name            \"Snapcast\"\n       path            \"/tmp/snapfifo\"\n       format          \"48000:16:2\"\n       mixer_type      \"software\"\n   }\n   ```\n\n2. Start snapserver with the FIFO as a source:\n   ```sh\n   snapserver -s pipe:///tmp/snapfifo?name=default\n   ```\n\n3. In the web UI, click the **Snapcast** button on the Now Playing page, enter your snapserver address (e.g. `192.168.1.50:1780`), and connect. The address is saved for future sessions.\n\nThe MPD stream (\"Listen\") and Snapcast are mutually exclusive — activating one stops the other. Snapcast volume and connection settings are also available in the Settings page.\n\n## License\n\nMIT\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathmaz%2Fmpd-web-ui","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdeathmaz%2Fmpd-web-ui","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdeathmaz%2Fmpd-web-ui/lists"}