You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Mar 13, 2025. It is now read-only.
This is the micro-frontends-frame[single-spa](https://single-spa.js.org/) application which loads all other Topcoder micro applications.
3
+
This is the mfe-core[single-spa](https://single-spa.js.org/) application which loads all other Topcoder micro applications.
4
4
It always loads **Topcoder Navbar Microapp** which show the top navigation and handles authorization and loads other microapps depend on the current URL.
5
5
6
6
## Overview
7
7
8
8
Topcoder Single Spa consist of 3 main components:
9
9
10
-
- This frame application which is `micro-frontends-frame`[single-spa](https://single-spa.js.org/) application. The only function of this application is to register other micro applications to load.
10
+
- This frame application which is `mfe-core`[single-spa](https://single-spa.js.org/) application. The only function of this application is to register other micro applications to load.
11
11
-**Topcoder Navbar Microapp** - micro application which is always loaded by the frame application and shows top navigation bar and handles user authorization.
12
12
- Any other micro application can be loaded as main content of the overall application.
13
13
@@ -22,15 +22,15 @@ Topcoder Single Spa consist of 3 main components:
22
22
23
23
## Config
24
24
25
-
This `micro-frontends-frame` app has 2 types of configs:
25
+
This `mfe-core` app has 2 types of configs:
26
26
27
27
1. Import mapping for the frame, containg `micro app name` and `relative url path` for each micro app. The configuration files are available on TC AWS S3 and have public access.
@@ -39,7 +39,7 @@ This `micro-frontends-frame` app has 2 types of configs:
39
39
ii. Location of the AWS S3 files:
40
40
- Configure micro app names and relative URL to be used when deployed to production environment in file at location : `https://tc-platform-prod.s3.amazonaws.com/micro-frontends/micro-frontends-config-production.json`
41
41
- Configure micro app names and relative URL to be used when deployed to development environment in file at location : `https://tc-platform-dev.s3.amazonaws.com/micro-frontends/micro-frontends-config-development.json`
42
-
- Configure micro app names and relative URL to be used when deployed to local environment in file at location : `./micro-frontends-frame/config/micro-frontends-config-local.json`
42
+
- Configure micro app names and relative URL to be used when deployed to local environment in file at location : `./mfe-core/config/micro-frontends-config-local.json`
43
43
44
44
45
45
2. Route mapping handled by the frame, containing `route path` and `micro app name` for each micro app. The configuration files are available on TC AWS S3 and have public access.
@@ -53,7 +53,7 @@ This `micro-frontends-frame` app has 2 types of configs:
53
53
ii. Location of the AWS S3 files:
54
54
- Configure route path and micro app name to be used when deployed to production environment in file at location : `https://tc-platform-prod.s3.amazonaws.com/micro-frontends/micro-frontends-routes-production.txt`
55
55
- Configure route path and micro app name to be used when deployed to development environment in file at location : `https://tc-platform-dev.s3.amazonaws.com/micro-frontends/micro-frontends-routes-development.txt`
56
-
- Configure route path and micro app name to be used when deployed to development environment in file at location : `./micro-frontends-frame/config/micro-frontends-routes-local.txt`
56
+
- Configure route path and micro app name to be used when deployed to development environment in file at location : `./mfe-core/config/micro-frontends-routes-local.txt`
57
57
58
58
⚠️ **NOTE** : When a configuration files is updated on TC AWS S3, make sure to give public access to the file.
59
59
@@ -71,7 +71,7 @@ This `micro-frontends-frame` app has 2 types of configs:
71
71
72
72
## Local Deployment from multi web servers (nodemon & webpack-dev-server) for local development
73
73
74
-
To deploy `micro-frontends-frame` app locally run inside the project root `./micro-frontends-frame`:
74
+
To deploy `mfe-core` app locally run inside the project root `./mfe-core`:
75
75
76
76
| Command | Description |
77
77
| -------------------- | ---------------------- |
@@ -86,7 +86,7 @@ To deploy `micro-frontends-frame` app locally run inside the project root `./mic
86
86
87
87
## Local Deployment from web server (node)
88
88
89
-
To deploy `micro-frontends-frame` app locally run inside the project root `./micro-frontends-frame`:
89
+
To deploy `mfe-core` app locally run inside the project root `./mfe-core`:
90
90
91
91
| Command | Description |
92
92
| -------------------- | ---------------------- |
@@ -158,7 +158,7 @@ For adding a child app to the root app make the following steps:
158
158
1. Add child app path to importmap. File underpath
159
159
-`https://tc-platform-prod.s3.amazonaws.com/micro-frontends/micro-frontends-config-production.json` for production deployment
160
160
-`https://tc-platform-dev.s3.amazonaws.com/micro-frontends/micro-frontends-config-development.json` for development deployment
161
-
-`./micro-frontends-frame/config/micro-frontends-config-local.json` for local deployment
161
+
-`./mfe-core/config/micro-frontends-config-local.json` for local deployment
162
162
163
163
React example:
164
164
@@ -175,7 +175,7 @@ For adding a child app to the root app make the following steps:
175
175
2. Add a route which should show the app. File underpath
176
176
-`https://tc-platform-prod.s3.amazonaws.com/micro-frontends/micro-frontends-routes-production.txt` for production deployment
177
177
-`https://tc-platform-dev.s3.amazonaws.com/micro-frontends/micro-frontends-routes-development.txt` for development deployment
178
-
-`./micro-frontends-frame/config/micro-frontends-routes-local.txt` for local deployment
178
+
-`./mfe-core/config/micro-frontends-routes-local.txt` for local deployment
179
179
180
180
```html
181
181
<routepath="<RELATIVE_URL_PATH>">
@@ -185,7 +185,7 @@ For adding a child app to the root app make the following steps:
To run a child app locally we always need to have frame (`micro-frontends-frame`) which would load a child app. But the cool thing is that we don't have to deploy the frame locally and we can use already deployed frame app. We can use a dev tool to override a child app URL so it would be loaded from the local machine by following the next steps:
188
+
To run a child app locally we always need to have frame (`mfe-core`) which would load a child app. But the cool thing is that we don't have to deploy the frame locally and we can use already deployed frame app. We can use a dev tool to override a child app URL so it would be loaded from the local machine by following the next steps:
189
189
190
190
- Load already deployed frame app in the browser.
191
191
- Open browser console and set `devtools` flag in the local storage by executing the next command:
@@ -318,8 +318,8 @@ There is no universal approach to run any React app as child app in Single SPA.
and create a folder (ex: 'auth0-local-login'), and save the following file: 'https://accounts-auth0.topcoder-dev.com/setupAuth0WithRedirect.js' into that folder. After 'setupAuth0WithRedirect.js' file was saved, create an empty 'index.html' file with the following content:
@@ -344,8 +344,8 @@ and create a folder (ex: 'auth0-local-login'), and save the following file: 'htt
344
344
(1). root-config:
345
345
open Terminal #1
346
346
change the current dir to the root-config folder and apply patch:
there is a config file: '{navbar-app-repo}/config/development.js'. To login locally, change 'ACCOUNTS_APP_CONNECTOR', and 'AUTH' to point to the server that will be served in folder 'auth0-local-login' which was setup in the previous step.
360
360
```
361
361
URL: {
@@ -412,9 +412,9 @@ The app can be open at the browser url: 'http://localhost:5000' (this page will
there is a config file: '{navbar-app-repo}/config/development.js'. To login locally, change 'ACCOUNTS_APP_CONNECTOR', and 'AUTH' to point to the server that will be served in folder 'auth0-local-login' which was setup in the previous step.
492
492
@@ -588,4 +588,4 @@ change the current dir to the 'auth0-local-login' folder and serve with the inde
588
588
589
589
- npx http-server . -p 5000
590
590
591
-
The app can be open at the browser url: 'http://localhost:5000' (this page will redirect to the actual page: 'http://localhost:3000')
591
+
The app can be open at the browser url: 'http://localhost:5000' (this page will redirect to the actual page: 'http://localhost:3000')
0 commit comments