Skip to content

Latest commit

 

History

History
69 lines (40 loc) · 3.18 KB

README.md

File metadata and controls

69 lines (40 loc) · 3.18 KB

CI GitHub version

Digital Stacks

The Digital Stacks are the Stanford University Libraries' online systems that house and deliver digital resources to patrons. They work together with discovery systems (such as the catalog, library search engine, finding aids, etc.) to make up the Libraries' digital access services. Digital "stacks" is a convenient metaphor echoing the physical housing of books and other library material. For digital resources it manifests itself to users through the stacks.stanford.edu host name used for access URLs, identifying the virtual location where digital resources can be accessed.

Capabilities

Stacks is responsible for providing 6 endpoints

  1. The stacks welcome page https://stacks.stanford.edu/
  2. A IIIF endpoint https://stacks.stanford.edu/image/iiif/:id
  3. A legacy image service https://stacks.stanford.edu/image/:id/:file_name (this issues redirects to the IIIF endpoint)
  4. A streaming media authentication endpoint that issues and verifies tokens from the media server
  5. File downloads https://stacks.stanford.edu/file/:id/:file_name
  6. Web authentication

IIIF Endpoint

Stacks acts as a proxy to an image server. The proxy is responsible for ensuring the client has the proper permissions to send the request to the image server. This work is done by querying the rights metadata from PURL. Additionally it mutates the info.json response to provide appropriate tile sizes for the users current access level.

Stacks started out as a proxy for the Djatoka server, but in Fall 2017, we added the capability for Stacks to proxy to any IIIF compatible image server. We switched to Canteloupe at that time. Had RIIIF been our preferred choice at that time, we could have instead pointed Stacks at a server running https://github.com/sul-dlss/image-server/.

Legacy Djatoka support was removed from this codebase in July 2018.

Requirements

  • Ruby (2.2.2+ or greater)

Installation

Clone the repository

$ git clone [email protected]:sul-dlss/stacks.git

Change directories into the app and install dependencies

$ bundle install

Start the development server

$ rails s

Developing

For local development, the app will skip checks for the presence of image files and proxy the request to production image servers. You'll need to be on the Stanford VPN for this to work.

A IIIF image request (#2 under "Capabilities" above) to production might look like: https://stacks.stanford.edu/image/iiif/qj283wt8591%2FRT0073990001/info.json

In local development, this will become: http://localhost:3000/image/iiif/qj283wt8591%2FRT0073990001/info.json.

Configuring

Configuration is handled through the RailsConfig settings.yml files.

Testing

The test suite (with RuboCop style inforcement) will be run with the default rake task (also run on travis)

$ rake

The specs can be run without RuboCop enforcement

$ rake spec

The RuboCop style enforcement can be run without running the tests

$ rake rubocop