@microfrontend/client
TypeScript icon, indicating that this package has built-in type declarations

1.6.0 • Public • Published

Production-quality controller for microfrontend applications

Enterprise-scale applications need a very high degree of integration and isolation between modules therefore iframes still remain the best solution to achieve it. However every browser has only one address field so you need a controller to handle many application routes simultaneously.

Microfrontend libries provide you exactly this type of functionality with a strong focus on a production quality of code.

This is the client library that shall be included into the microfrontend together with the @microfrontend/common library.

Credits

The original idea comes from Manfred Steyer and his meta-spa-router.

Manfred has also supported this development effort at s IT Solutions AT Spardat GmbH with his valuable advice and useful hints.

Features

  • The controller loads microfrontends (aka routed applications) in iframes
  • Microfrontends are isolated and cannot influence each other in an unplanned way
  • Microfrontends may use any SPA framework
  • Controller supports switching to a specific route within a child app
  • Controller synchronizes microfrontend's routes with the route of the shell
  • Solution supports flexible configuration of iframes
  • Solution respects origins to prevent CORS issues

Overall design

This project was generated with Angular CLI but only its toolset was used.

Controller libraries do not have any run-time dependencies and are free from side-effects and shall be therefore compatible with any SPA framework.

Name Description Required in a shell Required in a microfrontend
@microfrontend/common Shared code yes yes
@microfrontend/controller Controller code yes no
@microfrontend/client Microfrontend code no yes

Install

This is a Node.js module available through the npm registry. Installation is done using the npm install command:

$ npm install @microfrontend/common
$ npm install @microfrontend/client

Documentation

Additional documentation is located in GitHub repository.

License

MIT

Package Sidebar

Install

npm i @microfrontend/client

Weekly Downloads

2

Version

1.6.0

License

MIT

Unpacked Size

131 kB

Total Files

23

Last publish

Collaborators

  • s-itsolutions