Skip to content

Commit 305c075

Browse files
Merge pull request #235 from topcoder-platform/dev-center
PROD-2309 Dev Center -> dev
2 parents df70dab + a057dc0 commit 305c075

File tree

203 files changed

+3957
-418
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

203 files changed

+3957
-418
lines changed

.circleci/config.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ build_configuration_fetch: &build_configuration_fetch
6363
command: |
6464
./awsconfiguration.sh $DEPLOY_ENV
6565
./buildenv.sh -e $DEPLOY_ENV -b ${LOGICAL_ENV}-${APPNAME}-buildvar
66+
aws s3 cp s3://tc-platform-${LOGICAL_ENV}/securitymanager/${LOGICAL_ENV}-platform-ui.env ./.env
6667
6768
lint_steps: &lint_steps
6869
# Initialization.

.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,12 @@
1717
.env.development.local
1818
.env.test.local
1919
.env.production.local
20+
.env
2021

2122
npm-debug.log*
2223
yarn-debug.log*
2324
yarn-error.log*
25+
26+
# Editors
27+
.editorconfig
28+
.prettierrc

README.md

Lines changed: 34 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ Pre-existing user interfaces will be ported to here over time until this is the
1111

1212
- [Local Environment Setup](#local-environment-setup)
1313
- [Deployments](#deployments)
14+
- [Developer Center specific setup](#developer-center-specific-setup)
1415
- [Yarn Commands](#yarn-commands)
1516

1617
# Application structure
@@ -119,6 +120,37 @@ The "dev" branch is auto-deployed to the dev environment: https://platform-mvp.t
119120

120121
The "master" branch is auto-deployed to the production environment: https://platform-mvp.topcoder.com.
121122

123+
## Developer Center specific setup
124+
125+
### Contentful API Key and Space Id
126+
127+
The app requires two environment variables, which contain the space id and the key used to access contentful and retrieve Thrive Articles.
128+
129+
You should create a file named `.env` in the root folder, and write inside the following lines:
130+
131+
```sh
132+
REACT_APP_CONTENTFUL_EDU_SPACE_ID=<space-id>
133+
REACT_APP_CONTENTFUL_EDU_CDN_API_KEY=<API Key>
134+
```
135+
136+
We should use the same space ID and API Key as Topcoder Thrive, these are for fetching Thrive articles and videos in the landing page.
137+
138+
### Landing page configuration
139+
140+
We can configure up to 5 articles shown on the landing page. The articles can be from Topcoder Thrive and/or Topcoder Blog.
141+
142+
The configuration file is located at `src-ts/tools/dev-center/dev-center-pages/community-app/landing-page/dev-center-articles-section/articles.config.ts`.
143+
144+
We can configure the image carousel on the landing page, the configuration file is located at `src-ts/tools/dev-center/dev-center-pages/community-app/landing-page/dev-center-header/carousel-content.config.ts`.
145+
146+
The local images for the carousel should be put in `src-ts/tools/dev-center/carousel-images`.
147+
148+
### Getting Started page configuration.
149+
150+
The content of the getting started page is from a Markdown text, the source is located at `src-ts/tools/dev-center/dev-center-pages/community-app/getting-started/GettingStartedGuide.md`.
151+
152+
The local images for the markdown should be put in `src-ts/tools/dev-center/images`.
153+
122154
## yarn Commands
123155

124156
| Command | Description |
@@ -465,8 +497,8 @@ e.g.:
465497
```
466498
.logo-link {
467499
svg {
468-
width: calc($pad-xxl + $pad-xxxxl);
469-
height: $pad-xl;
500+
width: calc($space-xxl + $space-xxxxl);
501+
height: $space-xl;
470502
fill: none;
471503

472504
path {

package.json

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,21 @@
1818
"dependencies": {
1919
"@datadog/browser-logs": "^4.7.1",
2020
"@heroicons/react": "^1.0.6",
21+
"@types/dompurify": "^2.3.3",
22+
"@types/highlightjs": "^9.12.2",
23+
"@types/marked": "4.0.3",
2124
"apexcharts": "^3.35.3",
2225
"axios": "^0.26.1",
2326
"browser-cookies": "^1.2.0",
2427
"classnames": "^2.3.1",
28+
"contentful": "^9.1.33",
2529
"crypto-js": "^4.1.1",
30+
"dompurify": "^2.3.10",
31+
"highlight.js": "^11.6.0",
2632
"customize-cra": "^1.0.0",
2733
"html2canvas": "^1.4.1",
2834
"lodash": "^4.17.21",
35+
"marked": "4.0.3",
2936
"moment": "^2.29.3",
3037
"moment-timezone": "^0.5.34",
3138
"prop-types": "^15.8.1",

src-ts/config/environments/environment.default.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,9 +32,13 @@ export const EnvironmentConfigDefault: GlobalConfig = {
3232
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg',
3333
},
3434
TOPCODER_URLS: {
35+
API_BASE: `${COMMUNITY_WEBSITE}/api`,
36+
BLOG_PAGE: `${COMMUNITY_WEBSITE}/blog`,
3537
CHALLENGES_PAGE: `${COMMUNITY_WEBSITE}/challenges`,
3638
GIGS_PAGE: `${COMMUNITY_WEBSITE}/gigs`,
39+
THRIVE_PAGE: `${COMMUNITY_WEBSITE}/thrive`,
3740
USER_PROFILE: `${COMMUNITY_WEBSITE}/members`,
41+
WP_CONTENT: `${COMMUNITY_WEBSITE}/wp-content`,
3842
},
3943
URL: {
4044
ACCOUNTS_APP_CONNECTOR: 'https://accounts-auth0.topcoder-dev.com',

src-ts/config/environments/environment.prod.config.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,9 +30,13 @@ export const EnvironmentConfigProd: GlobalConfig = {
3030
'eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJyb2xlcyI6WyJUb3Bjb2RlciBVc2VyIl0sImlzcyI6Imh0dHBzOi8vYXBpLnRvcGNvZGVyLWRldi5jb20iLCJoYW5kbGUiOiJ0ZXN0MSIsImV4cCI6MjU2MzA3NjY4OSwidXNlcklkIjoiNDAwNTEzMzMiLCJpYXQiOjE0NjMwNzYwODksImVtYWlsIjoidGVzdEB0b3Bjb2Rlci5jb20iLCJqdGkiOiJiMzNiNzdjZC1iNTJlLTQwZmUtODM3ZS1iZWI4ZTBhZTZhNGEifQ.jl6Lp_friVNwEP8nfsfmL-vrQFzOFp2IfM_HC7AwGcg',
3131
},
3232
TOPCODER_URLS: {
33+
API_BASE: `${COMMUNITY_WEBSITE}/api`,
34+
BLOG_PAGE: `${COMMUNITY_WEBSITE}/blog`,
3335
CHALLENGES_PAGE: `${COMMUNITY_WEBSITE}/challenges`,
3436
GIGS_PAGE: `${COMMUNITY_WEBSITE}/gigs`,
37+
THRIVE_PAGE: `${COMMUNITY_WEBSITE}/thrive`,
3538
USER_PROFILE: `${COMMUNITY_WEBSITE}/members`,
39+
WP_CONTENT: `${COMMUNITY_WEBSITE}/wp-content`,
3640
},
3741
URL: {
3842
ACCOUNTS_APP_CONNECTOR: 'https://accounts-auth0.topcoder.com',

src-ts/declarations.d.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,3 +22,8 @@ declare module '*.svg' {
2222
}
2323

2424
declare module 'tc-auth-lib'
25+
26+
declare module '*.md' {
27+
const value: string
28+
export default value
29+
}

src-ts/header/logo/Logo.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@
99
}
1010

1111
svg {
12-
width: calc($pad-xxl + $pad-xxxxl);
13-
height: $pad-xl;
12+
width: calc($space-xxl + $space-xxxxl);
13+
height: $space-xl;
1414
fill: none;
1515

1616
path {

src-ts/header/tool-selectors/tool-selectors-narrow/ToolSelectorsNarrow.module.scss

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,9 +23,9 @@
2323
left: 0;
2424
bottom: 0;
2525
height: $content-height;
26-
width: calc(100% - calc(2 * $pad-xxl));
26+
width: calc(100% - calc(2 * $space-xxl));
2727
z-index: 100;
2828
background-color: $black-100;
29-
padding: $pad-xxl;
29+
padding: $space-xxl;
3030
}
3131
}

src-ts/header/tool-selectors/tool-selectors-narrow/tool-selector-narrow/ToolSelectorNarrow.module.scss

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@
1111
justify-content: space-between;
1212
align-items: center;
1313
border-top: 1px solid $black-60;
14-
padding: $pad-lg 0;
14+
padding: $space-lg 0;
1515
color: $tc-white;
1616
font-weight: $font-weight-medium;
1717
background-color: $black-100;

0 commit comments

Comments
 (0)