https://github.com/module-federation/federation-dashboard
Dashboard service to command, control, and visualize module federation based systems
https://github.com/module-federation/federation-dashboard
dashboard federation module
Last synced: about 1 year ago
JSON representation
Dashboard service to command, control, and visualize module federation based systems
- Host: GitHub
- URL: https://github.com/module-federation/federation-dashboard
- Owner: module-federation
- License: apache-2.0
- Created: 2020-05-10T22:15:02.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2024-03-26T20:00:19.000Z (about 2 years ago)
- Last Synced: 2025-04-22T02:28:17.063Z (about 1 year ago)
- Topics: dashboard, federation, module
- Language: JavaScript
- Homepage: federation-dashboard-alpha.vercel.app
- Size: 27.9 MB
- Stars: 20
- Watchers: 9
- Forks: 6
- Open Issues: 22
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
Awesome Lists containing this project
README
# Medusa
The Module Federation dashboard takes visualizes the relationships between applications that expose and consume federatd modules.
# What is Medusa??
# Installation and startup
Trying it out on the test data
Step 1:
```shell script
> yarn install
```
Step 2:
```shell script
> cd dashboard-fe
> yarn build && yarn start
```
Step 3:
```shell script
> cd dashboard-example
> yarn build && yarn serve
```
# Trying it out on your own code
Globally install and launch the dashboard:
```shell script
> npm install -g @module-federation/dashboard-plugin
> mfdash
```
The dashboard will be available on [http://localhost:3000/](http://localhost:3000/).
In your project, first install the dashboard plugin.
```shell script
> yarn add @module-federation/dashboard-plugin -D
```
In your `webpack.config.js` import the dashboard plugin.
```js
const DashboardPlugin = require("@module-federation/dashboard-plugin");
```
And add the plugin to the `plugins` array and alter the parameters to suit.
```js
new DashboardPlugin({
filename: "dashboard.json",
dashboardURL: "http://localhost:3333/update",
metadata: {
baseUrl: "http://localhost:3002",
source: {
url: "https://github.com/module-federation/federation-dashboard/tree/master/dashboard-example/dsl",
},
remote: "http://localhost:3002/remoteEntry.js",
},
});
```
Neither `filename` nor `dashboardURL` are required. It's up to you how and when to invoke this plugin and how to store that data and send it to the dashboard. The `/update` endpoint just takes a JSON payload 'as-is'. To post the `dashboard.json` data manually use a `curl` request like this:
```shell script
> curl "http://localhost:3333/update" -X POST \
-d @dashboard-example/utils/dist/dashboard.json \
-H "Content-type: application/json"
```
Metadata isn't required, but it does make the experience better. For example, the `source` URL is used to provide clickable file links in some views. And the `remote` is used when providing information on how to consume the modules provided by
You should be able to see your application listed. You are _not_ required to have all your federated applicatons listed in the dashboard. But if application A depends on application B, and A is in the dashboard, but B is not, then you will not see references to B because the dashboard doesn't have that data. So you should do your best to get all the applications data into the dashboard.
