# jd-opensource/micro-app

**Attribution required: if you use, quote, or summarise this content, you must credit and link back to [awesome-repositories.com](https://awesome-repositories.com/repository/jd-opensource-micro-app).**

_How this analysis was created: the description and tags below were written by an AI model that read this project's README and public documentation pages; stars, license and language come straight from the GitHub API. The model does not read the source code._

6,256 stars · 643 forks · CSS · MIT

## Links

- GitHub: https://github.com/jd-opensource/micro-app
- Homepage: https://jd-opensource.github.io/micro-app/
- awesome-repositories: https://awesome-repositories.com/repository/jd-opensource-micro-app.md

## Topics

`javascript` `micro-frontend` `microapp` `webcomponents`

## Description

micro-app is a micro frontend framework for composing one web application from independently built and deployed sub-applications. Each sub-application is embedded into a host page at runtime through a custom element, so a single line of markup is enough to render it. The approach is framework-agnostic: a host built with one front-end framework can embed sub-applications written in another, with little code change.

What sets it apart is its isolation and coordination layer. A proxy-based JavaScript sandbox keeps each sub-application's global variables and side effects away from the host and its siblings. Scoped style rules and element-scope isolation keep CSS and DOM lookups inside each app's own subtree. A virtual routing system keeps each sub-application's route state separate from the browser address and coordinates navigation between host and children. Data can also be passed between the host and its sub-applications.

Beyond that core, the project covers idle-time preloading of sub-application resources, with relative asset paths completed against each app's own origin, and a plugin layer that can modify or intercept fetched sources before they run. Guidance is included for Vite-built and server-rendered sub-applications such as Next.js and Nuxt.js, for loading sub-applications from another domain once cross-origin headers are set, and for declaring supported browser targets.

The repository also includes a local demo environment: a host and several sample sub-applications on different frameworks, with options to start only selected apps or switch to an alternative host.

## Tags

### Web Development

- [Micro-Frontend Frameworks](https://awesome-repositories.com/f/web-development/single-page-applications/micro-frontend-frameworks.md) — Composes one web application from independently built and deployed sub-applications embedded into a host page at runtime.
- [Custom Element Embeds](https://awesome-repositories.com/f/web-development/custom-element-embeds.md) — Renders a sub-application inside a host page through a web-component-style custom element, needing only a single line of markup. ([source](https://github.com/jd-opensource/micro-app/tree/master/docs))
- [Framework-Agnostic Application Composition](https://awesome-repositories.com/f/web-development/framework-agnostic-application-composition.md) — Lets a host built with one front-end framework embed sub-applications written in another with little code change. ([source](https://github.com/jd-opensource/micro-app/tree/master/docs))
- [Host and Sub-Application Coordination](https://awesome-repositories.com/f/web-development/host-and-sub-application-coordination.md) — A virtual router that coordinates navigation across a host application and its embedded sub-applications.
- [Micro-Frontend Orchestrators](https://awesome-repositories.com/f/web-development/micro-frontend-orchestrators.md) — Composes one page from several separately developed sub-applications rendered inside a host through a web-component-style element. ([source](https://github.com/jd-opensource/micro-app/blob/master/README.md))
- [Micro-Frontend Routing](https://awesome-repositories.com/f/web-development/micro-frontend-routing.md) — Keeps each sub-application's route state separate from the browser address and synchronises navigation between host and children.
- [Cross-Framework Integrators](https://awesome-repositories.com/f/web-development/single-page-applications/cross-framework-integrators.md) — Combines apps written in different front-end frameworks inside one host page so teams keep their own stack without rewriting existing work.
- [Custom Element Loaders](https://awesome-repositories.com/f/web-development/single-page-applications/micro-frontend-frameworks/custom-element-loaders.md) — Renders a sub-application inside a host page through a custom element so a single line of markup is enough.
- [Sub-Application Embedding Elements](https://awesome-repositories.com/f/web-development/web-component-renderers/sub-application-embedding-elements.md) — Renders an independently built sub-application inside a host page through a custom element, so one line of markup is enough.
- [Application Route Managers](https://awesome-repositories.com/f/web-development/application-route-managers.md) — Provides a virtual routing system that keeps sub-application route state apart from the browser address and coordinates navigation between host and children. ([source](https://github.com/jd-opensource/micro-app/blob/master/README.zh-cn.md))
- [Cross-Framework Application Composition](https://awesome-repositories.com/f/web-development/cross-framework-application-composition.md) — Lets a host built with one front-end framework embed sub-applications written in another with little code change.
- [Cross-Framework Integrators](https://awesome-repositories.com/f/web-development/cross-framework-integrators.md) — Lets a host built with one front-end framework embed micro applications written in any other framework with little code change. ([source](https://github.com/jd-opensource/micro-app#readme))
- [Idle Asset Prefetchers](https://awesome-repositories.com/f/web-development/idle-asset-prefetchers.md) — Downloads and parses sub-application assets during browser idle time so later mounts skip the network wait.
- [Micro-Frontend Module Deployment](https://awesome-repositories.com/f/web-development/micro-frontend-module-deployment.md) — Splits one large web app into separately developed parts embedded inside a host page so teams can build and deploy them independently.
- [Sub-Application Preloaders](https://awesome-repositories.com/f/web-development/sub-application-preloaders.md) — Fetches sub-application assets ahead of time and completes their relative resource addresses so apps open quickly the first time. ([source](https://github.com/jd-opensource/micro-app#readme))

### Game Development

- [UI Sandbox Isolation](https://awesome-repositories.com/f/game-development/online-multiplayer/game-servers/container-isolation/ui-sandbox-isolation.md) — Runs each sub-application in a JavaScript sandbox with separate styles and elements so one app cannot interfere with another. ([source](https://github.com/jd-opensource/micro-app/blob/master/README.md))

### Programming Languages & Runtimes

- [Proxy-Based Global Sandboxes](https://awesome-repositories.com/f/programming-languages-runtimes/runtime-execution-environments/javascript-runtimes/sandboxed-javascript-execution/webassembly-javascript-sandboxes/proxy-based-global-sandboxes.md) — Intercepts reads and writes to global variables through a proxy so each sub-application runs scripts without polluting the host or siblings.

### Software Engineering & Architecture

- [Application Isolation](https://awesome-repositories.com/f/software-engineering-architecture/application-contexts/application-isolation.md) — Keeps each embedded app's scripts, styles and page elements separate from the host and from each other so teams cannot break one another's code. ([source](https://github.com/jd-opensource/micro-app/tree/master/docs))
- [Script Sandboxes](https://awesome-repositories.com/f/software-engineering-architecture/application-contexts/application-isolation/script-sandboxes.md) — Runs each sub-application's JavaScript inside a proxy sandbox so global variables and side effects stay away from the host and sibling apps. ([source](https://github.com/jd-opensource/micro-app/blob/master/README.zh-cn.md))
- [Micro-Frontend Isolation Layers](https://awesome-repositories.com/f/software-engineering-architecture/micro-frontend-isolation-layers.md) — Combines a script sandbox, scoped styles and element-scope isolation so each embedded sub-application cannot break the host or its siblings. ([source](https://github.com/jd-opensource/micro-app#readme))
- [Resource Plugin Hooks](https://awesome-repositories.com/f/software-engineering-architecture/plugin-based-extensibility/resource-plugin-hooks.md) — Passes fetched sub-application sources through developer-supplied plugin functions that can modify or intercept them before execution.

### Development Tools & Productivity

- [Cross-Application Data Sharing](https://awesome-repositories.com/f/development-tools-productivity/application-data-management/cross-application-data-sharing.md) — Passes data between a host and its sub-applications so independently deployed parts can share state and react to events. ([source](https://github.com/jd-opensource/micro-app#readme))

### User Interface & Experience

- [Scoped Rewriting](https://awesome-repositories.com/f/user-interface-experience/css-selectors/scoped-rewriting.md) — Rewrites CSS selectors with a unique per-application prefix so stylesheets stay confined to each sub-application's element tree.
- [Scoped CSS Isolation](https://awesome-repositories.com/f/user-interface-experience/styling-theming-systems/content-styling/component-styling-tools/scoped-css-isolation.md) — Scopes CSS rules to each sub-application's own element tree so styles do not leak between the host and its children. ([source](https://github.com/jd-opensource/micro-app/blob/master/README.zh-cn.md))
- [Web Application Embeds](https://awesome-repositories.com/f/user-interface-experience/web-application-embeds.md) — Embeds independently built sub-applications into a host page so one large web app can be split into separately developed parts. ([source](https://github.com/jd-opensource/micro-app#readme))
