nonblocking / mashroom

Mashroom Server, an Integration Platform for Microfrontends
https://www.mashroom-server.com
MIT License
52 stars 5 forks source link
microfrontends

Mashroom Server

About

Mashroom Server is a Node.js based Microfrontend Integration Platform. It supports the integration of Express web-apps on the server side and composing pages from multiple Single Page Applications on the client side. It also provides common infrastructure such as role based security, communication (publish/subscribe), theming, i18n, storage, and logging out of the box and supports custom middleware and services via plugins.

It allows it to implement SPAs completely independent and without a vendor lock-in, and to use it on arbitrary pages with different configurations and even multiple times on the same page. Registered SPAs (Portal Apps) can also be loaded and unloaded dynamically, hence they can be used as building blocks for Composite Apps or as part of a dynamic Cockpit.

The Mashroom Portal plugin which is responsible for rendering SPAs is fully capable of Hybrid Rendering. It renders the initial page requested by the user completely on the server-side (if all Portal Apps on the page also support SSR) and exchanges dynamically the content on the client-side for subsequent pages.

From a technical point of view the core of Mashroom Server is a plugin loader that scans npm packages for plugin definitions (package.json, mashroom.json) and loads them at runtime. Such a plugin could be an Express web-app or an SPA or more generally all kind of code it knows how to load, which is determined by the available plugin loaders. Plugin loaders itself are also just plugins, so it is possible to add any type of custom plugin type.

Mashroom Portal

Key features

Portal

Core

Quick Start

git clone https://github.com/nonblocking/mashroom-portal-quickstart
cd mashroom-portal-quickstart
npm run setup
npm start

Open http://localhost:5050 in your browser. Users: john/john, admin/admin

Homepage

https://www.mashroom-server.com

Blog

https://medium.com/mashroom-server

Youtube Channel

https://www.youtube.com/@mashroomserver

Development

For development Node.js >= 18 is required.

After cloning the repository just run

npm run setup

to install all dependencies and build the core packages.

To start the test server:

cd packages/test/test-server1
npm start

The test server will be available at http://localhost:5050

Development Resources

Plugin Examples

https://github.com/nonblocking/mashroom-plugin-demos

Remote Portal App Demos

Dynamic Cockpit Demo

https://github.com/nonblocking/mashroom-demo-dynamic-cockpit

Microfrontend Platform based on Mashroom and Kubernetes Demo

https://github.com/nonblocking/microfrontend-platform-kubernetes

Full Documentation

https://www.mashroom-server.com/documentation