Logo vun Architecture Micro Frontends

Architecture Micro Frontends

Communautéit
j4flmao
architecture-micro-frontends

Use this skill when the user says 'micro-frontends', 'MFE', 'Module Federation', 'split the frontend monolith', 'independent frontend deploys', 'single-spa', 'import maps', 'app shell with remotes'. Decides whether micro-frontends are justified and designs the split, composition technique (build-time, Module Federation, Web Components, server/edge composition, iframes), shared dependencies, routing, communication, and styling isolation. Do NOT use for: component library/design system work (frontend/universal/design-system), framework-specific architecture (frontend/<framework>), or bundler tuning unrelated to federation (frontend/universal/bundler-tools).

Iwwersiicht

Editeurj4flmao
Repositoryagent-skills
Skill-Nummarchitecture-micro-frontends
Stären
41
Forks
6
Matgeliwwert Fichieren
Nëmmen Instruktiounen
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • Alles an den Instruktiounen

    Alles, wat de Modell brauch, steet an den Instruktiounen — keng zousätzlech Dateien ze synchroniséieren.

  • Open Source

    Vum j4flmao op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Architecture Micro Frontends an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/j4flmao/agent-skills/tree/main/skills/architecture/micro-frontends
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/j4flmao/agent-skills.git /tmp/agent-skills
mkdir -p .claude/skills
cp -r /tmp/agent-skills/skills/architecture/micro-frontends .claude/skills/architecture-micro-frontends
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Architecture Micro Frontends an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Architecture Micro Frontends automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Architecture Micro Frontends net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Micro-Frontends

Purpose

Micro-frontends let independent teams build, test, and deploy parts of one web UI separately. They solve an organizational scaling problem (many teams blocking each other on one release), not a technical performance problem, and they add runtime complexity, duplication risk, and consistency work. Use them when team autonomy is the bottleneck; otherwise a well-structured modular monolith is cheaper.

Agent Protocol

Trigger

"micro-frontends", "MFE", "Module Federation", "remoteEntry", "single-spa", "import maps", "app shell", "independent UI deployments".

Input Context

  • Number of teams and how they map to product areas.
  • Current frontend stack(s), build tooling (webpack, Rspack, Vite), deployment pipeline.
  • Pain points: release coordination, build times, ownership conflicts.
  • SEO/SSR requirements and performance budgets.

Output Artifact

Go/no-go decision, domain split, composition approach, shared-dependency policy, contracts (routes, events), and governance rules.

Response Format

Decision: {MFE|modular monolith} because {reason}
Split: {MFE: owning team, routes}
Composition: {build-time|module federation|web components|server/edge|iframe}
Shared: {react@x singleton, design-system@y} policy={versions}
Comms: {URL/state params|CustomEvent|shared minimal store}
Styling isolation: {CSS Modules|Shadow DOM|prefix}
Perf budget: {JS KB per route}

Completion Criteria

  • MFEs split by business domain/route, not by technical layer.
  • One framework major version enforced for shared singletons.
  • Contracts between host and remotes versioned and tested.
  • Remote failures degrade gracefully (error boundary/fallback).
  • Performance budget measured per route.

Should You?

SignalPoints to
1-3 teams, one product areaModular monolith (monorepo packages, enforced boundaries)
Many teams blocked on one release trainMicro-frontends
Need to embed legacy app during migrationMFE (strangler pattern)
Mixed frameworks as a goal in itselfRed flag: cost without benefit

Composition Techniques

