Skip to content

HERITRACE

HERITRACE is a web-based semantic data editor. It lets users enrich and edit RDF metadata through a web interface, without requiring knowledge of the Semantic Web. It handles provenance and change tracking, validates data against SHACL schemas, and connects to existing triplestores with no data transformation needed.

This method uses official Docker images published to Docker Hub and GitHub Container Registry. Environment variables in the docker-compose.yml file connect HERITRACE to its databases. Administrators edit the rest of the configuration in the app.

Create a new directory for HERITRACE and download the configuration:

Terminal window
mkdir heritrace && cd heritrace && \
curl -o docker-compose.yml https://raw.githubusercontent.com/opencitations/heritrace/main/docker-compose.yml
Terminal window
docker compose up

The compose file includes two Virtuoso databases and the web application. On the first start, it also copies the example configuration into the config folder, where administrators then edit it in the app. Once the databases pass their health checks, the application starts automatically.

HERITRACE runs in demo mode by default (FLASK_ENV=demo) for immediate testing without authentication setup.

To use your own databases instead, edit docker-compose.yml: remove the dataset-db, provenance-db, config-seed, and networks blocks, remove depends_on and networks from the web service, then set DATASET_DB_URL and PROVENANCE_DB_URL to your database endpoints. On the first start, HERITRACE runs in setup mode: an administrator enters the settings, then defines the resource types in the configuration editor.

Open your browser and navigate to:

http://127.0.0.1:8000

HERITRACE describes the data model with SHACL shapes, which define the classes and properties and also say how the interface shows them. The shapes are stored in the configuration folder and edited in the configuration editor. See SHACL configuration.

The default_components/ directory contains optional URI generator, counter handler, and save plugin implementations. They are distributed with HERITRACE but enabled only when selected with environment variables.

The example_configurations/ directory contains examples to use as a starting point, including one based on the OpenCitations Data Model (OCDM).

Now that HERITRACE is running, you can:

  1. Explore the interface: Navigate through the metadata management features with the preconfigured data model
  2. Production setup: Configure ORCID authentication and security settings for production use
  3. Configure schemas: Customize the SHACL schema for your data model

Press Ctrl+C in the terminal running docker compose, or run:

Terminal window
docker compose down

If another program uses port 8000, check which one:

Terminal window
ss -tulpn | grep ':8000\s'

To use another port, change the number before the colon in the ports entry of docker-compose.yml, for example "8080:5000", then open http://127.0.0.1:8080.