Skip to content

nulib-labs/debug-dcapi-paging

Repository files navigation

IIIF Collection Explorer

A tiny Vite + React app that accepts a IIIF Collection URL, walks any nested subcollections sequentially, and reports every manifest ID it encounters. The UI now produces a synopsis card with total collection fetches, total manifests, unique manifests, and duplicate references, followed by the detailed global duplicate list detected during the traversal.

Getting started

npm install
npm run dev

Open the local server URL shown in the console (defaults to http://localhost:5173). Enter any IIIF Collection URL (or pick one of the examples listed beneath the input) and the app will fetch each collection one after another while showing a live traversal log. Errors such as malformed payloads or HTTP failures are surfaced inline.

Prefer a shortcut? The app loads public/examples.json, fetches each collection's first page to display its live label and thumbnail, and renders the entries as quick-select buttons right inside the form. Clicking any of them will populate the input so you can try known working collections instantly. Update that JSON file to feature your own commonly used IIIF collections.

After a run finishes, the results pane shows a synopsis card summarizing how many collection pages were fetched, how many manifests were examined in total, how many of them were unique, and how many duplicate references were encountered. If duplicate IDs were found anywhere in the traversal, a detailed list follows with per-collection counts.

To create a production build:

npm run build
npm run preview # optional: serve the dist/ output locally

How traversal works

  1. The provided collection URL is validated and requested as JSON.
  2. Every items[] entry of type Collection is enqueued, so nested collections are processed one at a time.
  3. Entries of type Manifest contribute to the per-collection stats and the global set of manifest IDs.
  4. Duplicate IDs are detected within each individual collection and across the entire traversal, with per-collection counts showing where the collisions happened.

All requests are made client-side when you submit the form, so the published site stays static while still allowing ad hoc analysis of any public IIIF endpoint.

Deploying to GitHub Pages

A workflow at .github/workflows/deploy.yml builds the site and publishes the dist/ folder to GitHub Pages whenever the main branch is updated (you can also trigger it manually). The Vite config automatically adjusts the base path using the GITHUB_REPOSITORY environment variable provided in Actions, so assets resolve correctly on the https://<user>.github.io/<repo>/ URL once Pages is enabled in the repo settings.

Releases

No releases published

Packages

 
 
 

Contributors