Skip to content
This repository was archived by the owner on Mar 13, 2025. It is now read-only.

Commit 7639bf7

Browse files
Merge pull request #61 from topcoder-platform/dev
Deploy to PROD dev -> master
2 parents d5683d4 + c60752c commit 7639bf7

12 files changed

+78
-71
lines changed

.circleci/config.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ install_dependency: &install_dependency
1111
install_deploysuite: &install_deploysuite
1212
name: Installation of install_deploysuite.
1313
command: |
14-
git clone --branch v1.4.2 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
14+
git clone --branch v1.4.8 https://github.com/topcoder-platform/tc-deploy-scripts ../buildscript
1515
cp ./../buildscript/master_deploy.sh .
1616
cp ./../buildscript/buildenv.sh .
1717
cp ./../buildscript/awsconfiguration.sh .
@@ -53,15 +53,15 @@ jobs:
5353
environment:
5454
DEPLOY_ENV: "DEV"
5555
LOGICAL_ENV: "dev"
56-
APPNAME: "micro-frontends-frame"
56+
APPNAME: "mfe-core"
5757
steps: *builddeploy_steps
5858

5959
"build-prod":
6060
<<: *defaults
6161
environment:
6262
DEPLOY_ENV: "PROD"
6363
LOGICAL_ENV: "prod"
64-
APPNAME: "micro-frontends-frame"
64+
APPNAME: "mfe-core"
6565
steps: *builddeploy_steps
6666

6767
workflows:

README.md

Lines changed: 25 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
# Topcoder Frame Single-Spa Application (micro-frontends-frame)
1+
# Topcoder Frame Single-Spa Application (mfe-core)
22

3-
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.
44
It always loads **Topcoder Navbar Microapp** which show the top navigation and handles authorization and loads other microapps depend on the current URL.
55

66
## Overview
77

88
Topcoder Single Spa consist of 3 main components:
99

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.
1111
- **Topcoder Navbar Microapp** - micro application which is always loaded by the frame application and shows top navigation bar and handles user authorization.
1212
- Any other micro application can be loaded as main content of the overall application.
1313

@@ -22,15 +22,15 @@ Topcoder Single Spa consist of 3 main components:
2222

2323
## Config
2424

25-
This `micro-frontends-frame` app has 2 types of configs:
25+
This `mfe-core` app has 2 types of configs:
2626

2727
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.
2828

2929
i. What needs to be added for a new micro-app:
3030
```json
3131
{
3232
"imports": {
33-
"@topcoder/micro-frontends-navbar-app": "https://mfe.topcoder-dev.com/navbar/topcoder-micro-frontends-navbar-app.js",
33+
"@topcoder/mfe-header": "https://mfe.topcoder-dev.com/navbar/topcoder-mfe-header.js",
3434
"<MICRO_APP_NAME>": "<RELATIVE_URL_PATH>"
3535
}
3636
}
@@ -39,7 +39,7 @@ This `micro-frontends-frame` app has 2 types of configs:
3939
ii. Location of the AWS S3 files:
4040
- 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`
4141
- 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`
4343

4444

4545
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:
5353
ii. Location of the AWS S3 files:
5454
- 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`
5555
- 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`
5757

5858
⚠️ **NOTE** : When a configuration files is updated on TC AWS S3, make sure to give public access to the file.
5959

@@ -71,7 +71,7 @@ This `micro-frontends-frame` app has 2 types of configs:
7171

7272
## Local Deployment from multi web servers (nodemon & webpack-dev-server) for local development
7373

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`:
7575

7676
| Command | Description |
7777
| -------------------- | ---------------------- |
@@ -86,7 +86,7 @@ To deploy `micro-frontends-frame` app locally run inside the project root `./mic
8686

8787
## Local Deployment from web server (node)
8888

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`:
9090

9191
| Command | Description |
9292
| -------------------- | ---------------------- |
@@ -158,7 +158,7 @@ For adding a child app to the root app make the following steps:
158158
1. Add child app path to importmap. File underpath
159159
- `https://tc-platform-prod.s3.amazonaws.com/micro-frontends/micro-frontends-config-production.json` for production deployment
160160
- `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
162162

163163
React example:
164164

@@ -175,7 +175,7 @@ For adding a child app to the root app make the following steps:
175175
2. Add a route which should show the app. File underpath
176176
- `https://tc-platform-prod.s3.amazonaws.com/micro-frontends/micro-frontends-routes-production.txt` for production deployment
177177
- `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
179179

180180
```html
181181
<route path="<RELATIVE_URL_PATH>">
@@ -185,7 +185,7 @@ For adding a child app to the root app make the following steps:
185185

186186
## Add-hoc child app replacement (import override)
187187

188-
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:
189189

