Integrating single page applications (SPAs) into Metrici

A single page application (SPA) is a popular approach to designing web-based applications in which the entire application is served as a single web page. SPAs may be written using frameworks such as React, are often served from lightweight environments such as Node.js, and will make calls to their own application servers to access data.

The Metrici platform does not support the development or hosting of SPAs, but in some cases it may be useful to embed one or more SPAs into a Metrici solution, for example to:

  • Use the account management, user management and permission management of the Metrici platform.
  • Integrate the SPA into a broader set of Metrici features, either UI features such as documentation pages or callable features like localization or email.
  • Use Metrici's flexible data holding features to configure the SPA for different users.
  • Package access to the SPA into a Metrici product to make available to different customers, effectively turning an SPA into a software-as-a-service (SaaS) offering.

This document outlines a basic approach to this integration which should be sufficient for most situations. This is an initial version of the approach; later versions will consider additional features such as closer OAuth 2.0 compatibility, securing calls to Metrici using JWT, key management and token revocation.

The service calls are currently presented as if they were synchronous. These will be provided using suitable asynchronous semantics as part of version 4.1.8.