Add guided tours and unify left-to-right hall wall hang.

Visitors walk published tours in a 3D hall with stop notes; curators edit drafts via Tour editor. All galleries (artist, movement, tour) place the first work left of the entrance view and the last on the right.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Danila Khodjaef
2026-07-16 20:27:36 +03:00
co-authored by Cursor
parent 48bd17e985
commit 5ddc3fd7f0
31 changed files with 1890 additions and 124 deletions
+26
View File
@@ -214,6 +214,32 @@ Public painting detail still exposes read-only `influencedBy` / `influenced` (un
---
## Tours
Base path: `/api/tours`. Full guide: [tours.md](tours.md).
| Method | Path | Auth | Purpose |
|--------|------|------|---------|
| `GET` | `/api/tours` | public | Published tour summaries (`id`, `title`, `description`, cover thumb, `stopCount`) |
| `GET` | `/api/tours/:id` | public* | Full tour + ordered `paintings` + `stopBodies` (*draft tours require curator session) |
| `GET` | `/api/tours/admin` | curator | All tours (any status) |
| `POST` | `/api/tours` | curator | Create `{ title, description?, status? }` |
| `PATCH` | `/api/tours/:id` | curator | Update title / description / status / cover |
| `DELETE` | `/api/tours/:id` | curator | Delete tour + stops |
| `PUT` | `/api/tours/:id/stops` | curator | Replace ordered stops `{ stops: [{ paintingId, body }] }` |
Detail response shape:
```json
{
"tour": { "id": 1, "title": "…", "status": "published", "stopCount": 5 },
"paintings": [ /* Painting rows in stop order */ ],
"stopBodies": { "42": "Tour text for this stop…" }
}
```
---
## `GET /api/search`
Public catalog search over **artists**, **paintings**, and **art movements**. Used by the timeline header search bar (`CatalogSearchBar.tsx`).