190190
- Load already deployed frame app in the browser.
191191
- 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.
318318
319319
320320
### Checkout 4 repos and apply patches:
321-
- git clone https://github.com/topcoder-platform/micro-frontends-frame.git
322-
- git clone https://github.com/topcoder-platform/micro-frontends-navbar-app.git
321+
- git clone https://github.com/topcoder-platform/mfe-core.git
322+
- git clone https://github.com/topcoder-platform/mfe-header.git
323323
- git clone https://github.com/topcoder-platform/micro-frontends-react-app.git
324324
- git clone https://github.com/topcoder-platform/micro-frontends-angular-app.git
325325
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
344344
(1). root-config:
345345
open Terminal #1
346346
change the current dir to the root-config folder and apply patch:
347-
- cd micro-frontends-frame
348-
- git apply ../micro-frontends-frame.diff --ignore-whitespace --whitespace=nowarn
347+
- cd mfe-core
348+
- git apply ../mfe-core.diff --ignore-whitespace --whitespace=nowarn
349349
install dependencies:
350350
- npm install
351351
build and run the app:
@@ -354,8 +354,8 @@ build and run the app:
354354
(2). navbar-app:
355355
open Terminal #2
356356
change the current dir to the navbar-app folder and apply patch:
357-
- cd micro-frontends-navbar-app
358-
- git apply ../micro-frontends-navbar-app.diff --ignore-whitespace --whitespace=nowarn
357+
- cd mfe-header
358+
- git apply ../mfe-header.diff --ignore-whitespace --whitespace=nowarn
359359
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.
360360
```
361361
URL: {
@@ -412,9 +412,9 @@ The app can be open at the browser url: 'http://localhost:5000' (this page will
412412
413413
### Checkout 4 repos and apply patches:
414414
415-
- git clone https://github.com/topcoder-platform/micro-frontends-frame.git
415+
- git clone https://github.com/topcoder-platform/mfe-core.git
416416
417-
- git clone https://github.com/topcoder-platform/micro-frontends-navbar-app.git
417+
- git clone https://github.com/topcoder-platform/mfe-header.git
418418
419419
- git clone https://github.com/topcoder-platform/micro-frontends-react-app.git
420420
@@ -464,9 +464,9 @@ open Terminal #1
464464
465465
change the current dir to the root-config folder and apply patch:
466466
467-
- cd micro-frontends-frame
467+
- cd mfe-core
468468
469-
- git apply ../micro-frontends-frame.diff --ignore-whitespace --whitespace=nowarn
469+
- git apply ../mfe-core.diff --ignore-whitespace --whitespace=nowarn
470470
471471
install dependencies:
472472
@@ -484,9 +484,9 @@ open Terminal #2
484484
485485
change the current dir to the navbar-app folder and apply patch:
486486
487-
- cd micro-frontends-navbar-app
487+
- cd mfe-header
488488
489-
- git apply ../micro-frontends-navbar-app.diff --ignore-whitespace --whitespace=nowarn
489+
- git apply ../mfe-header.diff --ignore-whitespace --whitespace=nowarn
490490
491491
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.
492492
@@ -588,4 +588,4 @@ change the current dir to the 'auth0-local-login' folder and serve with the inde
588588
589589
- npx http-server . -p 5000
590590
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')

config/micro-frontends-config-local.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"imports": {
3-
"@topcoder/micro-frontends-navbar-app": "http://localhost:3001/navbar/topcoder-micro-frontends-navbar-app.js",
3+
"@topcoder/mfe-header": "http://localhost:3001/navbar/topcoder-mfe-header.js",
44
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder-dev.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
55
"@topcoder/micro-frontends-react-app": "https://platform.topcoder-dev.com/react/topcoder-micro-frontends-react-app.js",
66
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder-dev.com/angular/main.js",
@@ -13,6 +13,6 @@
1313
"@topcoder/micro-frontends-profile-app": "http://localhost:8009/profile-app/topcoder-micro-frontends-profile-app.js",
1414
"@topcoder/micro-frontends-onboarding-app": "http://localhost:8510/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
1515
"@topcoder/micro-frontends-forums-app": "http://localhost:8510/forums-app/topcoder-micro-frontends-forums-app.js",
16-
"@topcoder/micro-frontends-self-service-app": "http://localhost:8519/self-service-app/topcoder-micro-frontends-self-service-app.js"
16+
"@topcoder/mfe-customer-work": "http://localhost:8519/self-service-app/topcoder-mfe-customer-work.js"
1717
}
1818
}

config/micro-frontends-routes-local.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
<application name="@topcoder/micro-frontends-forums-app"></application>
3636
</route>
3737
<route path="self-service">
38-
<application name="@topcoder/micro-frontends-self-service-app"></application>
38+
<application name="@topcoder/mfe-customer-work"></application>
3939
</route>
4040
<route path="unauthorized">
4141
<div style="text-align: center; padding-top: 200px; font-size: 32px;">

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,10 @@ ENV APPENV=$APPENV
1010
ENV SEGMENT_ANALYTICS_KEY=$SEGMENT_ANALYTICS_KEY
1111

1212
# Copy the current directory into the Docker image
13-
COPY . /micro-frontends-frame
13+
COPY . /mfe-core
1414

1515
# Set working directory for future use
16-
WORKDIR /micro-frontends-frame
16+
WORKDIR /mfe-core
1717

1818
# Install the dependencies from package.json
1919
RUN npm install

docker/docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
version: '3'
22
services:
3-
micro-frontends-frame:
4-
image: micro-frontends-frame:latest
3+
mfe-core:
4+
image: mfe-core:latest
55
build:
66
context: ../
77
dockerfile: docker/Dockerfile

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
{
2-
"name": "@topcoder/micro-frontends-frame",
2+
"name": "@topcoder/mfe-core",
33
"scripts": {
44
"start": "node server.js",
55
"build": "webpack --mode=${APPMODE:-development} --env.APPENV=${APPENV:-dev} --env.SEGMENT_ANALYTICS_KEY=${SEGMENT_ANALYTICS_KEY:-NS}",

src/images/favicon.png

814 Bytes
Loading

0 commit comments

Comments
 (0)