Noughty Tours Web SDK
@thenoughtyfox/noughty-tours-web-sdk ships two things: a typed data client for
the Noughty Tours API, and React components that render what it returns.
The client returns plain data and renders nothing, so you can build whatever interface your product needs on top of it. If you would rather not build one, four components cover the common screens.
| Component | Screen |
|---|---|
ToursList | A browsable list of every tour |
TourManager | Floors, rooms and scans, with editing |
Viewer | The panorama viewer, including authoring controls |
PublicViewer | The read-only viewer for a public tour, addressed by slug |
The components read through the same client, so mixing the two is fine — use a component where it fits and drop to the client where it does not.
The client
Every call goes through a NoughtyToursController instance, which exposes four
resources:
| Resource | Purpose |
|---|---|
tours | Tours, including their floors, rooms and scans |
floors | Floor metadata and floor-plan documents |
rooms | Room metadata |
scans | Panorama pose, orientation and thumbnails |
Methods return promises that resolve to the parsed response body, or reject with
an ApiError. Responses carrying no content
resolve to null.
Example apps
A complete working integration, in two halves. Start here if you would rather read working code than reference documentation.
| Repository | What it shows |
|---|---|
| noughty-tours-web-demo | A React app wiring up the client and all four components |
| noughty-tours-web-backend-demo | The backend half — mints tokens and publishes a JWK Set |
Next
- Installation
- Quick start
- Authentication — including the backend half