npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@openmfp/portal-ui-lib

v0.192.14

Published

This library helps you to set up an openmfp based micro frontend portal server with ease.

Readme

Portal UI Library

Build Status REUSE status

This library helps you to set up your angular project consuming Luigi configuration.

The main features of this library are:

  • Enable dynamic Luigi configuration consumption in a microfrontend.
  • Provide authentication capabilities with Auth Server
  • Dynamic development capabilities by embedding your locally running microfrontend into a Luigi frame.

Table of Contents

Getting Started

Dependencies

Besides putting the @openmfp/portal-ui-lib dependency into the package.json be sure as well to include the @luigi-project/core and @luigi-project/plugin-auth-oauth2 in proper versions (along with any other dependency required).

Angular Configuration

Configure the angular build process (in the angular.json file) to include the content of the Luigi core project and assets from @openmfp/portal-ui-lib library into the project assets, as shown below:

{
  // ... the rest of the angular.json configuration
  
  "assets": [
    {
      "glob": "**",
      "input": "node_modules/@luigi-project/core",
      "output": "/luigi-core"
    },
    {
      "glob": "**",
      "input": "node_modules/@openmfp/portal-ui-lib/assets/",
      "output": "/assets/"
    },
  ]
    // ... other configured assets
  ]
  
}

Import the Portal providers and Bootstrap the app with PortalComponent

First you have to import the providePortal and bootstrap the PortalComponent in your main.ts file. To do this call providePortal(portalOptions) method, which takes the PortalOptions object as an argument, inside the providers section of the application configuration. It is important to note that the providePortal(portalOptions) should be imported after any app specific routing providers (e.g. provideRouter(appRoutes)).

The result may look like this:

import { importProvidersFrom } from '@angular/core';
import { bootstrapApplication } from '@angular/platform-browser';
import { provideRouter } from '@angular/router';
import {
  providePortal,
  PortalComponent,
  PortalOptions,
} from '@openmfp/portal-ui-lib';
import { appRoutes } from './app/app-routes';

const portalOptions: PortalOptions = {
    // ... portal options
}

bootstrapApplication(PortalComponent, {
  providers: [
      provideRouter(appRoutes), 
      importProvidersFrom(AnyRequiredModule),
      providePortal(portalOptions),
       
      // ... any other providers imports
    ]
  }
);

Update index html file of the project

The next step in order to have the portal working is to update the index.html file with the inclusion of:

  • the /luigi-core/luigi.js script,
  • the /luigi-core/luigi_horizon.css styles,
  • and placing the <app-portal></app-portal> html tag inside the html body.

Below is an example:

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>App</title>
        <base href="/">
        <meta name="viewport" content="width=device-width, initial-scale=1">
        <link rel="stylesheet" href="/luigi-core/luigi_horizon.css" />
    </head>
    <body>
        <noscript>You need to enable JavaScript to run this app.</noscript>
        <script src="/luigi-core/luigi.js"></script>
        <app-portal></app-portal>
    </body>
</html>

Implement the Custom Services

The library comes with a set of services that can be used to customize the portal behavior. Please visit the Frontend configuration - Extended Guide to get familiar with the configuration options and how to use them.

Configure Proxy for Backend REST Calls

The library executes rest calls "/rest/**" against backend running with the library portal-server-lib. In order for the calls to reach your backend the proxy.config.json needs to be provided, with the target reaching the place where and on what port the backend is running "target": "http://localhost:3000".

{
  "/rest/**": {
    "target": "http://localhost:3000",
    "secure": false,
    "logLevel": "debug",
    "changeOrigin": true
  }
}

The proxy file needs to be indicated in the file angular.json section serve:

 {       
        "serve": {
          "builder": "@angular-devkit/build-angular:dev-server",
          "options": {
            "proxyConfig": "proxy.config.json"
          },
          "configurations": {
            "production": {
              "browserTarget": "build:production"
            },
            "development": {
              "browserTarget": "build:development"
            }
          },
          "defaultConfiguration": "development"
        }

}

Start your Project

After finishing all the required steps you might want to check your integration with the library and run your local application. In order to do that, firstly you need to run the local server part of the portal, please follow the instruction provided here Once the server is running execute your ui starting script (e.g. ng serve --port 4300 ) remembering that the default localhost port should be 4300 otherwise you need to set the environment variable to expected FRONTEND_PORT=ZZZZ and restart the server.

Local Extension Development

You can set up a local instance of your application. This allows you to thoroughly test your application before you release it to production. Please follow our local setup guide for this task.

Requirements

The portal requires a installation of node.js and npm. Checkout the package.json for the required node version and dependencies.

Contributing

Please refer to the CONTRIBUTING.md file in this repository for instructions on how to contribute to openMFP.

Code of Conduct

Please refer to the CODE_OF_CONDUCT.md file in this repository for information on the expected Code of Conduct for contributing to openMFP.

Licensing

Copyright 2025 SAP SE or an SAP affiliate company and openMFP contributors. Please see our LICENSE for copyright and license information. Detailed information including third-party components and their licensing/copyright information is available via the REUSE tool.