TechniqueWhen composedProsCons
Build-time packages (npm)BuildSimple, type-safeNot independently deployable (host must rebuild)
Module Federation (webpack 5, Rspack, @module-federation/* incl. Vite plugin)Runtime (JS)Independent deploys, shared singletonsTooling coupling, version skew at runtime
single-spa / import mapsRuntimeFramework-agnostic lifecycleMore glue code
Web ComponentsRuntime (DOM)Framework-agnostic, Shadow DOM isolationPassing rich data/callbacks is clunky; SSR limited
Server/edge composition (SSI/ESI, fragments)RequestGood for SEO and first paintInfra complexity, interactivity wiring
iframesRuntimeStrong isolationPoor UX for layout, routing, overlays, a11y

Module Federation Example (webpack 5)

js
// checkout/webpack.config.js  (remote)
const { ModuleFederationPlugin } = require("webpack").container;
const deps = require("./package.json").dependencies;

module.exports = {
  output: { publicPath: "auto", uniqueName: "checkout" },
  plugins: [
    new ModuleFederationPlugin({
      name: "checkout",
      filename: "remoteEntry.js",
      exposes: { "./CheckoutPage": "./src/CheckoutPage" },
      shared: {
        react: { singleton: true, requiredVersion: deps.react },
        "react-dom": { singleton: true, requiredVersion: deps["react-dom"] },
      },
    }),
  ],
};
js
// shell/webpack.config.js  (host)
new ModuleFederationPlugin({
  name: "shell",
  remotes: { checkout: "checkout@https://cdn.example.com/checkout/remoteEntry.js" },
  shared: { react: { singleton: true, requiredVersion: deps.react },
            "react-dom": { singleton: true, requiredVersion: deps["react-dom"] } },
});
tsx
// shell/src/routes.tsx
import { lazy, Suspense } from "react";
import { ErrorBoundary } from "react-error-boundary";

const CheckoutPage = lazy(() => import("checkout/CheckoutPage"));

export function CheckoutRoute() {
  return (
    <ErrorBoundary fallback={<p>Checkout is temporarily unavailable.</p>}>
      <Suspense fallback={<p>Loading checkout…</p>}>
        <CheckoutPage />
      </Suspense>
    </ErrorBoundary>
  );
}

For dynamic remote URLs per environment, load a manifest at runtime (Module Federation 2 runtime APIs or your own config endpoint) instead of hardcoding CDN paths.

Contracts and Communication

  • Routing: the shell owns top-level routes; each MFE owns its sub-routes.
  • Data: pass via URL/route params and props at the mount point; share auth/session via the shell, not via each MFE's own login.
  • Events: window.dispatchEvent(new CustomEvent("cart:item-added", { detail: { sku, qty } })) with a documented, versioned event catalog.
  • Shared state: keep it minimal (user, locale, feature flags), exposed through a small typed API from the shell; never a shared global Redux store whose shape other teams depend on.

Styling and Design Consistency

  • Scope styles: CSS Modules, CSS-in-JS with unique prefixes, or Shadow DOM for Web Components.
  • Share a design system as a versioned package (tokens + components); it is the main lever for consistent UX.
  • Avoid global resets inside remotes.

Performance

  • Share framework singletons; audit bundles per route for duplicated libraries.
  • Preload remoteEntry for likely-next routes; lazy-load the rest.
  • Set a JS budget per route and enforce it in CI.

Governance

  • Compatibility rules: host and remotes agree on React/Vue major version and design-system major version; upgrades are coordinated platform work.
  • Contract tests: shell smoke tests against each remote's deployed remoteEntry before promotion.
  • Independent rollback per remote (versioned remote URLs).

Anti-Patterns

  • Splitting by technical layer (header team, button team).
  • Multiple framework majors loaded on one page.
  • Shared mutable global store across teams.
  • Remote failure crashes the whole shell (no error boundary).
  • MFEs for a single team "for the future".

Checklist

  • Organizational justification recorded.
  • Domain-aligned split with route ownership.
  • Composition technique chosen per SEO/SSR needs.
  • Shared singleton and version policy enforced.
  • Event/prop contracts versioned and tested.
  • Style isolation + shared design system.
  • Per-route performance budget and fallback UI.

References

  • Geers, "Micro Frontends in Action" (Manning, 2020); martinfowler.com, "Micro Frontends" (Cam Jackson, 2019).
  • webpack Module Federation docs; module-federation.io (Module Federation 2, Rspack/Vite plugins); single-spa docs.

Heefeg gestallte Froen

Wat mécht de KI-Skill Architecture Micro Frontends?

Use this skill when the user says 'micro-frontends', 'MFE', 'Module Federation', 'split the frontend monolith', 'independent frontend deploys', 'single-spa', 'import maps', 'app shell with remotes'. Decides whether micro-frontends are justified and designs the split, composition technique (build-time, Module Federation, Web Components, server/edge composition, iframes), shared dependencies, routing, communication, and styling isolation. Do NOT use for: component library/design system work (frontend/universal/design-system), framework-specific architecture (frontend/<framework>), or bundler...

Firwat Architecture Micro Frontends op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Architecture Micro Frontends besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Architecture Micro Frontends an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/j4flmao/agent-skills/tree/main/skills/architecture/micro-frontends an. TypingMind liest d'Datei SKILL.md an installéiert de Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Architecture Micro Frontends benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Architecture Micro Frontends benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Architecture Micro Frontends domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Architecture Micro Frontends gratis?

Jo. De Skill gëtt vum j4flmao ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