Skip to content
Snippets Groups Projects
user avatar
Xiao Gui authored
chore: lint
57362239

Interactive Atlas Viewer

Interactive Atlas Viewer is an frontend module wrapping around nehuba. It provides additional features, such as metadata integration, data visualisation and a robust plugin system.

Getting Started

A live version of the Interactive Atlas Viewer is available at https://interactive-viewer.apps.hbp.eu. This section is useful for developers who would like to develop this project.

General information

Interactive atlas viewer is built with Angular (v9.0), Bootstrap (v4), and fontawesome icons. Some other notable packages used are ngrx/store for state management.

Releases newer than v0.2.9 also uses a nodejs backend, which uses passportjs for user authentication, express as a http framework.

Develop

Prerequisites

  • node >= 12

Environments

It is recommended to manage your environments with .env file.

Buildtime environments

Please see build_env.md

Deploy environments

Please see deploy_env.md

e2e test environments

Please see e2e_env.md

Start dev server

To run a dev server, run:

$ git clone https://github.com/HumanBrainProject/interactive-viewer
$ cd interactive-viewer
$ npm i
$ npm run dev-server

Start backend (in a separate terminal):

$ cd deploy
$ node server.js

Build

$ npm run build-aot

Develop plugins

Below demonstrates an example workflow for developing plugins:


$ # build aot version of the atlas viewer
$ npm run build-aot
$ cd deploy
$ # run server with PLUGIN_URLS
$ PLUGIN_URLS=http://localhost:3333/manifest.json;http://localhost:3334/manifest.json node server.js

Interactive Atlas Viewer attempts to fetch list of manifests:

GET {BACKEND_URL}/plugins

The response from this endpoint will be:

[
  "http://localhost:3333/manifest.json",
  "http://localhost:3334/manifest.json"
]

When user launches the viewer, the atlas viewer will attempt to fetch the metadata of the plugins:

GET http://localhost:3333/manifest.json
GET http://localhost:3334/manifest.json

The response from these endpoints are expected to adhere to manifests.

When the user launches the plugin, the viewer will fetch templateUrl and scriptUrl, if necessary.

Plugin developers can start their own webserver, use interactive-viewer-plugin-template, or (coming soon) provide link to a github repository.

plugin readme

plugin api

plugin migration guide

Contributing

Feel free to raise an issue in this repo and/or file a PR.

Versioning

Commit history prior to v0.2.0 is available in the legacy-v0.2.0 branch. The repo was rewritten to remove its dependency on neuroglancer and nehuba. This allowed for simpler webpack config, faster build time and AOT compilation.

License

Apache-2.0