/hyrax

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.

Primary LanguageRubyApache License 2.0Apache-2.0

Hyrax: A Digital Repository Framework

Samvera's Hyrax Logo

Code: Version CircleCI Code Climate

Docs: Documentation Status API Docs Contribution Guidelines Apache 2.0 License

Jump in: Slack Status

Table of Contents

Table of contents created by gh-md-toc

What is Hyrax?

Hyrax is a Ruby on Rails Engine built by the Samvera community. Hyrax provides a foundation for creating many different digital repository applications.

Note: As a Rails Engine, Hyrax is not a web application. To build your digital repository using Hyrax you must mount the Hyrax engine within a Rails application. We call an application that mounts Hyrax a "Hyrax-based application" (or sometimes a "Hyrax Application").

Hyrax offers the ability to:

  • Create repository object types on demand
  • Deposit content via multiple configurable workflows
  • Describe content with flexible metadata
  • Enable/disable optional features via an administrative dashboard
  • And more (https://hyrax.samvera.org/about/)

Feature Documentation

Support Policies

  • Hyrax 3.x supports the latest browser versions for Chrome, Firefox, Edge, and Safari.

Help

The Samvera community is here to help. Please see our support guide.

Working with Hyrax

There are two primary Hyrax development concerns:

  1. Developing the Hyrax engine
  2. Developing your Hyrax-based Application

Developing the Hyrax Engine

This is where you work on the code-base that will be used by yours and other Hyrax-based applications. We recommend using Docker and Hyrax's engine development containers.

Note: This is not the only path for Hyrax-engine development. In the past, we documented extensive steps to install the various dependencies for Hyrax-engine development. There is also a Quick Start for Hyrax engine development that outlines steps for working on the Hyrax engine.

By moving to Docker, we are encoding the documentation steps for standing up a Hyrax-engine development environment.

Installing Analytics

Hyrax supports your choice of either Google Analytics or Matomo. To enable analytics tracking and reporting features, follow the directions below.

Enable Analytics Features

Analytics can be enabled and configured using environment variables. Set HYRAX_ANALYTICS to true, set either 'google' or 'matomo' for HYRAX_ANALYTICS_PROVIDER, and set the date you would like reporting to start (ANALYTICS_START_DATE).

HYRAX_ANALYTICS=true
HYRAX_ANALYTICS_PROVIDER=google
ANALYTICS_START_DATE=2021-08-21

If using google, you'll also need the following ENV variables:

GOOGLE_ANALYTICS_ID=UA-111111-1  # Universal ID (Currently Hyrax Analytics only works with Univeral (UA) accounts)
GOOGLE_OAUTH_APP_NAME=
GOOGLE_OAUTHAPP_VERSION=
GOOGLE_OAUTH_PRIVATE_KEY_PATH= # store the .p12 file in the root of your application
GOOGLE_OAUTH_PRIVATE_KEY_SECRET=
GOOGLE_OAUTH_CLIENT_EMAIL=

Add these ENV variables if using Matomo:

MATOMO_SITE_ID=
MATOMO_BASE_URL=
MATOMO_AUTH_TOKEN=

Analytics Features

Once analytics is enabled, Hyrax will automatically install the JS tracking code. Page views and downloads of a file set are recorded and sent to the selected analytics provider. Admin users will have access to an expanded dashboard with details about how many vistors viewed a page, and how many visitors downloaded a file. Easily find the top works by views, and most popular file downloads!

Contributing

We'd love to accept your contributions. Please see our guide to contributing to Hyrax.

Here are possible ways to help:

  • The Hyrax user interface is translated into a number of languages, and many of these translations come from Google Translate. If you are a native or fluent speaker of a non-English language, your help improving these translations are most welcome. (Hyrax currently supports English, Spanish, Chinese, Italian, German, French, and Portuguese.)
    • Do you see English in the application where you would expect to see one of the languages above? If so, file an issue and suggest a translation, please.
  • Contribute a user story.
  • Help us improve Hyrax's test coverage or documentation coverage.
  • Refactor away code smells.

Release process

See the release management process.

Developing your Hyrax-based Application

For those familiar with Rails, this is where you create your own application (via rails new) and add Hyrax as a gem to your Gemfile. Your Hyrax-based application is the place for you to create features specific to your Hyrax-based application.

For more information, see our documentation on developing your Hyrax-based application.

Deploying your Hyrax-based Application to production

Steps to deploy a Hyrax-based application to production will vary depending on your particular ecosystem but here are some methods and things to consider:

Acknowledgments

This software has been developed by and is brought to you by the Samvera community. Learn more at the Samvera website.

Samvera Logo

License

Hyrax is available under the Apache 2.0 license.