i3 Hub

Table of Contents

Overview

The meta-platform is a project developed by i3lab (at Politecnico di Milano) that aims to collect all the therapeutic-oriented services created so far and those to be created in the future. The official name of the meta-platform is i3HUB.

About the project

The aim of the project is to unify all services under one standard. This should allow future developers to avoid rewriting modules such as login, registration and user management, as they are already available in existing services. Besides these, there are also modules for task management, such as the one to create task configurations or the one to start them. The system presented here is composed of several microservices and it is necessary to fully understand the functioning of each of these in order to understand how the meta-platform works.

All those services are independently deployed via Docker using Docker Swarm as container orchestrator.

Microservice oriented

The platform architecture is organized in micro services. In particular, each micro-service represents a functionality of the system. The advantages of this approach are: a greater simplicity in the development of the single functionality and the avoidance of a single point of failure. Here a brief overview of each component is given. Each of them is then discussed in detail in its dedicated section.

Below a diagram with the main components:

  • Core: the core of the backend software contains the main entities of user (also called subject), institute and operator (also called therapist) and the relationships between these elements. It also contains all the logic to interact with these elements and the necessary APIs.
  • User Interface: CSR application in NuxtJS which contains all the graphical components of the interface.
  • MetaService: SSR application in NuxtJS that acts as middleware between the Core of the platform and the other services. In particular, it is responsible for checking the health of the other applications and custom services and for retrieving from the latters the activity configurations.
  • NATS message broking service that distributes all requests to the various services asynchronously.
  • Ory suite of services that deals with authentication, authorization and zero-trust network.
  • Kratos Authentication Service
  • Keto Authorization Service
  • Oathkeeper Zero-trust Network
  • MIN.io storage service with similar characteristics to AWS S3. Contains static files that are persistently grouped in buckets.
  • Exim mail server. It is used to sort all the mails that the service X needs to send to users.

User experience flow

Here, the flow of UX is introduced to show how the interaction between the platform and the custom services occurs. Please note that custom services are developed independently of the platform and are connected to it only at a later time.

Institute selection

Once logged in, you are presented with a screen for selecting institutes. Once the institute has been selected, it will be inserted into an object which we will refer to as payload. The payload is a JSON serialized object that is passed from the i3hub meta platform to the custom service. More about it here

Once the institution has been selected, the payload will look like the following:

{
  "payload": {
    "currentInstitute": {
      "id": "4ffd636a-5969-46fb-8974-5804fe868589",
      "name": "Example Institute",
      "city": "Milano",
      "address": "Via Golgi 39",
      "image": "path/to/institute/image"
    }
  }
}

Homepage

Within the Homepage you can decide to manage users, services or, if you want, to start a new activity with a service available in your institution.

Start a session

If you decide to create a new session, a popup will appear to select all the missing information.

{
    "payload": {
        "currentInstitute": { ... },
        "currentSubjects": [
            {
                "id":"fc157cb9-7ae1-47fe-81ee-a1f371dc481b",
                "name":"Marco",
                "surname":"Rossi",
                "email":null,
                "birthdate":"1994-09-09T00:00:00.000Z",
                "servicesConfiguration": {},
                "gender":true,
                "isAnonymous":null,
                "image":"",
                "instituteId": "4ffd636a-5969-46fb-8974-5804fe868589"
            }
        ],
        "currentService": { ... },
        "currentActivities": [ ... ],
    }
}

Payload

When you select all the information, the payload is passed to the custom service via backend or frontend (developer can set this parameter).


comments powered by Disqus