performant-software / DM

DM is an environment for the study and annotation of images and texts. It is a suite of tools, enabling scholars to gather and organize the evidence necessary to support arguments based in digitized resources.
https://digitalmappa.org/
Other
18 stars 6 forks source link
annotation

DM: Tools For Digital Annotation and Linking

Installation

The easiest way to host your own instance of DM for your projects is to use Digital Ocean - a cloud computing platform where you can set up virtual server space for as little as $10/month. We’ve set up an optimized process to deploy DM to Digital Ocean. You can find this deployment system along with the most recent stable version of DM software here: DM Digital Ocean Deployment

Building and running for development or custom deployment

If you wish to deploy your DM instance on your own server or on a service other than Digital Ocean, you can do so by installing the requirements and running the scripts listed below in "Building and running for development or custom deployment." The scripts/build command will create a .jar file that, when launched in a properly configured environment, will provide the full DM application at port 8080.

Requirements

Configuration

Copy the contents of dm.conf.example to a file named dm.conf and fill in the values for OAuth providers you wish to enable. Please refer to the section below on "Creating an independent user authentication provider" and the guides for key/secret generation with the various services in the "Setting configuration variables" section.

Build instructions

$ scripts/build

Development instructions

In order to develop the client-side code, build and start the backend:

$ scripts/build
$ scripts/run

In parallel, initialize and start Browsersync:

$ npm run dev

Browsersync serves client-side assets from src/main/resources/static and proxies backend logic provided by the Java process, watching asset changes and reloading the app in the browser when needed.

Creating an independent user authentication provider

DM supports login through the OAuth protocol, and by default connects to Google's and GitHub's authentication providers. In addition, an independent OAuth provider application can be quickly created using the accompanying Simple OAuth2 provider repository. To add this service, follow the deployment instructions in that repository's ReadMe, then navigate to your-provider-application-url/oauth/applications and add an entry for your DM instance. You should use 'DM' for the application name and add your-dm-application-url/accounts/oauth-callback/independent to the Redirect URI field (this field can accommodate a list of callback URIs separated by line breaks, which is useful if you wish to provide authentication to multiple DM instances). Click Submit to save the application configuration, and copy the Application Id (key) and Secret values shown on the subsequent page.

Setting configuration variables

The following variables must be set to allow DM to work with an OAuth provider for user authentication:

Restoring a Downloaded Project from Another Instance

If you wish to seed your new instance with an exported project from an existing instance, first navigate to the existing project and click "Download" in its table of contents view. You will then need to copy the download file to your instance server and relaunch the application.

Restoring All Projects from Another Instance

If you are restoring a full-data backup from another DM instance, you will next need to unpack the compressed backup file, upload it to your new installation server, and relaunch the DM application. You will need to use command line tools for this process: