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

PROD-1551 header -> qa #81

Merged
merged 11 commits into from
May 24, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/constants.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,15 @@ module.exports = Object.freeze({
APP_CONFIG: [
{
'appEnv': 'dev',
'mfeConfigPath': 'https://tc-public-static-files.topcoder-dev.com/micro-frontends/micro-frontends-config-development.json',
'mfeConfigPath': '/config/micro-frontends-config-dev.json',
'mfeIndexPath': '/index.html',
'mfeRoutesPath': 'https://tc-public-static-files.topcoder-dev.com/micro-frontends/micro-frontends-routes-development.txt'
'mfeRoutesPath': '/config/micro-frontends-routes-dev.txt'
},
{
'appEnv': 'prod',
'mfeConfigPath': 'https://tc-public-static-files.topcoder.com/micro-frontends/micro-frontends-config-production.json',
'mfeConfigPath': '/config/micro-frontends-config-prod.json',
'mfeIndexPath': '/index.html',
'mfeRoutesPath': 'https://tc-public-static-files.topcoder.com/micro-frontends/micro-frontends-routes-production.txt'
'mfeRoutesPath': '/config/micro-frontends-routes-prod.txt'
},
{
'appEnv': 'local-multi',
Expand Down
9 changes: 9 additions & 0 deletions config/docs/adr-01.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# ADR-01 2022-05-06

- by [email protected] and [email protected]

We moved the source of the config json and routes txt files to source control
from the S3 server in order to simplify modifications.

There is no sensitive info in these files, so there is no need to host
them any differently in prod or dev envs.
18 changes: 18 additions & 0 deletions config/micro-frontends-config-dev.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
"imports": {
"@topcoder/mfe-header": "https://platform.topcoder-dev.com/navbar/topcoder-mfe-header.js",
"@topcoder/micro-frontends-react-app": "https://platform.topcoder-dev.com/react/topcoder-micro-frontends-react-app.js",
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder-dev.com/angular/main.js",
"@topcoder/micro-frontends-teams": "https://platform.topcoder-dev.com/taas-app/topcoder-micro-frontends-teams.js",
"@topcoder/micro-frontends-task-marketplace-app": "https://platform.topcoder-dev.com/tasks/topcoder-micro-frontends-task-marketplace-app.js",
"@topcoder/micro-frontends-earn-app": "https://platform.topcoder-dev.com/earn-app/topcoder-micro-frontends-earn-app.js",
"@topcoder/micro-frontends-submission-review-app": "https://platform.topcoder-dev.com/submissionreview/topcoder-micro-frontends-submission-review-app.js",
"@topcoder/micro-frontends-model-app": "https://platform.topcoder-dev.com/model-app/topcoder-micro-frontends-model-app.js",
"@topcoder/micro-frontends-community-admin-app": "https://tc-micro-community-admin.herokuapp.com/community-admin-app/topcoder-micro-frontends-community-admin-app.js",
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder-dev.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
"@topcoder/micro-frontends-profile-app": "https://platform.topcoder-dev.com/profile-app/topcoder-micro-frontends-profile-app.js",
"@topcoder/micro-frontends-onboarding-app": "https://platform.topcoder-dev.com/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
"@topcoder/micro-frontends-forums-app": "https://platform.topcoder-dev.com/forums-app/topcoder-micro-frontends-forums-app.js",
"@topcoder/mfe-customer-work": "https://platform.topcoder-dev.com/self-service-app/topcoder-mfe-customer-work.js"
}
}
16 changes: 16 additions & 0 deletions config/micro-frontends-config-prod.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
{
"imports": {
"@topcoder/mfe-header": "https://platform.topcoder.com/navbar/topcoder-mfe-header.js",
"@topcoder/micro-frontends-react-app": "https://platform.topcoder.com/react/topcoder-micro-frontends-react-app.js",
"@topcoder/micro-frontends-angular-app": "https://platform.topcoder.com/angular/main.js",
"@topcoder/micro-frontends-teams": "https://platform.topcoder.com/taas-app/topcoder-micro-frontends-teams.js",
"@topcoder/micro-frontends-task-marketplace-app": "https://platform.topcoder.com/tasks/topcoder-micro-frontends-task-marketplace-app.js",
"@topcoder/micro-frontends-earn-app": "https://platform.topcoder.com/earn-app/topcoder-micro-frontends-earn-app.js",
"@topcoder/micro-frontends-submission-review-app": "https://platform.topcoder.com/submissionreview/topcoder-micro-frontends-submission-review-app.js",
"@topcoder/micro-frontends-model-app": "https://platform.topcoder.com/model-app/topcoder-micro-frontends-model-app.js",
"@topcoder/micro-frontends-taas-admin-app": "https://platform.topcoder.com/taas-admin-app/topcoder-micro-frontends-taas-admin-app.js",
"@topcoder/micro-frontends-profile-app": "https://platform.topcoder.com/profile-app/topcoder-micro-frontends-profile-app.js",
"@topcoder/micro-frontends-onboarding-app": "https://platform.topcoder.com/onboarding-app/topcoder-micro-frontends-onboarding-app.js",
"@topcoder/mfe-customer-work": "https://platform.topcoder.com/self-service-app/topcoder-mfe-customer-work.js"
}
}
55 changes: 55 additions & 0 deletions config/micro-frontends-routes-dev.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
<route path="micro-frontends-react-route">
<application name="@topcoder/micro-frontends-react-app"></application>
</route>
<route path="micro-frontends-angular-route">
<application name="@topcoder/micro-frontends-angular-app"></application>
</route>
<route path="taas">
<application name="@topcoder/micro-frontends-teams"></application>
</route>
<route path="task-marketplace">
<application name="@topcoder/micro-frontends-task-marketplace-app"></application>
</route>
<route path="earn">
<application name="@topcoder/micro-frontends-earn-app"></application>
</route>
<route path="submissionreview">
<application name="@topcoder/micro-frontends-submission-review-app"></application>
</route>
<route path="model">
<application name="@topcoder/micro-frontends-model-app"></application>
</route>
<route path="community-admin">
<application name="@topcoder/micro-frontends-community-admin-app"></application>
</route>
<route path="taas-admin">
<application name="@topcoder/micro-frontends-taas-admin-app"></application>
</route>
<route path="profile">
<application name="@topcoder/micro-frontends-profile-app"></application>
</route>
<route path="onboard">
<application name="@topcoder/micro-frontends-onboarding-app"></application>
</route>
<route path="forums">
<application name="@topcoder/micro-frontends-forums-app"></application>
</route>
<route path="self-service">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="work">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="account">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="unauthorized">
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
You are unauthorized
</div>
</route>
<route default>
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
Welcome to the Topcoder Platform. Get started by opening an app in the tool switcher on top right corner.
</div>
</route>
6 changes: 6 additions & 0 deletions config/micro-frontends-routes-local.txt
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,12 @@
<route path="self-service">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="work">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="account">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="unauthorized">
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
You are unauthorized
Expand Down
49 changes: 49 additions & 0 deletions config/micro-frontends-routes-prod.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
<route path="micro-frontends-react-route">
<application name="@topcoder/micro-frontends-react-app"></application>
</route>
<route path="micro-frontends-angular-route">
<application name="@topcoder/micro-frontends-angular-app"></application>
</route>
<route path="taas">
<application name="@topcoder/micro-frontends-teams"></application>
</route>
<route path="task-marketplace">
<application name="@topcoder/micro-frontends-task-marketplace-app"></application>
</route>
<route path="earn">
<application name="@topcoder/micro-frontends-earn-app"></application>
</route>
<route path="submissionreview">
<application name="@topcoder/micro-frontends-submission-review-app"></application>
</route>
<route path="model">
<application name="@topcoder/micro-frontends-model-app"></application>
</route>
<route path="taas-admin">
<application name="@topcoder/micro-frontends-taas-admin-app"></application>
</route>
<route path="profile">
<application name="@topcoder/micro-frontends-profile-app"></application>
</route>
<route path="onboard">
<application name="@topcoder/micro-frontends-onboarding-app"></application>
</route>
<route path="self-service">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="work">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="account">
<application name="@topcoder/mfe-customer-work"></application>
</route>
<route path="unauthorized">
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
You are unauthorized
</div>
</route>
<route default>
<div style="text-align: center; padding-top: 200px; font-size: 32px;">
Welcome to the Topcoder Platform. Get started by opening an app in the tool switcher on top right corner.
</div>
</route>
4 changes: 4 additions & 0 deletions webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,10 @@ module.exports = (webpackConfigEnv) => {
from: "src/images",
to: "./",
},
{
from: `config/*${webpackConfigEnv.APPENV}.*`,
to: "./",
},
],
}),
],
Expand Down