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

Gigs Listing Integration Done #123

Merged
merged 34 commits into from
Jun 23, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
7e09cf8
ouput from challenge:30188190
Jun 12, 2021
ce1d329
Merge branch 'aggregator-api' into aggregator-api-integration
Jun 12, 2021
343f0f4
ci:deploying to dev
Jun 14, 2021
f52b2f3
fix: fixing route for api
sushilshinde Jun 14, 2021
f00941c
fix: fxing api route
sushilshinde Jun 14, 2021
6f90f67
ci:deploying agg API
Jun 14, 2021
a11194e
output from challenge:30189040
Jun 14, 2021
9870620
ci:deploying mygigs-part2
Jun 14, 2021
ea28c30
ci:redeploying
Jun 14, 2021
431809d
profile code baseline
Jun 16, 2021
ec78ebd
output from task part1
Jun 18, 2021
a2a5425
refine the profile API
Jun 19, 2021
e74c7c3
job integration done
Jun 19, 2021
c3726a0
integration done
Jun 19, 2021
a48f1db
ci:deploying integration code
Jun 19, 2021
16bfba9
ci:fixing Profile API
Jun 21, 2021
51045d6
ci:disable profile update
Jun 21, 2021
ad27f84
fix:110,111,112
Jun 21, 2021
92a9dc8
fix:111
Jun 21, 2021
7790728
fix:109
Jun 21, 2021
d5f6779
ci:fix 115
Jun 21, 2021
844aeb1
ci:continue fix109
Jun 21, 2021
12362c2
ci:hide show more conditionally
Jun 22, 2021
88cc0a4
ci:fixing profile API
Jun 22, 2021
ca744e3
remove useless data
Jun 22, 2021
9b46724
ci:remove phases
Jun 22, 2021
d81553d
merge dev into integration
Jun 23, 2021
a1f5161
resotre
Jun 23, 2021
976ae81
fix empty label
Jun 23, 2021
a3850e3
Merge pull request #117 from topcoder-platform/integration
LieutenantRoger Jun 23, 2021
73732cc
sub community list
Jun 23, 2021
c3495a7
Merge pull request #119 from topcoder-platform/integration
LieutenantRoger Jun 23, 2021
b2c8978
revert sub community check
Jun 23, 2021
de32b60
Merge pull request #121 from topcoder-platform/integration
LieutenantRoger Jun 23, 2021
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
5 changes: 4 additions & 1 deletion .eslintrc
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
{
"extends": ["react-important-stuff", "plugin:prettier/recommended"],
"parser": "babel-eslint"
"parser": "babel-eslint",
"env": {
"node": true
}
}
3 changes: 3 additions & 0 deletions .prettierrc
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"singleQuote": false
}
42 changes: 30 additions & 12 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,18 +13,19 @@ This is a [single-spa](https://single-spa.js.org/) example React microapp.

## NPM Commands

Command | Description
--------------------- | -----------------------------------------------------------------
`npm start` | Run server which serves production ready build from `dist` folder
`npm run dev` | Run app in the development mode
`npm run dev-https` | Run app in the development mode using HTTPS protocol
`npm run build` | Build app for production and puts files to the `dist` folder
`npm run analyze` | Analyze dependencies sizes and opens report in the browser
`npm run lint` | Check code for lint errors
`npm run format` | Format code using prettier
`npm run test` | Run unit tests
`npm run watch-tests` | Watch for file changes and run unit tests on changes
`npm run coverage` | Generate test code coverage report
| Command | Description |
| --------------------- | ----------------------------------------------------------------- |
| `npm start` | Run server which serves production ready build from `dist` folder |
| `npm run dev` | Run app in the development mode |
| `npm run dev-https` | Run app in the development mode using HTTPS protocol |
| `npm run build` | Build app for production and puts files to the `dist` folder |
| `npm run analyze` | Analyze dependencies sizes and opens report in the browser |
| `npm run lint` | Check code for lint errors |
| `npm run format` | Format code using prettier |
| `npm run test` | Run unit tests |
| `npm run watch-tests` | Watch for file changes and run unit tests on changes |
| `npm run coverage` | Generate test code coverage report |
| `npm run mock-api` | Start the mock api which mocks Recruit api |

## Local Deployment

Expand Down Expand Up @@ -58,3 +59,20 @@ Make sure you have [Heroky CLI](https://devcenter.heroku.com/articles/heroku-cli

- Now you have to configure frame app to use the URL provided by Heroku like `https://<APP-NAME>.herokuapp.com/earn-app/topcoder-micro-frontends-earn-app.js` to load this microapp.

### Aggregator API

Please refer to [Swagger Doc](./src/api/docs/swagger.yaml) for Aggregator API endpoints

#### Aggregator API Configuration

In the `micro-frontends-earn-app` root directory create `.env` file with the next environment variables.

```bash
# Auth0 config
AUTH_SECRET=
AUTH0_URL=
AUTH0_AUDIENCE=
AUTH0_CLIENT_ID=
AUTH0_CLIENT_SECRET=
```
Once the earn app is started, the aggregator api will work as well
42 changes: 42 additions & 0 deletions config/default.js
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
require("dotenv").config();
module.exports = {
GUIKIT: {
DEBOUNCE_ON_CHANGE_TIME: 150,
Expand All @@ -9,5 +10,46 @@ module.exports = {
URL: {
BASE: "https://www.topcoder-dev.com",
COMMUNITY_APP: "https://community-app.topcoder-dev.com",
PLATFORM_WEBSITE_URL: "https://platform.topcoder-dev.com",
},
RECRUIT_API: process.env.RECRUIT_API || "https://www.topcoder-dev.com",
// the server api base path
API_BASE_PATH: process.env.API_BASE_PATH || "/earn-app/api/my-gigs",
// the log level, default is 'debug'
LOG_LEVEL: process.env.LOG_LEVEL || "debug",
// The authorization secret used during token verification.
AUTH_SECRET:
process.env.AUTH_SECRET ||
"UgL4(SEAM*~yc7L~vWrKKN&GHrwyc9N[@nVxm,X?#b4}7:xbzM",
// The valid issuer of tokens, a json array contains valid issuer.
VALID_ISSUERS:
process.env.VALID_ISSUERS ||
'["https://api.topcoder-dev.com", "https://api.topcoder.com", "https://topcoder-dev.auth0.com/", "https://auth.topcoder-dev.com/"]',
// Auth0 URL, used to get TC M2M token
AUTH0_URL:
process.env.AUTH0_URL || "https://topcoder-dev.auth0.com/oauth/token",
// Auth0 audience, used to get TC M2M token
AUTH0_AUDIENCE: process.env.AUTH0_AUDIENCE || "https://m2m.topcoder-dev.com/",
// Auth0 client id, used to get TC M2M token
AUTH0_CLIENT_ID:
process.env.AUTH0_CLIENT_ID || "gZ6jt50HYHLBf4vhxjUhXPZOR7Q5lk4k",
// Auth0 client secret, used to get TC M2M token
AUTH0_CLIENT_SECRET:
process.env.AUTH0_CLIENT_SECRET ||
"zb-OV1Rl3QpUkt4BexJ-Rs58jYMazCre1_97aU4PJIvQdVB-DmQIs61W3gCfPyP4",
// Proxy Auth0 URL, used to get TC M2M token
AUTH0_PROXY_SERVER_URL: process.env.AUTH0_PROXY_SERVER_URL,
m2m: {
M2M_AUDIT_USER_ID:
process.env.M2M_AUDIT_USER_ID || "00000000-0000-0000-0000-000000000000",
M2M_AUDIT_HANDLE: process.env.M2M_AUDIT_HANDLE || "TopcoderService",
},
MOCK_API_PORT: process.env.MOCK_API_PORT || 4000,
ALLOWED_FILE_TYPES: process.env.ALLOWED_FILE_TYPES || [
"pdf",
"doc",
"docx",
"txt",
],
MAX_ALLOWED_FILE_SIZE_MB: process.env.MAX_ALLOWED_FILE_SIZE_MB || 10,
};
1 change: 1 addition & 0 deletions config/development.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ module.exports = {
URL: {
BASE: "https://www.topcoder-dev.com",
COMMUNITY_APP: "https://community-app.topcoder-dev.com",
PLATFORM_WEBSITE_URL: "https://platform.topcoder-dev.com",
},
};
1 change: 1 addition & 0 deletions config/production.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,5 +9,6 @@ module.exports = {
URL: {
BASE: "https://www.topcoder.com",
COMMUNITY_APP: "https://community-app.topcoder.com",
PLATFORM_WEBSITE_URL: "https://platform.topcoder.com",
},
};
1 change: 1 addition & 0 deletions jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ module.exports = {
transform: {
"^.+\\.(j|t)sx?$": "babel-jest",
},
transformIgnorePatterns: ["node_modules/?!(react-dropzone)"],
moduleNameMapper: {
"\\.(css|scss)$": "identity-obj-proxy",
"\\.(png|eot|otf|ttf|woff|woff2|svg)$": "<rootDir>/__mocks__/fileMock.js",
Expand Down
Loading