Skip to content

Architecture

The high-level implementation of the platform system architecture and the flow of user experience with respect to it will be presented below.

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 (Client-Side Rendered) application in NuxtJS which contains all the graphical components of the interface.

  • MetaService: SSR (Server-Side Rendered) 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.

  • 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.

  • Ory suite of services that deals with authentication, authorization and zero-trust network.

    • Kratos Authentication Service
    • Keto Authorization Service
    • Oathkeeper Zero-trust Network

Zero-trust Network

A zero-trust network is a service that filters all unauthorized messages coming from the outside. If you are not able to perform a certain operation, you probably are not allowed to do it.

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).

Back to top