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
- Using the API — authentication, quickstart, common endpoints, errors
- API Reference (Swagger UI) — every endpoint, generated from the OpenAPI spec, tryable in the browser
URL structure
ArchiveBase is multi-tenant and URLs take the form:
/api/{account}/{service}/{db}/...| Part | Meaning |
|---|---|
{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.lngplace a resource on the map view (map)metadata.thumbnailis used for card/list thumbnails
Standards support
| Standard | Used for |
|---|---|
| IIIF Image API 3.0 | Image delivery (info.json + transforms); Cantaloupe in production |
| IIIF Presentation / Content Search | Manifests 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 3 | API 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.