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

Commit e154b57

Browse files
Merge pull request #81 from topcoder-platform/PROD-1551_header
PROD-1551 header -> qa
2 parents e3dc3a0 + dab4279 commit e154b57

8 files changed

+161
-4
lines changed

config/constants.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@ module.exports = Object.freeze({
22
APP_CONFIG: [
33
{
44
'appEnv': 'dev',
5-
'mfeConfigPath': 'https://tc-public-static-files.topcoder-dev.com/micro-frontends/micro-frontends-config-development.json',
5+
'mfeConfigPath': '/config/micro-frontends-config-dev.json',
66
'mfeIndexPath': '/index.html',
7-
'mfeRoutesPath': 'https://tc-public-static-files.topcoder-dev.com/micro-frontends/micro-frontends-routes-development.txt'
7+
'mfeRoutesPath': '/config/micro-frontends-routes-dev.txt'
88
},
99
{
1010
'appEnv': 'prod',
11-
'mfeConfigPath': 'https://tc-public-static-files.topcoder.com/micro-frontends/micro-frontends-config-production.json',
11+
'mfeConfigPath': '/config/micro-frontends-config-prod.json',
1212
'mfeIndexPath': '/index.html',
13-
'mfeRoutesPath': 'https://tc-public-static-files.topcoder.com/micro-frontends/micro-frontends-routes-production.txt'
13+
'mfeRoutesPath': '/config/micro-frontends-routes-prod.txt'
1414
},
1515
{
1616
'appEnv': 'local-multi',

config/docs/adr-01.md

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# ADR-01 2022-05-06
2+
3+
4+
5+
We moved the source of the config json and routes txt files to source control
6+
from the S3 server in order to simplify modifications.
7+
8+
There is no sensitive info in these files, so there is no need to host
9+
them any differently in prod or dev envs.
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
{
2+
"imports": {
3+
"@topcoder/mfe-header": "https://platform.topcoder-dev.com/navbar/topcoder-mfe-header.js",
4+
"@topcoder/micro-frontends-react-app": "https://platform.topcoder-dev.com/react/topcoder-micro-frontends-react-app.js",
5+
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder-dev.com/angular/main.js",
6+
"@topcoder/micro-frontends-teams": "https://platform.topcoder-dev.com/taas-app/topcoder-micro-frontends-teams.js",
7+
"@topcoder/micro-frontends-task-marketplace-app": "https://platform.topcoder-dev.com/tasks/topcoder-micro-frontends-task-marketplace-app.js",
8+
"@topcoder/micro-frontends-earn-app": "https://platform.topcoder-dev.com/earn-app/topcoder-micro-frontends-earn-app.js",
9+
"@topcoder/micro-frontends-submission-review-app": "https://platform.topcoder-dev.com/submissionreview/topcoder-micro-frontends-submission-review-app.js",
10+
"@topcoder/micro-frontends-model-app": "https://platform.topcoder-dev.com/model-app/topcoder-micro-frontends-model-app.js",
11+
"@topcoder/micro-frontends-community-admin-app": "https://tc-micro-community-admin.herokuapp.com/community-admin-app/topcoder-micro-frontends-community-admin-app.js",
12+
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder-dev.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
13+
"@topcoder/micro-frontends-profile-app": "https://platform.topcoder-dev.com/profile-app/topcoder-micro-frontends-profile-app.js",
14+
"@topcoder/micro-frontends-onboarding-app": "https://platform.topcoder-dev.com/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
15+
"@topcoder/micro-frontends-forums-app": "https://platform.topcoder-dev.com/forums-app/topcoder-micro-frontends-forums-app.js",
16+
"@topcoder/mfe-customer-work": "https://platform.topcoder-dev.com/self-service-app/topcoder-mfe-customer-work.js"
17+
}
18+
}
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"imports": {
3+
"@topcoder/mfe-header": "https://platform.topcoder.com/navbar/topcoder-mfe-header.js",
4+
"@topcoder/micro-frontends-react-app": "https://platform.topcoder.com/react/topcoder-micro-frontends-react-app.js",
5+
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder.com/angular/main.js",
6+
"@topcoder/micro-frontends-teams": "https://platform.topcoder.com/taas-app/topcoder-micro-frontends-teams.js",
7+
"@topcoder/micro-frontends-task-marketplace-app": "https://platform.topcoder.com/tasks/topcoder-micro-frontends-task-marketplace-app.js",
8+
"@topcoder/micro-frontends-earn-app": "https://platform.topcoder.com/earn-app/topcoder-micro-frontends-earn-app.js",
9+
"@topcoder/micro-frontends-submission-review-app": "https://platform.topcoder.com/submissionreview/topcoder-micro-frontends-submission-review-app.js",
10+
"@topcoder/micro-frontends-model-app": "https://platform.topcoder.com/model-app/topcoder-micro-frontends-model-app.js",
11+
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
12+
"@topcoder/micro-frontends-profile-app": "https://platform.topcoder.com/profile-app/topcoder-micro-frontends-profile-app.js",
13+
"@topcoder/micro-frontends-onboarding-app": "https://platform.topcoder.com/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
14+
"@topcoder/mfe-customer-work": "https://platform.topcoder.com/self-service-app/topcoder-mfe-customer-work.js"
15+
}
16+
}

config/micro-frontends-routes-dev.txt

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
<route path="micro-frontends-react-route">
2+
<application name="@topcoder/micro-frontends-react-app"></application>
3+
</route>
4+
<route path="micro-frontends-angular-route">
5+
<application name="@topcoder/micro-frontends-angular-app"></application>
6+
</route>
7+
<route path="taas">
8+
<application name="@topcoder/micro-frontends-teams"></application>
9+
</route>
10+
<route path="task-marketplace">
11+
<application name="@topcoder/micro-frontends-task-marketplace-app"></application>
12+
</route>
13+
<route path="earn">
14+
<application name="@topcoder/micro-frontends-earn-app"></application>
15+
</route>
16+
<route path="submissionreview">
17+
<application name="@topcoder/micro-frontends-submission-review-app"></application>
18+
</route>
19+
<route path="model">
20+
<application name="@topcoder/micro-frontends-model-app"></application>
21+
</route>
22+
<route path="community-admin">
23+
<application name="@topcoder/micro-frontends-community-admin-app"></application>
24+
</route>
25+
<route path="taas-admin">
26+
<application name="@topcoder/micro-frontends-taas-admin-app"></application>
27+
</route>
28+
<route path="profile">
29+
<application name="@topcoder/micro-frontends-profile-app"></application>
30+
</route>
31+
<route path="onboard">
32+
<application name="@topcoder/micro-frontends-onboarding-app"></application>
33+
</route>
34+
<route path="forums">
35+
<application name="@topcoder/micro-frontends-forums-app"></application>
36+
</route>
37+
<route path="self-service">
38+
<application name="@topcoder/mfe-customer-work"></application>
39+
</route>
40+
<route path="work">
41+
<application name="@topcoder/mfe-customer-work"></application>
42+
</route>
43+
<route path="account">
44+
<application name="@topcoder/mfe-customer-work"></application>
45+
</route>
46+
<route path="unauthorized">
47+
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
48+
You are unauthorized
49+
</div>
50+
</route>
51+
<route default>
52+
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
53+
Welcome to the Topcoder Platform. Get started by opening an app in the tool switcher on top right corner.
54+
</div>
55+
</route>

config/micro-frontends-routes-local.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,12 @@
3737
<route path="self-service">
3838
<application name="@topcoder/mfe-customer-work"></application>
3939
</route>
40+
<route path="work">
41+
<application name="@topcoder/mfe-customer-work"></application>
42+
</route>
43+
<route path="account">
44+
<application name="@topcoder/mfe-customer-work"></application>
45+
</route>
4046
<route path="unauthorized">
4147
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
4248
You are unauthorized
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
<route path="micro-frontends-react-route">
2+
<application name="@topcoder/micro-frontends-react-app"></application>
3+
</route>
4+
<route path="micro-frontends-angular-route">
5+
<application name="@topcoder/micro-frontends-angular-app"></application>
6+
</route>
7+
<route path="taas">
8+
<application name="@topcoder/micro-frontends-teams"></application>
9+
</route>
10+
<route path="task-marketplace">
11+
<application name="@topcoder/micro-frontends-task-marketplace-app"></application>
12+
</route>
13+
<route path="earn">
14+
<application name="@topcoder/micro-frontends-earn-app"></application>
15+
</route>
16+
<route path="submissionreview">
17+
<application name="@topcoder/micro-frontends-submission-review-app"></application>
18+
</route>
19+
<route path="model">
20+
<application name="@topcoder/micro-frontends-model-app"></application>
21+
</route>
22+
<route path="taas-admin">
23+
<application name="@topcoder/micro-frontends-taas-admin-app"></application>
24+
</route>
25+
<route path="profile">
26+
<application name="@topcoder/micro-frontends-profile-app"></application>
27+
</route>
28+
<route path="onboard">
29+
<application name="@topcoder/micro-frontends-onboarding-app"></application>
30+
</route>
31+
<route path="self-service">
32+
<application name="@topcoder/mfe-customer-work"></application>
33+
</route>
34+
<route path="work">
35+
<application name="@topcoder/mfe-customer-work"></application>
36+
</route>
37+
<route path="account">
38+
<application name="@topcoder/mfe-customer-work"></application>
39+
</route>
40+
<route path="unauthorized">
41+
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
42+
You are unauthorized
43+
</div>
44+
</route>
45+
<route default>
46+
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
47+
Welcome to the Topcoder Platform. Get started by opening an app in the tool switcher on top right corner.
48+
</div>
49+
</route>

webpack.config.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,10 @@ module.exports = (webpackConfigEnv) => {
4848
from: "src/images",
4949
to: "./",
5050
},
51+
{
52+
from: `config/*${webpackConfigEnv.APPENV}.*`,
53+
to: "./",
54+
},
5155
],
5256
}),
5357
],

0 commit comments

Comments
 (0)