Quick Start
This guide will get HERITRACE running on your local machine in just a few steps.
Prerequisites
Section titled “Prerequisites”- Docker and Docker Compose installed
- Git for cloning the repository
- Modern web browser
1. Clone the Repository
Section titled “1. Clone the Repository”git clone https://github.com/opencitations/heritrace.git
cd heritrace
2. Configure the Application
Section titled “2. Configure the Application”Copy the example configuration file:
cp config.example.py config.py
Required: Configure ORCID authentication (mandatory for the application to work):
-
Create an ORCID account at orcid.org if you don’t have one
-
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
-
Edit
config.py
with your ORCID credentials:
# Required ORCID configurationORCID_CLIENT_ID = 'APP-XXXXXXXXXX' # From ORCID registrationORCID_CLIENT_SECRET = 'xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx' # From ORCIDORCID_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 securitySECRET_KEY = 'your-secure-secret-key-here'
3. Start the Databases
Section titled “3. Start the Databases”./start-databases.sh
.\Start-Databases.ps1
This starts two Virtuoso database instances:
- Dataset database on port 8999
- Provenance database on port 8998
4. Launch HERITRACE
Section titled “4. Launch HERITRACE”docker compose -f docker-compose.dev.yaml up --build
docker compose up
5. Access the Application
Section titled “5. Access the Application”Open your browser and navigate to:
https://127.0.0.1:5000
Pre-configured Data Model
Section titled “Pre-configured Data Model”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.
What’s Next?
Section titled “What’s Next?”Now that HERITRACE is running, you can:
- Explore the Interface: Navigate through the metadata management features with the preconfigured data model
- Configure Schemas: Customize the SHACL schema for your data model
- Set Display Rules: Modify the YAML display rules for your interface
- Advanced Configuration: Review additional settings for production use
Stopping the Application
Section titled “Stopping the Application”When you’re done, stop the services:
# Press Ctrl+C in the terminal running docker compose# Or run:docker compose down
Linux/MacOS:
./stop-databases.sh
Windows:
.\Stop-Databases.ps1
Troubleshooting
Section titled “Troubleshooting”Port Already in Use
Section titled “Port Already in Use”If you get port conflicts, check if other services are running on the required ports:
# Modern Linux (ss command - usually preinstalled)ss -tulpn | grep -E ':(5000|6379|8998|8999)\s'
netstat -an | grep -E ':(5000|6379|8998|8999)\s'
# Check ports using netstatnetstat -ano | findstr ":5000 :6379 :8998 :8999"
# Or using PowerShellGet-NetTCPConnection | Where-Object {$_.LocalPort -in 5000,6379,8998,8999}
Need Help?
Section titled “Need Help?”- Review configuration options for advanced setup
- Use
docker compose logs
to check application logs for specific errors - Visit the GitHub repository for issues and support