Developer Guide

SchemaLink repositories are available within the AnacletoLAB organization. Each repository provides a README to explain its characteristics.

The webapp

The webapp code was originally forked from Neo4j’s Arrows repository. It maintains the same structure although we introduced new features. The repository is structured as a monorepo, hosting both apps and libraries in the same codebase.

Apps

SchemaLink uses only one app, stored in the apps/arrows-ts directory. The arrows-ts app contains (mostly) TypeScript code that handles the visual React components, as well as the Redux store.

Libraries

There are many libraries hosted in the webapp repository, in the libs directory. Specifically:

  • The api library is an adapter to the schemalink-api project
  • The graphics library provides the logic for rendering and interacting with the canvas
  • The linkml library handles LinkML schemas, converting the graph in the SchemaLink’s canvas from and to this language
  • The model library implements the data model for the main entities that are needed to run the webapp
  • The ontology-search library is an adapter to an ontology search engine. Right now the search engine that the library uses is https://www.ebi.ac.uk/ols4/
  • The selectors library gathers some Redux selectors that are generic enough to be useful for any app

The API

The API project runs alongside the webapp and provides useful endpoints to enable the webapp’s features. This includes exposing useful functionalities from the linkml python library, to assist the webapp in handling linkml schemas.

The deployment

SchemaLink is deployed as a docker compose project. To achieve that, both the webapp and the api offer a Dockerfile. On each tag on the main branch, the docker image is built by a GitHub action and pushed to the GitHub container registry. A Traefik container can also be included in the docker compose project, acting as a reverse proxy and taking care of routing and securing the connection. The deployment is automated using an Ansible playbook.

The docs

Just the Docs is used to generate this website. To update this website, it is enough to commit and push changes to the docs project. A GitHub action will run on the latest commit on the main branch, building the website using Jekyll and deploying it using GitHub pages.