{"id":19858317,"url":"https://github.com/tuya/medusa","last_synced_at":"2025-05-02T02:31:00.017Z","repository":{"id":45670616,"uuid":"406201553","full_name":"tuya/medusa","owner":"tuya","description":"Micro Frontends All-in-one Integrated Solution.","archived":false,"fork":false,"pushed_at":"2022-07-26T06:52:23.000Z","size":4143,"stargazers_count":113,"open_issues_count":0,"forks_count":18,"subscribers_count":18,"default_branch":"main","last_synced_at":"2025-04-06T21:22:30.636Z","etag":null,"topics":["medusa","micro-frontend","micro-frontends","qiankun","spa","tuya"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tuya.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-09-14T02:46:47.000Z","updated_at":"2024-12-18T14:11:11.000Z","dependencies_parsed_at":"2022-09-10T13:51:17.122Z","dependency_job_id":null,"html_url":"https://github.com/tuya/medusa","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuya%2Fmedusa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuya%2Fmedusa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuya%2Fmedusa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tuya%2Fmedusa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tuya","download_url":"https://codeload.github.com/tuya/medusa/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251972450,"owners_count":21673607,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["medusa","micro-frontend","micro-frontends","qiankun","spa","tuya"],"created_at":"2024-11-12T14:22:58.379Z","updated_at":"2025-05-02T02:30:55.007Z","avatar_url":"https://github.com/tuya.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"## Medusa\n\n\u003e (M)ircrofront(E)n(D) (U)niversal (S)inglepage (A)pplication. [Chinese Docs](https://tuya.github.io/medusa/)\n\nEnglish | [简体中文](./README_zh.md)\n\nMedusa is a micro frontend framework based on various frameworks. With extremely high framework compatibility, Medusa can run on several popular micro front-end frameworks. It enables [Qiankun](https://github.com/umijs/qiankun), [Icestark](https://github.com/ice-lab/icestark), [micro-zoe/micro-app](https://github.com/micro-zoe/micro-app), and [Next.js](https://github.com/vercel/next.js) to run in one environment simultaneously. The `proxy` sandbox solution is used to solve compatibility problems of old browsers. The main application and the micro-application are completed isolated.\n\n## Features\n\n- Unrestricted frontend framework.\n\n- Compatible with Qiankun, Icestark, micro-zoe/micro-app, and other micro frontend frameworks. It can be loaded directly without any changes.\n\n- Directly use the server-side rendering mode.\n\n- Load the popular server-side rendering framework Next.js.\n\n- Be used as an independent micro frontend framework.\n\n- Take the life cycle of React components as the life cycle of micro-applications.\n\n\n## Get started\n\nFor more information, see [Examples](./examples).\n\n### Main application\n\nThe main application is React.\n\n1. Install dependency\n\n    ```shell\n    $ yarn add mmed\n    ```\n\n2. Import the main application\n\n    ```tsx\n\n    import {Router, Route} from 'mmed'\n\n    const App = () =\u003e {\n      return \u003cRouter loading={\u003cdiv\u003eloading...\u003c/div\u003e}\u003e\n        \u003cRoute html=\"http://localhost:7100\" appId=\"reactApp\" /\u003e\n      \u003c/Router\u003e\n    }\n\n    ReactDOM.render(\u003cApp /\u003e, document.getElementById('app'))\n\n    ```\n\n### Micro-applications\n\nTake the development mode as an example. Set the cross-origin parameter of the page.\n\n```js\ndevServer: {\n  headers: {\n    'Access-Control-Allow-Origin': '*'\n  }\n}\n\n```\n\n## Example\n\nIn the `examples` directory, there are examples of the main application and three sub-applications. It also shows how to load the micro frontend in 8 ways in the main application.\n\n\n```shell\ngit clone https://github.com/tuya/medusa.git\ncd medusa\n```\n\n```shell\n\nyarn demo\n\n```\n\n![](./examples/demo-en.gif)\n\n## License\nFor more information about licenses, see [MIT](./LICENSE).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuya%2Fmedusa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftuya%2Fmedusa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftuya%2Fmedusa/lists"}