From 182bfce9640b37363503316978d78807e74c2976 Mon Sep 17 00:00:00 2001 From: Camilo Lopez Date: Tue, 12 May 2026 20:52:49 -0500 Subject: [PATCH] chore: updated readme and add testing-flows.md --- README.md | 35 +++++++++++++++++++++++++++++++++-- testing-flows.md | 45 +++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 78 insertions(+), 2 deletions(-) create mode 100644 testing-flows.md diff --git a/README.md b/README.md index 09dae5368..51d43614a 100644 --- a/README.md +++ b/README.md @@ -43,7 +43,23 @@ docker compose -f docker-compose.dev.yml up --build docker compose -f docker-compose.dev.yml up ``` -Open **http://localhost:4533**. Default credentials are **`admin` / `admin`**. Drop your audio files into the `music/` folder at the project root — the scanner picks them up automatically. +Open **http://localhost:4533**. + +### Default credentials + +| Username | Password | +|----------|----------| +| `admin` | `admin` | + +### Adding music + +Place your audio files in the `music/` folder at the project root. If the folder doesn't exist yet, create it first: + +```bash +mkdir music +``` + +The scanner picks up new files automatically. ```bash # Run in the background @@ -58,7 +74,22 @@ docker compose -f docker-compose.dev.yml down Both services support hot-reload: editing `.go` files restarts the backend via `reflex`, and editing frontend source triggers Vite's HMR. -> See [CLAUDE.md](CLAUDE.md) for additional development notes, including how to inspect the database. +### Inspecting the database + +Open a SQLite shell inside the running backend container: + +```bash +docker compose -f docker-compose.dev.yml exec backend sqlite3 /data/navidrome.db +``` + +Useful commands once inside: + +```sql +.tables -- list all tables +.schema media_file -- show a table's schema +SELECT * FROM user; -- query data +.quit -- exit +``` ## Installation diff --git a/testing-flows.md b/testing-flows.md new file mode 100644 index 000000000..a959319c5 --- /dev/null +++ b/testing-flows.md @@ -0,0 +1,45 @@ +# Testing Flows + +## Add to Favorites + +Stars a song (or album/artist) using the Subsonic `star` endpoint. + +**Request** + +``` +GET /rest/star +``` + +Query parameters: + +| Parameter | Value | Description | +|-----------|-------|-------------| +| `u` | `admin` | Username | +| `t` | `47b1fbf1aaa6b36d0dec0c8ae0b1a6ef` | Auth token (MD5 of password + salt) | +| `s` | `701805` | Salt used to generate the token | +| `f` | `json` | Response format | +| `v` | `1.8.0` | Subsonic API version | +| `c` | `NavidromeUI` | Client name | +| `id` | `qORBlifrm7cjK4yDgfy5Zy` | ID of the song/album/artist to star | + +**Example request (dev)** + +```bash +curl "http://localhost:4533/rest/star?u=admin&t=47b1fbf1aaa6b36d0dec0c8ae0b1a6ef&s=701805&f=json&v=1.8.0&c=NavidromeUI&id=qORBlifrm7cjK4yDgfy5Zy" +``` + +**Response** + +```json +{ + "subsonic-response": { + "status": "ok", + "version": "1.16.1", + "type": "navidrome", + "serverVersion": "dev", + "openSubsonic": true + } +} +``` + +A `status: "ok"` with no error field means the item was successfully starred.