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
Copy file name to clipboardExpand all lines: README.md
+23-32Lines changed: 23 additions & 32 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,16 +2,15 @@
2
2
3
3
The Platform UI is the official Topcoder web app to host all modern user interfaces to be used by all users.
4
4
5
-
All future user interfaces at Topcoder will be implemented here.
6
-
Pre-existing user interfaces will be ported to here over time until this is the only user interface any user sees when interacting with Topcoder.
5
+
All future user interfaces at Topcoder will be implemented here. Pre-existing user interfaces will be ported to here over time until this is the only user interface any user sees when interacting with Topcoder.
7
6
8
7
>**NOTE:** The information in this file describes our coding standards and best practices. All new code should follow these guidelines both when coding new features as well as porting old features. Please take the time to read through this file in detail.
-[Developer Center specific setup](#developer-center-specific-setup)
13
+
-[Developer Center specific setup](#developer-center-contentful-api-key-and-space-id)
15
14
-[Yarn Commands](#yarn-commands)
16
15
17
16
# Application structure
@@ -82,29 +81,37 @@ You will need to add the following line to your hosts file. The hosts file is no
82
81
83
82
>% yarn start
84
83
85
-
3. Go to https://local.topcoder-dev.com:3003/
84
+
3. Go to https://local.topcoder-dev.com:3000
85
+
86
+
>**NOTE**: The default port is 3000, but you can override it in your [personal config](#personal-config).
86
87
87
88
### Local SSL
88
89
89
90
SSL is required for authentication to work properly.
90
91
91
-
The `yarn start` command serves the site using the cert and key in the /ssl directory.
92
+
The `yarn start` command serves the site using the cert and key in the /ssl directory, which authorize the `https://local.topcoder-dev.com`URL.
93
+
94
+
By overriding the app to use <b>port 443</b>, you can use the authorized URL and trust the root CA to avoid SSL errors in the browser.
95
+
96
+
>**NOTE:** Mac users will require running the app with elevated permissions in order to use a port lower than 500.
92
97
93
-
For easier development, it is recommended that you add this certificate to your trusted root authorities and as a trused cert in your browser. Google your browser and OS for more info.
98
+
For easier development, it is recommended that you add this certificate to your trusted root authorities and as a trused cert in your browser. Google your browser and OS for more info on how to trust cert authorities.
94
99
95
100
Otherwise, you will need to override the exception each time you load the site. Firefox users may need to user an incognito browser in order to override the exception.
96
101
97
102
### Personal Config
98
103
99
-
1. Add [hostname] to src-ts/config/environments/app-host-environment.enum.ts
100
-
2. Copy an existing config from src-ts/config/environments/environment.*.config.ts
101
-
3. Rename new config environment.[hostname].config.ts
102
-
4. Rename config variable to EnvironmentConfig[HostName]
103
-
5. Set the ENV variable to AppHostEnvironment.[hostname]
104
-
6. Add the switch case for the host name to src-ts/config/environments/environment.config.ts
104
+
1. Add [hostname] to [`/src-ts/config/environments/app-host-environment.type.ts`](/src-ts/config/environments/app-host-environment.type.ts)
105
+
2. Copy an existing config from [`/src-ts/config/environments/environment.*.config.ts`](/src-ts/config/environments/environment.bsouza.config.ts)
106
+
3. Rename new config `environment.[hostname].config.ts`
107
+
4. Rename config variable to `EnvironmentConfig[HostName]`
108
+
5. Set the `ENV` variable to `[hostname]`
109
+
6. Add the switch case for the host name to [`/src-ts/config/environments/environment.config.ts`](/src-ts/config/environments/environment.config.ts)
105
110
7. Prior to starting the server, set your host name:
106
111
```% export REACT_APP_HOST_ENV=[hostname]```
107
112
113
+
>**NOTE:** Individual tools (e.g. [Learn tool](/src-ts/tools/learn/README.md)) can have their own configuration, which can be configured the same way as the global config.
114
+
108
115
#### For further convenience
109
116
110
117
1. Copy start-ssl-*.sh
@@ -118,11 +125,9 @@ The app uses CircleCI for CI/CD.
118
125
119
126
The "dev" branch is auto-deployed to the dev environment: https://platform-mvp.topcoder-dev.com.
120
127
121
-
The "master" branch is auto-deployed to the production environment: https://platform-mvp.topcoder.com.
122
-
123
-
## Developer Center specific setup
128
+
The "master" branch is auto-deployed to the production environment: https://platform-ui.topcoder.com.
124
129
125
-
###Contentful API Key and Space Id
130
+
##Developer Center Contentful API Key and Space Id
126
131
127
132
The app requires two environment variables, which contain the space id and the key used to access contentful and retrieve Thrive Articles.
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
142
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`.
143
+
See the [Dev Center README](/src-ts/tools/dev-center/README.md) for further instructions on setting up the Dev Center.
153
144
154
145
## yarn Commands
155
146
@@ -279,7 +270,7 @@ The PlatformRoute model has several useful options:
279
270
|`element: JSX.Element`| The element property is the JSX element that should appear at the specified URL. |
280
271
|`disabled?: boolean`| When a route is marked as disabled, it will not be registered and will the URL will return a 404. |
281
272
|`hide?: boolean`| When a route is hidden, it will be registered and the URL will be available through deep-linking but will not be visible in either the Tools or Utils Selectors. This is useful for handling redirects for obsolete routes. |
282
-
|`requireAuth?: boolean`| Requiring authentication for a route means that users who are not logged in will be redirected to the Login Form when they try to access the route. |
273
+
|`authRequired?: boolean`| Requiring authentication for a route means that users who are not logged in will be redirected to the Login Form when they try to access the route. |
283
274
|`route: string`| The route property is the path to the route, relative to its parent(s). |
284
275
|`title: string`| The title property is the text that will appear in the Tools or Utils Selectors (this is irrelevant on hidden routes). |
0 commit comments