diff --git a/README.md b/README.md index 9e3eaf3..75acce1 100644 --- a/README.md +++ b/README.md @@ -3,3 +3,60 @@ This repository holds the code for a NodeJS/Express service that implements dynamic generation of IIIF manifests, compliant with version 2 of the Presentation API. Support for version 3 should be added in the future. The project uses `yarn` for dependency management and an `.env` file to set environment variables, an example of which can be found in `.env.example`. + +## Installation + +`GreekManifests` requires NodeJS v. >= 20 to be installed on the system, as well as `yarn` as a package manager, which can be installed globally via `npm`: + +``` +npm install -g yarn +``` + +To install the service itself, clone this repository on the target host (replace `` with a suitable path, or remove to install in `./greek-manifests`): + +``` +git clone https://git.electricmandarine.cloud/nicolo/greek-manifests +``` + +then run the following commands from the root folder: + +``` +yarn +node app.mjs +``` + +This will start the [Express](https://expressjs.com) web server, which will remain attached to the terminal. This is suitable for testing purposes, for a production instance the Node process should be handled via a `systemd` unit or with [PM2](https://pm2.keymetrics.io), in addition to a reverse proxy like [Nginx](https://nginx.org/en/) or [Caddy](https://caddyserver.com/docs/). + + +## Documentation + +Automatic JSDoc documentation for the codebase can be generated by running the following command from the root folder: + +``` +jsdoc -c jsdoc.json +``` + +assuming that `jsdoc` is available globally (or locally for the user). The HTML documentation will be available in `docs/`, open `docs/index.html` with a browser to view it. + +Here follows a basic description of the project's strcture and its main APIs. + +### IIIF Resources + +Relevant IIIF Resources are modeled as JavaScript classes in `src/iiif`, with an `IIIFResource` base class that provides a shared constructor. The classes are: + +- `Manifest`: represents a IIIF manifest object +- `Canvas`: represents a IIIF canvas object +- `Image`: represent an image annotation associated with a canvas +- `Sequence`: a list of canvases, required by v2 of the IIIF Presentation API, it will be removed when moving to v3 (see also "[Presentation API support](#presentation-api-support)"). + +### Services + +... + +### Routes + +... + +### Presentation API support + +Currently, the service only supports version 2 of the [IIIF Presentation API](https://iiif.io/api/presentation/2.0/), but support for version 3 is planned. It's possible that the manifest and canvas URIs will reflect the version number to keep both v2 and v3 functioning.