This document contains the following sections:
Luigi is an open source JavaScript framework for micro frontends. Micro frontend architecture breaks down big frontend monoliths into smaller and simpler chunks which can be developed by independent teams.
The Luigi framework provides configuration options, API functions, and out-of-the-box features which make migrating to a micro frontend architecture easier. Luigi provides a consistent user navigation for all your micro frontends, ensuring a better user experience.
Most importantly, Luigi is technology-agnostic, which means you can use virtually any toolkit (including, but not limited to: Angular, React, Vue, or UI5) to create your frontend.
Some benefits of a micro frontend architecture include:
Luigi consists of two main parts:
Luigi Core - refers to the "main app", in which your micro frontends (a.k.a. views) will be embedded. It offers some of the following configurable features:
NOTE: You can also use Luigi Container to embed a Luigi micro frontend into any existing application without it being a Luigi Core app.
Luigi Client - refers to Luigi options related to micro frontends:
You can find Luigi setup examples for different frameworks here.
Follow these steps to add Luigi Client features to your existing micro frontends:
Here you can find some Luigi example applications and scenarios, starting from simple to more complex:
This is a simple example of a Luigi application inside a single HTML file. It is not intended for any real-life use.
You can run it by copying and pasting this code in a text editor, then saving it as an HTML file:
<!DOCTYPE html>
<html lang="en">
<head>
<title>Hello Luigi</title>
<link rel='stylesheet' href='https://unpkg.com/@luigi-project/core/luigi.css'>
<meta charset="utf-8">
</head>
<body>
<noscript>You need to enable JavaScript to run this app.</noscript>
<script src="https://unpkg.com/@luigi-project/core/luigi.js"></script>
<script>
Luigi.setConfig({
navigation: {
nodes: [{
pathSegment: 'home',
hideFromNav: true,
children: [{
pathSegment: 'hello',
label: 'Hello Luigi',
viewUrl: 'https://fiddle.luigi-project.io/examples/microfrontends/multipurpose.html',
isolateView: true,
context: {
title: 'Hello Luigi!',
content: " ",
imgUrl: "https://fiddle.luigi-project.io/img/logos/Luigi-logo_rgb.svg",
imgWidth: "300",
imgTopMargin: true
}
},{
pathSegment: 'hello2',
label: 'Hello Maryna',
viewUrl: 'https://fiddle.luigi-project.io/examples/microfrontends/multipurpose.html',
isolateView: true,
context: {
title: 'Hello Maryna!',
content: " ",
imgUrl: "https://fiddle.luigi-project.io/img/logos/Luigi-logo_rgb.svg",
imgWidth: "300",
imgTopMargin: true
}
}]
}]
},
routing: {
useHashRouting: true
},
settings: {
responsiveNavigation: 'semiCollapsible',
header: {
title: 'Hello Luigi',
logo: 'https://fiddle.luigi-project.io/img/luigi.png'
}
}
});
</script>
</body>
</html>
The Luigi Fiddle website is a sandbox playground where you can test Luigi. Simply click on Modify Config at the bottom right of the page to make changes to the Luigi application.
In the Examples section of our documentation, you can find links to several "Hello World" example applications which can help you explore Luigi's functions:
You can install them by following the instructions in the README file of each example.
Our tutorial on how to create a React and UI5 web-shopping application is intended for beginners, but it still delves deeper into Luigi's functions. It covers topics such as:
Alternatively, the tutorial app can be installed directly by following the README file of this GitHub repository.
This example application was created for testing purposes and it includes all possible Luigi features in one place. It is useful if you want to explore our framework in more detail or contribute to the Luigi project.
You can find the e2e test application and instructions on how to install it here.
In the expert scenarios section of the documentation, you can find implementations of more complex Luigi use cases, such as using feature toggles or authenticating with Google Cloud Identity.
GitHub Discussions - ask (or answer) questions related to Luigi, search for previously answered questions, and rate the answers for helpfulness.
Slack Channel - get Luigi updates, contact the Luigi team on Slack, and explore previous discussions.
GitHub contribution - if you have a specific improvement idea or want to contribute to Luigi, you can create an issue and pull request. Please follow our contribution guidelines when doing so.