Skip to content

Quick Start

This guide will get HERITRACE running on your local machine in just a few steps.

Terminal window
git clone https://github.com/opencitations/heritrace.git
Terminal window
cd heritrace

Copy the example configuration file:

Terminal window
cp config.example.py config.py

Required: Configure ORCID authentication (mandatory for the application to work):

  1. Create an ORCID account at orcid.org if you don’t have one

  2. Get ORCID credentials at ORCID Developer Tools:

    • Create a new application
    • Set redirect URI to: https://127.0.0.1:5000/auth/callback
    • Note your Client ID and Client Secret
  3. Edit config.py with your ORCID credentials:

# Required ORCID configuration
ORCID_CLIENT_ID = 'APP-XXXXXXXXXX' # From ORCID registration
ORCID_CLIENT_SECRET = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # From ORCID
ORCID_WHITELIST = ['0000-0000-0000-0000'] # Your ORCID ID
# Optional: Customize display (can be changed later)
APP_TITLE = 'Your HERITRACE Instance'
# Optional for startup, but important for security
SECRET_KEY = 'your-secure-secret-key-here'
Terminal window
./start-databases.sh

This starts two Virtuoso database instances:

  • Dataset database on port 8999
  • Provenance database on port 8998
Terminal window
docker compose -f docker-compose.dev.yaml up --build

Open your browser and navigate to:

https://127.0.0.1:5000

HERITRACE comes preloaded with validation and display rules based on a customized version of the OpenCitations Data Model (OCDM):

  • SHACL Schema (resources/shacl.ttl): Defines the data model, classes, and properties.
  • YAML Display Rules (resources/display_rules.yaml): Configure how entities appear in the interface

These rules can be fully customized for your specific needs while maintaining semantic integrity.

Now that HERITRACE is running, you can:

  1. Explore the Interface: Navigate through the metadata management features with the preconfigured data model
  2. Configure Schemas: Customize the SHACL schema for your data model
  3. Set Display Rules: Modify the YAML display rules for your interface
  4. Advanced Configuration: Review additional settings for production use

When you’re done, stop the services:

Terminal window
# Press Ctrl+C in the terminal running docker compose
# Or run:
docker compose down

If you get port conflicts, check if other services are running on the required ports:

Terminal window
# Modern Linux (ss command - usually preinstalled)
ss -tulpn | grep -E ':(5000|6379|8998|8999)\s'