Skip to content

Developer Documentation

ArchiveBase is designed API-first: everything the dashboard and the public sites do goes through the same HTTP API. Bulk imports from external systems, programmatic metadata updates and harvesting are all expected to use the API.

Start here

URL structure

ArchiveBase is multi-tenant and URLs take the form:

/api/{account}/{service}/{db}/...
PartMeaning
{account}The tenant owner (account)
{service}Fixed product-type segment: dl (digital library) / iiif / tei / map / text / preserve / records
{db}A database (= one published site)

Example: the resource list of library letters under account example is /api/example/dl/letters/resources.

Resource model

A site's contents are all represented by a single resource model, distinguished by type.

jsonc
{
  "id": "uuid",
  "slug": "0380-17-1",       // unique within the DB (optional)
  "type": "item",            // collection | item | media | annotation | tei | page ...
  "parent_id": "uuid|null",  // media→item, item→collection — builds hierarchy
  "title": "…",
  "body": "…",               // long text (transcription); full-text searchable
  "metadata": { },           // free-form JSONB; dcterms:* keys recommended
  "is_public": true
}
  • metadata.lat / metadata.lng place a resource on the map view (map)
  • metadata.thumbnail is used for card/list thumbnails

Standards support

StandardUsed for
IIIF Image API 3.0Image delivery (info.json + transforms); Cantaloupe in production
IIIF Presentation / Content SearchManifests and full-text search annotations
TEI (XML)Importing transcriptions (with named-entity extraction) and serving raw XML
DTS (Distributed Text Services)Serving TEI corpora as collections/documents/navigation
OpenAPI 3API specification and the Swagger UI

Work in progress

An architecture overview (Next.js / Postgres / MinIO / Elasticsearch / the microservices) and a self-hosting guide (docker-compose.prod.yml) are yet to be documented.