diff --git a/SUBSONIC_SERVER_BLUEPRINT.md b/SUBSONIC_SERVER_BLUEPRINT.md index 7dd8005..70ca00f 100644 --- a/SUBSONIC_SERVER_BLUEPRINT.md +++ b/SUBSONIC_SERVER_BLUEPRINT.md @@ -522,7 +522,7 @@ Responsibilities: - [x] Implement auth middleware - [x] Implement current user endpoint - [x] Implement admin bootstrap user creation -- [ ] Add logout endpoint +- [x] Add logout endpoint ## Library Scanning @@ -550,7 +550,7 @@ Responsibilities: - [x] Track detail - [x] Recent albums - [x] Random albums or songs -- [ ] Favorites listing +- [x] Favorites listing - [x] Search endpoint - [ ] Pagination support - [ ] Sorting support @@ -639,8 +639,8 @@ Responsibilities: - [x] Artist detail page - [x] Album detail page - [x] Playlist page -- [ ] Search results page -- [ ] Favorites page +- [x] Search results page +- [x] Favorites page - [ ] Recently played page ## Frontend Player @@ -649,10 +649,10 @@ Responsibilities: - [x] Queue model - [x] Play/pause - [x] Next/previous -- [ ] Seek bar +- [x] Seek bar - [x] Volume control -- [ ] Repeat modes -- [ ] Shuffle +- [x] Repeat modes +- [x] Shuffle - [x] Track switching - [x] Keyboard shortcuts - [x] Mini player @@ -683,7 +683,7 @@ Responsibilities: - [x] Single app port for web UI and Subsonic clients - [x] Reverse proxy example - [x] HTTP/reverse proxy deployment notes -- [ ] Backup/restore notes +- [x] Backup/restore notes ## Nice-to-Have After MVP diff --git a/deploy/BACKUP_RESTORE.md b/deploy/BACKUP_RESTORE.md new file mode 100644 index 0000000..ca990ff --- /dev/null +++ b/deploy/BACKUP_RESTORE.md @@ -0,0 +1,52 @@ +# Backup And Restore + +The minimum persistent state for this project is: + +- `data/app.db` +- `data/artwork/` +- your music library mount, if the server machine is the primary storage location + +## What To Back Up + +Recommended: + +- entire `data/` directory +- entire `media/` directory if the same host stores the original files +- your `.env` or deployment environment settings + +Why: + +- `app.db` stores users, sessions, playlists, favorites, and scanned metadata +- `artwork/` stores extracted embedded covers +- `media/` contains the source files used to rebuild the library index + +## Simple Backup Example + +PowerShell: + +```powershell +$stamp = Get-Date -Format 'yyyyMMdd-HHmmss' +New-Item -ItemType Directory -Force -Path ".\\backups\\$stamp" | Out-Null +Copy-Item -Recurse -Force .\\data ".\\backups\\$stamp\\data" +Copy-Item -Recurse -Force .\\media ".\\backups\\$stamp\\media" +``` + +## Restore Example + +1. Stop the server. +2. Restore `data/` from backup. +3. Restore `media/` if needed. +4. Start the server again. + +PowerShell: + +```powershell +Copy-Item -Recurse -Force ".\\backups\\20260403-010000\\data\\*" ".\\data" +Copy-Item -Recurse -Force ".\\backups\\20260403-010000\\media\\*" ".\\media" +``` + +## Notes + +- If `media/` is already backed up elsewhere, restoring `data/app.db` and `data/artwork/` is usually enough. +- If `artwork/` is lost but `media/` is intact, the server can rebuild extracted covers during future scans. +- If `app.db` is lost, the library can be rescanned from `media/`, but playlists, favorites, sessions, and users will be lost unless restored from backup. diff --git a/deploy/REVERSE_PROXY.md b/deploy/REVERSE_PROXY.md index d84f917..ae93349 100644 --- a/deploy/REVERSE_PROXY.md +++ b/deploy/REVERSE_PROXY.md @@ -75,3 +75,23 @@ server { - In production the frontend uses relative URLs, so it works correctly behind the same origin without hardcoded API hosts. - In local frontend development, Vite proxies `/api`, `/rest`, and `/health` to `http://127.0.0.1:5050`. - If you later enable HTTPS on an external reverse proxy, clients should still connect to one public base URL only. +- Web UI and Subsonic clients should always use the same public base URL, only differing by path usage. + +## Recommended Public Contract + +Public examples: + +- browser: `https://music.example.com/` +- Subsonic clients: `https://music.example.com` + +Internal upstream: + +- `http://127.0.0.1:5050` + +Do not publish separate public ports for: + +- web UI +- `/api/*` +- `/rest/*` +- `/api/stream/*` +- `/api/cover-art/*`