MCPcopy
hub / github.com/umijs/qiankun

github.com/umijs/qiankun @v2.10.16 sqlite

repository ↗ · DeepWiki ↗ · release v2.10.16 ↗
251 symbols 588 edges 96 files 10 documented · 4%
README

qiankun

npm version coverage npm downloads build status dumi

qiankun(乾坤)

In Chinese, qian(乾) means heaven and kun(坤) earth. qiankun is the universe.

Qiankun enables you and your teams to build next-generation and enterprise-ready web applications leveraging Micro Frontends. It is inspired by and based on single-spa.

🤔 Motivation

A quick recap about the concept of Micro Frontends:

Techniques, strategies and recipes for building a modern web app with multiple teams using different JavaScript frameworks. — Micro Frontends

Qiankun was birthed internally in our group during the time web app development by distributed teams had turned to complete chaos. We faced every problem micro frontend was conceived to solve, so naturally, it became part of our solution.

The path was never easy, we stepped on every challenge there could possibly be. Just to name a few:

  • In what form do micro-apps publish static resources?
  • How does the framework integrate individual micro-apps?
  • How to ensure that sub-applications are isolated from one another (development independence and deployment independence) and runtime sandboxed?
  • Performance issues? What about public dependencies?
  • The list goes on long ...

After solving these common problems of micro frontends and lots of polishing and testing, we extracted the minimal viable framework of our solution, and named it qiankun, as it can contain and serve anything. Not long after, it became the cornerstone of hundreds of our web applications in production, and we decided to open-source it to save you the suffering.

TLDR: Qiankun is probably the most complete micro-frontend solution you ever met🧐.

:sparkles: Features

Qiankun inherits many benefits from single-spa:

  • 📦 Micro-apps Independent Deployment
  • 🛴 Lazy Load
  • 📱 Technology Agnostic

And on top of these, it offers:

  • 💃 Elegant API
  • 💪 HTML Entry Access Mode
  • 🛡 Style Isolation
  • 🧳 JS Sandbox
  • Prefetch Assets
  • 🔌 Umi Plugin Integration

📦 Installation

$ yarn add qiankun  # or npm i qiankun

📖 Documentation

You can find the Qiankun documentation on the website

Check out the Getting Started page for a quick overview.

The documentation is divided into several sections:

💿 Examples

Inside the examples folder, there is a sample Shell app and multiple mounted Micro FE apps. To get it running, first clone qiankun:

$ git clone https://github.com/umijs/qiankun.git
$ cd qiankun

Now install and run the example:

$ yarn install
$ yarn examples:install
$ yarn examples:start

Visit http://localhost:7099.

🎯 Roadmap

See Qiankun 3.0 Roadmap

👥 Contributors

Thanks to all the contributors!

contributors

🎁 Acknowledgements

📄 License

Qiankun is MIT licensed.

Extension points exported contracts — how you extend this code

Window (Interface)
(no doc)
src/interfaces.ts
NetworkInformation (Interface)
(no doc)
src/prefetch.ts
HTMLLinkElement (Interface)
(no doc)
src/sandbox/patchers/dynamicAppend/common.ts
Navigator (Interface)
(no doc)
src/prefetch.ts
HTMLStyleElement (Interface)
(no doc)
src/sandbox/patchers/dynamicAppend/common.ts
Function (Interface)
(no doc)
src/sandbox/patchers/dynamicAppend/common.ts
HTMLElement (Interface)
(no doc)
src/sandbox/patchers/dynamicAppend/forStrictSandbox.ts
Window (Interface)
(no doc)
src/sandbox/__tests__/proxySandbox.test.ts

Core symbols most depended-on inside this repo

defineProperty
called by 44
src/sandbox/legacy/sandbox.ts
process
called by 36
src/sandbox/patchers/css.ts
get
called by 24
src/sandbox/legacy/sandbox.ts
hasOwnProperty
called by 18
src/sandbox/proxySandbox.ts
getCurrentRunningApp
called by 17
src/sandbox/common.ts
rebindTarget2Fn
called by 12
src/sandbox/common.ts
getOwnPropertyDescriptor
called by 11
src/sandbox/legacy/sandbox.ts
sleep
called by 8
src/utils.ts

Shape

Function 175
Method 38
Class 28
Interface 8
Enum 2

Languages

TypeScript100%

Modules by API surface

src/sandbox/patchers/dynamicAppend/common.ts24 symbols
src/utils.ts21 symbols
src/sandbox/proxySandbox.ts16 symbols
src/sandbox/legacy/sandbox.ts13 symbols
src/loader.ts13 symbols
src/sandbox/patchers/css.ts11 symbols
src/prefetch.ts9 symbols
src/sandbox/snapshotSandbox.ts7 symbols
src/sandbox/__tests__/common.test.ts7 symbols
src/apis.ts7 symbols
src/sandbox/patchers/dynamicAppend/forStrictSandbox.ts6 symbols
src/sandbox/__tests__/proxySandbox.test.ts6 symbols

Dependencies from manifests, versioned

@angular-builders/custom-webpack9.2.0 · 1×
@angular-devkit/build-angular0.900.3 · 1×
@angular/animations9.0.2 · 1×
@angular/cli9.0.3 · 1×
@angular/common9.0.2 · 1×
@angular/compiler9.0.2 · 1×
@angular/compiler-cli9.0.2 · 1×
@angular/core9.0.2 · 1×
@angular/forms9.0.2 · 1×
@angular/language-service9.0.2 · 1×
@angular/platform-browser9.0.2 · 1×
@angular/platform-browser-dynamic9.0.2 · 1×

For agents

$ claude mcp add qiankun \
  -- python -m otcore.mcp_server <graph>

⬇ download graph artifact