██████╗ ███████╗██████╗ ██╗ ██╗███╗ ███╗
██╔══██╗██╔════╝██╔══██╗██║ ██║████╗ ████║
██████╔╝█████╗ ██████╔╝██║ ██║██╔████╔██║
██╔══██╗██╔══╝ ██╔══██╗██║ ██║██║╚██╔╝██║
██║ ██║███████╗██║ ██║╚██████╔╝██║ ╚═╝ ██║
╚═╝ ╚═╝╚══════╝╚═╝ ╚═╝ ╚═════╝ ╚═╝ ╚═╝
A NodeJS web service for interaction with the RERUM digital object repository. Visit rerum.io for more general information and store.rerum.io for the hosted public instance. Want to use the API? Learn how in the API documentation.
Stores important bits of knowledge in structured JSON-LD objects:
- Web Annotation / Open Annotation objects
- SharedCanvas / International Image Interoperability Framework objects
- FOAF Agents
- any valid JSON object, even if there is no type specified!
- As RESTful as is reasonable—accept and respond to a broad range of requests without losing the map;
- As compliant as is practical—take advantage of standards and harmonize conflicts;
- Save an object, retrieve an object—store metadata in private (
__rerum) property, rather than wrap all data transactions; - Trust the application, not the user—avoid multiple login and authentication requirements and honor open data attributions;
- Open and Free—expose all contributions immediately without charge to write or read;
- Attributed and Versioned—always include asserted ownership and transaction metadata so consumers can evaluate trustworthiness and relevance.
You will find a __rerum property on anything you read from this repository. This is written onto
all objects by the server and is not editable by the client applications. While applications may assert
anything within their objects, this property will always tell the Truth. The details are in the
documentation, but broadly, you will find:
@contextthe RERUM API JSON-LD context file for these termsalphainternal flag for RERUM API version controlAPIversionspecific RERUM API release version for this data nodecreatedAtspecific creation date for this [version of this] objectgeneratedBythe agent for the application that authenticated to create this objectisOverwrittenspecific date (if any) this version was updated without versioningisReleaseda special flag for RERUM, indicating this version is intentionally public and immutablereleasesan object containing the most recent anscestor and descendant releaseshistoryan object containing the first, previous, and immediate derivative versions of this object
Trying to contribute or perform a fix in the public RERUM API? If not, are you sure you don't want to? Read the Contributors Guide for inspiration! If you are trying to set up your own RERUM then keep reading to learn more.
Check out MongoDB Atlas for a cloud hosted solution as well as instructions for installing MongoDB on your development machines.
The following is a git shell example for installing the RERUM API web application.
cd /code_folder
git clone https://github.com/CenterForDigitalHumanities/rerum_server_nodejs.git rerum_api
npm installCreate a file named .env in the root folder. In the above example, the root is /code_folder/tiny_things. /code_folder/tiny_things/.env looks like this:
RERUM_API_VERSION = 1.0.0
RERUM_BASE = URL_OF_YOUR_DEPLOYMENT
RERUM_PREFIX = URL_OF_YOUR_DEPLOYMENT/v1/
RERUM_ID_PREFIX = URL_OF_YOUR_DEPLOYMENT/v1/id/
RERUM_AGENT_CLAIM = URL_OF_YOUR_DEPLOYMENT/agent
RERUM_CONTEXT = URL_OF_YOUR_DEPLOYMENT/v1/context.json
RERUM_API_DOC = URL_OF_YOUR_DEPLOYMENT/v1/API.html
MONGO_CONNECTION_STRING = OBTAINED_FROM_MONGODB_SET_UP
MONGODBNAME = OBTAINED_FROM_MONGODB_SET_UP
MONGODBCOLLECTION = OBTAINED_FROM_MONGODB_SET_UP
DOWN = false
READONLY = falsePlease contact the Research Computing Group at Saint Louis University via an E-mail to research.computing@slu.edu for more information and assistance with step of the installation process.
The public RERUM uses Auth0 to authorize API calls for registered RERUM applications and to attribute data for those applications. This elicits the functionality that if an application has not registered with RERUM it will not be able to perform write (create - update - delete) actions with the RERUM API. It also allows queries into RERUM to query for data specific to individual applications when desired or required. The following properties need to be added to the .env file for this process.
AUDIENCE = OBTAINED_FROM_AUTH0_SET_UP
ISSUER_BASE_URL = OBTAINED_FROM_AUTH0_SET_UP
CLIENTID = OBTAINED_FROM_AUTH0_SET_UP
RERUMSECRET = OBTAINED_FROM_AUTH0_SET_UP
BOT_TOKEN = OBTAINED_FROM_BOT_REGISTRATION
BOT_AGENT = OBTAINED_FROM_BOT_REGISTRATIONYou will notice these variables used throughout the code. The connection to Auth0 must be active and functioning for these pieces of code or you will encounter errors in testing, building, and running.
Now, you can run tests
npm run runtestAnd start the app
npm startTo stop the application, kill or exit the process via your shell (CTRL + C or CTRL + X).
The developers in the Research Computing Group at Saint Louis University authored and maintain this service. Neither specific warranty or rights are associated with RERUM; registering and contributing implies only those rights each object asserts about itself. We welcome sister instances of RERUM, ports to other languages, package managers, builds, etc. Contributions to this repository will be accepted as pull requests.