$ show neuland/micro-frontends
This repository is the source code for the micro-frontends.org website, an educational resource explaining the Micro Frontends architectural pattern. It contains a Jekyll-based static site with detailed tutorials, along with multiple self-contained example applications (plain HTML, client-side composition, universal composition, and data-fetching) that demonstrate key Micro Frontends concepts. The example code is organized by team (red, blue, green) and uses Custom Elements, Server-Side Includes (SSI), Docker Compose, and Nginx to illustrate how to build independent frontend fragments that can be composed into a cohesive application. The repository serves primarily as a learning tool and reference implementation, not a production-ready framework.
The LLM identified 3 files worth highlighting for reuse:
Defines a custom HTML element `<blue-basket>` that encapsulates the shopping basket micro frontend. It uses Custom Elements v1 lifecycle (connectedCallback, attributeChangedCallback) and communicates with other fragments by dispatching and listening to custom DOM events (`blue:basket:changed`). This component demonstrates a clean, isolated pattern for building a micro frontend fragment that is completely independent of the host page and other fragments.
An EJS template for the red team's page that uses Server-Side Includes (`<!--#include virtual="..." -->`) to compose fragments from the blue and green teams into a unified page. This pattern shows how a parent application can orchestrate server-side composition of independently deployed micro frontends, with shared CSS and common layout structure.
Implements the `<green-recos>` custom element which asynchronously loads recommendation data and renders a skeleton screen (placeholder gradients) while waiting. This pattern combines a custom element lifecycle, a separate fetch module, and a render function to provide a smooth loading experience for micro frontend fragments. It is a clear demonstration of the skeleton-screen technique within the Micro Frontends context.