chore: updated readme and add testing-flows.md

This commit is contained in:
Camilo Lopez 2026-05-12 20:52:49 -05:00
parent 308c98b02a
commit 182bfce964
2 changed files with 78 additions and 2 deletions

View File

@ -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

45
testing-flows.md Normal file
View File

@ -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.