Browser Platform

Overview

The Main app (or Browser Platform) in the context of io.Connect Browser is a web app that uses the @interopio/browser-platform library. This app is responsible for configuring the entire io.Connect environment and acts as a central hub for all Browser Client apps in your io.Connect Browser project. All io.Connect operations are routed through this Main app, meaning that this is the place where you can get centralized logging, information about all operations and details about the general state of your project. The configuration for all io.Connect libraries (e.g., App Management, Layouts, Workspaces, Plugins, Notifications) is handled here.

The Main app also provides tracking and control over non-io.Connect apps opened through it. The level of control is limited, but all basic operations are available - opening, closing, receiving events, listing, adding and manipulating via Workspaces.

For information on how to initialize the @interopio/browser-platform library and use io.Connect APIs in JavaScript, React and Angular Main apps, see the respective sections.

ℹ️ For information on purchasing the io.Connect Browser platform or requesting a trial license, contact us.

Characteristics and Limitations

Keep in mind the following important characteristics and limitations of the Main app:

  • It's mandatory for an io.Connect Browser project to have a Main app (Browser Platform), because it handles the entire io.Connect environment which connects all Browser Client apps. In order for a Browser Client app to be connected to the io.Connect environment, it must be opened by the Browser Platform app or by another Browser Client already connected to the io.Connect environment.

  • The Main app must be the only entry point of the project for the end users to ensure that it's running before any Browser Client app has been opened.

  • If the Main app is closed, all Browser Client apps will lose their connection to io.Connect and therefore to all io.Connect capabilities. Opening the Main app again won't reestablish the connection, because this will effectively be an entirely new window with a new session and new context. However, if the Main app is refreshed, the existing Browser Client apps will detect this and will reconnect as soon as the Main app is back online.

  • Due to browser limitations, the Browser Platform app window can't be manipulated through the Window Management or App Management APIs (closed, moved, etc.). The Main app is designed to be opened manually by the end users - if it hasn't been opened by a script, it can't be manipulated by a script.

  • It's possible for the user to open more than one instance of the Main app. However, there will be no connection between the windows opened by the different Main app instances or between the Main app instances themselves, unless the subsequent Main apps are opened by another Main app. If a Main app is started by another Main app, then it falls back to being a regular Browser Client app and it will be connected to the Main app that has started it and to all other Browser Client apps opened by the same Main app.

Progressive Web App

The Main app of your io.Connect Browser project can be configured as a Progressive Web App (PWA) in order to take advantage of PWA features such as native-like feel, working offline, enhanced performance, and more.

The Main app is a standard web app and there aren't any specific requirements related to the io.Connect framework in order to make your Main app a PWA. To configure your Main app as an installable PWA, it's enough to provide a web app manifest for it (a manifest.json file).

⚠️ Note that if you want to use notification with actions, a Service Worker is also required for your Main app.

If you decide to configure your Main app as a PWA, you should take into consideration an important architectural feature of the platform and the related implications - the Browser Client apps participating in the platform can be hosted at origins different from the origin of the Main app.

In the context of PWAs, this means that when your Main app is installed as a PWA and opens a Browser Client app hosted at a different origin, the newly opened window containing the Browser Client app will contain an additional UI element displaying the URL address bar and other browser controls. This is a security feature implemented by the modern web browsers and its goal is to inform and orient the user that they are navigating outside the scope of your PWA.

ℹ️ For details on how to remove the URL address bar displayed when your PWA navigates out of scope, see the Getting Started > Security section.