Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update main-stbr #2335

Merged
merged 143 commits into from
Nov 23, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
143 commits
Select commit Hold shift + click to select a range
86855d4
fix(DTFS2-6681): extract reset password payload in portal-api (#2045)
lmarrai-sw Sep 8, 2023
3bf5c59
feat(DTFS2-6556): rename bank (#2046)
abhi-markan Sep 8, 2023
560bd3e
fix(docs): markdown syntax error
Sep 13, 2023
a574c08
Revert "fix(docs): markdown syntax error"
Sep 13, 2023
cae7cd5
feat(docs): Documentation update (#2049)
abhi-markan Sep 13, 2023
a948071
fix(ukefid): UKEF ID validation (#2054)
abhi-markan Sep 13, 2023
a8b30f8
chore(main): release 1.0.0 (#1992)
github-actions[bot] Sep 13, 2023
2cd09a3
feat(DTFS2-6623): allow read only role assignment in portal UI (#1968)
lmarrai-sw Sep 8, 2023
65248cf
chore(DTFS2-6508): run PR linting and testing on 6508 branch
lmarrai-sw Sep 8, 2023
4f7d265
fix(DTFS2-6508): correct branch name in GH actions
lmarrai-sw Sep 8, 2023
c3a8008
feat(DTFS2-6626): add read only role to portal api (#1971)
lmarrai-sw Sep 11, 2023
c31138c
feat(DTFS2-6626): replace ukef_operations with updated admin permissi…
lmarrai-sw Sep 13, 2023
4e79958
feat(DTFS2-6625): add read-only limitation on Portal UI routes (#1980)
oscar-richardson-softwire Sep 13, 2023
8563e2d
feat(DTFS2-6647): forbid read only users from having another role (#2…
lmarrai-sw Sep 14, 2023
3463cc3
feat(DTFS2-6624): portal UI add read only limitation on UI elements (…
AlexBramhill Sep 15, 2023
8b7e058
feat(DTFS2-6637): remove unused roles from portal api (#2050)
lmarrai-sw Sep 18, 2023
f27334a
feat(DTFS2-6627): gef UI add read only limitation on routes (#2056)
AlexBramhill Sep 19, 2023
1db44fa
feat(DTFS2-6628): add read only limitation on UI elements in gef-ui (…
lmarrai-sw Sep 19, 2023
8150f91
feat(DTFS2-6508): update feedback access (#2059)
AlexBramhill Sep 19, 2023
756f875
fix(DTFS2-6694): remove shared user token in gef-ui api calls
lmarrai-sw Sep 19, 2023
400c0a4
feat(DTFS2-6635): remove unused roles from portal, gef-ui, and e2e-te…
lmarrai-sw Sep 20, 2023
36df828
chore(DTFS2-6508): remove 6508 branch name from GH actions
lmarrai-sw Sep 20, 2023
a4fab59
fix(DTFS2-6694): fix failing tests
lmarrai-sw Sep 20, 2023
9536ffe
fix(DTFS2-6694): fix failing tests
lmarrai-sw Sep 20, 2023
6f5548e
feat(DTFS2-6508): add read only role to portal and gef (#2060)
lmarrai-sw Sep 21, 2023
e8e5fa0
Merge remote-tracking branch 'origin/main' into fix/dtfs2-6694/isolat…
lmarrai-sw Sep 21, 2023
f1c1516
refactor(DTFS2-6694): refactor import ordering
lmarrai-sw Sep 21, 2023
cdc890f
fix(DTFS2-6694): fix missed getFacility change
lmarrai-sw Sep 21, 2023
ea34cd1
fix: fixup
lmarrai-sw Sep 21, 2023
95eab9b
refactor(DTFS2-6694): improve updateCoverStartDate signature
lmarrai-sw Sep 21, 2023
1782f66
refactor(DTFS2-6694): improve updateSubmissionType signature
lmarrai-sw Sep 21, 2023
fb5f278
refactor(DTFS2-6694): use object destructuring for Facility.find
lmarrai-sw Sep 22, 2023
aa1834b
fix: fixup
lmarrai-sw Sep 22, 2023
7394963
refactor(DTFS2-6694): use object destructuring for renderChangeFacili…
lmarrai-sw Sep 22, 2023
da39e2e
fix: fixup
lmarrai-sw Sep 22, 2023
25101ec
refactor(DTFS2-6694): use object destructuring in facilityValidation
lmarrai-sw Sep 22, 2023
465c2e4
refactor(DTFS2-6694): destructure session from req in companies-house…
lmarrai-sw Sep 22, 2023
216c6b5
fix(DTFS2-6694): remove shared user token in gef-ui api calls (#2061)
lmarrai-sw Sep 26, 2023
ae0128e
fix(DTFS2-6679): display errors on the edit user page (#2062)
oscar-richardson-softwire Sep 26, 2023
3a55f2b
fix(cypress): GHA parallel execution (#2077)
abhi-markan Sep 26, 2023
444dc35
fix(DTFS2-6679): add API tests for portal UI does not display errors …
oscar-richardson-softwire Sep 29, 2023
71fb3f8
feat(DTFS-6702): update login journey (#2079)
AlexBramhill Sep 29, 2023
63856af
feat(spell-check): added spell check to the pipeline (#2073)
abhi-markan Oct 2, 2023
1eac831
feat(country): updated `Serbia` country code. (#2072)
abhi-markan Oct 4, 2023
05d3388
fix(e2e-tests): seed random company names to prevent 3% chance of col…
lmarrai-sw Oct 6, 2023
7efd9a6
fix(release): release version manager (#2156)
abhi-markan Oct 9, 2023
6960304
fix(DTFS2-6678): remove auto-create password for new user as not need…
oscar-richardson-softwire Oct 13, 2023
5ab0c48
feat(DTFS2-6182): replace qraphql endpoint with rest & wip refactor
francescastocco Aug 11, 2023
1b8e22f
feat(DTFS2-6182): remove new mapper functions & replace all UI calls …
francescastocco Aug 22, 2023
d145a05
feat(DTFS2-6182): copy and paste graphql reducer functions to rest ma…
francescastocco Aug 23, 2023
a031047
feat(DTFS2-6182): add validation for facility ID to routes.js
francescastocco Aug 23, 2023
b10e3eb
feat(DTFS2-6182): add error handling
francescastocco Sep 1, 2023
a9489e0
feat(DTFS2-6182): ui validation for facility id
francescastocco Sep 6, 2023
6c834b8
Feat(DTFS2-6182): replace update facility graphql endpoint with REST …
francescastocco Sep 18, 2023
39b772f
Feat(DTFS2-6182): replace update deal graphql endpoints with REST end…
francescastocco Sep 19, 2023
407f2b9
fix(DTFS2-6182): fix facility-risk-profile test
lmarrai-sw Sep 26, 2023
b92d417
fix(DTFS2-6182): fix deal-with-amendment-bss test
lmarrai-sw Sep 26, 2023
0eaea77
feat(DTFS2-6182): cspell
AlexBramhill Oct 2, 2023
7177e01
feat(DTFS2-6182): cspell
AlexBramhill Oct 2, 2023
0caa935
feat(DTFS2-6182): cspell
AlexBramhill Oct 2, 2023
d39a9da
chore(DTFS2-6182): run tests and lint on combined branch
lmarrai-sw Oct 4, 2023
3ce6cc0
feat(DTFS2-6182): replace update party graphql endpoint with REST end…
francescastocco Oct 4, 2023
25aef41
feat(DTFS2-6182): replace get facilities graphql endpoint with REST e…
francescastocco Oct 4, 2023
7b2aa77
feat(DTFS2-6182): replace get deal and get deals graphql endpoints wi…
ChristianMcc Oct 5, 2023
d095998
feat(DTFS2-6715): migrate get team members in tfm to rest (#2147)
lmarrai-sw Oct 6, 2023
192305d
feat(DTFS2-6717): replace graphql update lead underwriter in tfm with…
AlexBramhill Oct 11, 2023
ca053b7
feat(DTFS2-6718): migrate update underwriters managers decision in tf…
lmarrai-sw Oct 12, 2023
b7b74f3
fix(DTFS2-6182): remove passport from put deals submit (#2162)
lmarrai-sw Oct 13, 2023
22a661d
feat(dtfs2-6716):replace graphql update task in tfm with rest (#2160)
AlexBramhill Oct 13, 2023
2b16dfc
feat(DTFS2-6182): remove request bodies from GET endpoints (#2163)
lmarrai-sw Oct 16, 2023
5539ec1
fix(dtfs2-6719): remove unnecessary code after graphql to rest migrat…
AlexBramhill Oct 16, 2023
c2629e3
Apply suggestions from code review
AlexBramhill Oct 17, 2023
055e815
feat(DTFS2-6182): remove unnecessary code
AlexBramhill Oct 17, 2023
dae6229
feat(mongodb): Fix vulnerable version of `mongodb` (#2165)
abhi-markan Oct 18, 2023
68483c1
feat(DTFS2-6744): add feature flag for magic link (#2182)
AlexBramhill Oct 18, 2023
ce3571d
feat(DTFS2-6733): add 'Check your email' screen (#2185)
oscar-richardson-softwire Oct 20, 2023
d51720c
fix(DTFS2-6746): do not remove parties after updating bond beneficiar…
lmarrai-sw Oct 23, 2023
8cc87c5
feat(DTFS2-6751): add sign in link expired page (#2190)
lmarrai-sw Oct 24, 2023
b1d2f55
docs: improve setup instructions in the README (#2193)
lmarrai-sw Oct 27, 2023
b43b5f4
feat(DTFS2-6743): send email on login (#2189)
oscar-richardson-softwire Oct 27, 2023
c46b570
fix(DTFS2): update external api api jest config (#2196)
francescastocco Oct 27, 2023
cc54a87
feat(DTFS2-6747): update login token handling (#2191)
AlexBramhill Oct 30, 2023
1084b3b
feat(DTFS2-6756): update token expiry time (#2198)
AlexBramhill Oct 30, 2023
b8a246d
fix(DTFS2-6759): fix token expiry (#2199)
AlexBramhill Oct 31, 2023
a322576
feat(DTFS2-6758): update readme with login implementation (#2204)
AlexBramhill Nov 1, 2023
c399f07
fix(DTFS-6458): remove current-page aria
avaitonis Nov 2, 2023
517d2af
fix(private-runners): Moved workflow jobs to public runners (#2263)
abhi-markan Nov 2, 2023
c1d40c1
feat(DTFS2-6750): generate sign in link token (#2200)
lmarrai-sw Nov 2, 2023
0f682fd
Merge branch 'main' into fix/DTFS2-6458/remove-current-page-aria
avaitonis Nov 3, 2023
e44efe6
feat(DTFS2-6762): create environment variable for Portal website doma…
oscar-richardson-softwire Nov 3, 2023
d20ad00
feat(DTFS2-6767): update login naming conventions (#2267)
AlexBramhill Nov 3, 2023
70c46b1
fix(DTFS-6752): improve css for check your email screen (#2201)
oscar-richardson-softwire Nov 6, 2023
7c9a025
feat(DTFS2-6769): add new variants of check email page
MarRobSoftwire Nov 2, 2023
9f2f387
fix(DTFS2-6769): use commonised contact-us partial
MarRobSoftwire Nov 3, 2023
d641096
feat(DTFS2-6769): add tests for new email login pages
MarRobSoftwire Nov 3, 2023
b4dc5d1
fix(DTFS2-6769): rename files
MarRobSoftwire Nov 3, 2023
dfe1a75
chore: print the page body to the console when e2e tests error for in…
lmarrai-sw Nov 6, 2023
29cce6d
feat(DTFS2-6769): create additional variants of check email page (#2268)
MarRobSoftwire Nov 6, 2023
db0b6be
feat(DTFS2-5659): add component tests for TFM UI
Rithvik0112 Nov 6, 2023
24d5893
chore(package): tidy root package json (#2088)
AlexBramhill Nov 8, 2023
bb3bdaa
chore(deps): dependencies updates (#2285)
abhi-markan Nov 8, 2023
3ccffb4
feat(DTfS2-6784): update built mojFrontend files to reflect jQuery ve…
oscar-richardson-softwire Nov 8, 2023
f901a8c
WIP fix(DTFS-6458): remove current-page aria (#2264)
avaitonis Nov 9, 2023
85987c0
fix(DTFS2-6789): allow read-only users to have access to all banks (#…
lmarrai-sw Nov 9, 2023
e87f056
feat(dtfs2-6757): add sign in link validation (#2271)
AlexBramhill Nov 9, 2023
2a90d29
fix(DTFS2-6788): nunjucks boolean check (#2295)
abhi-markan Nov 9, 2023
8244aa7
fix(gef-readonly): added read-only to GEF deals users (#2301)
abhi-markan Nov 10, 2023
23b7cf4
feat(DTFS2-6778): add typescript compatibility to portal and fix jsdo…
MarRobSoftwire Nov 13, 2023
947f19d
chore(DTFS2-NONE): update package-lock for portal (#2313)
AlexBramhill Nov 14, 2023
1c378df
chore(deps): bump axios from 0.27.2 to 1.6.0 in /utils/data-migration…
dependabot[bot] Nov 14, 2023
b787642
chore: increase e2e test parallelisation (#2297)
lmarrai-sw Nov 14, 2023
4dcba64
feat(DTFS2-5659): added tests for sorting Facility Stage column (#2203)
vamshidharukef Nov 14, 2023
425f670
feat(DTFS-6777): add magic sign in link e2e tests (#2286)
lmarrai-sw Nov 15, 2023
4b4faa0
feat(DTFS2-6780): add typescript compatibility to dtfs-central-api (#…
MarRobSoftwire Nov 16, 2023
3f14fbd
feat(DTFS2-6782): add typescript compatibility to trade-finance-manag…
MarRobSoftwire Nov 16, 2023
8d59c22
feat(DTFS2-6793): add e2e test for TFM Eligibility criteria (#2310)
MarRobSoftwire Nov 16, 2023
f35564c
Merge branch 'main' into feat/DTFS2-5659/build-component-tests-tfm-ui
vamshidharukef Nov 21, 2023
37f5f62
fix: fix mock-data-loader clearing gef-eligibilityCriteria (#2327)
lmarrai-sw Nov 21, 2023
6da84ce
Merge branch 'main' into feat/DTFS2-5659/build-component-tests-tfm-ui
vamshidharukef Nov 21, 2023
882672d
feat(DTFS2-5659): add component tests for TFM UI (#2278)
vamshidharukef Nov 21, 2023
8939aeb
feat(DTFS2-6779): add typescript compatibility to gef UI (#2281)
MarRobSoftwire Nov 21, 2023
f4b083f
feat(DTFS2 6783): add typescript compatibility to trade-finance-manag…
MarRobSoftwire Nov 21, 2023
13f7058
feat(DTFS2-6781): add typescript compatibility to portal api (#2302)
MarRobSoftwire Nov 21, 2023
e057b1d
feat(DTFS2-6770): allow user to resend sign in link (#2305)
lmarrai-sw Nov 21, 2023
b45c567
Merge branch 'main' into update-main-stbr
JoshBinns2000 Nov 22, 2023
f54ddf5
Merge branch 'main' into update-main-stbr
JoshBinns2000 Nov 22, 2023
0e24397
update-main-stbr: update new login functionality to match payment off…
JoshBinns2000 Nov 22, 2023
21fa836
feat(DTFS2-6757): add tests to sign in link validation (#2300)
AlexBramhill Nov 22, 2023
0adb2a0
fix(DTFS2-NONE): fix pipeline (#2336)
AlexBramhill Nov 22, 2023
7a0b0a6
Merge branch 'main' into update-main-stbr
JoshBinns2000 Nov 22, 2023
afdb2ba
chore: improve logging
Nov 22, 2023
40ad17b
chore: add entry point back in
Nov 22, 2023
1cda3e0
chore: re-introduce db.close function
JoshBinns2000 Nov 22, 2023
2ea992b
chore: update some e2e test behaviour
JoshBinns2000 Nov 22, 2023
7d21e1d
chore: add the payment-report-officer tests back in
JoshBinns2000 Nov 22, 2023
be4c2a5
chore: fix spelling error
JoshBinns2000 Nov 22, 2023
40fee3a
chore: remove extra back link
JoshBinns2000 Nov 22, 2023
0012591
chore: remove old graphql test
JoshBinns2000 Nov 22, 2023
5385b11
chore: refactor base url routing behaviour
JoshBinns2000 Nov 22, 2023
04ecfc7
chore: introduce explicit default routing
JoshBinns2000 Nov 22, 2023
a5e8c59
chore: delete old portal login route tests
JoshBinns2000 Nov 22, 2023
475597f
chore: fix linting
Nov 23, 2023
7b86dc6
Merge branch 'main-stbr' into update-main-stbr
ChristianMcc Nov 23, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
3 changes: 2 additions & 1 deletion .env.sample
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ MONGODB_URI=

# MICROSERVICES
PORTAL_API_URL=http://localhost:5001
PORTAL_UI_URL=http://localhost
EXTERNAL_API_URL=http://localhost:5002
TFM_API_URL=http://localhost:5004
TFM_UI_URL=http://localhost:5003
Expand Down Expand Up @@ -71,4 +72,4 @@ JWT_VALIDATING_KEY=
TFM_API_KEY=TESTAPIKEY
PORTAL_API_KEY=TESTAPIKEY
DTFS_CENTRAL_API_KEY=TESTAPIKEY
EXTERNAL_API_KEY=TESTAPIKEY
EXTERNAL_API_KEY=TESTAPIKEY
30 changes: 15 additions & 15 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,19 +10,19 @@ on:
pull_request:
branches: [main, main-stbr]
paths:
- 'package*.json'
- 'docker*.yml'
- '.github/workflows/**'
- 'gef-ui/**'
- 'portal/**'
- 'portal-api/**'
- 'trade-finance-manager-ui/**'
- 'trade-finance-manager-api/**'
- 'external-api/**'
- 'dtfs-central-api/**'
- 'azure-functions/**'
- 'e2e-tests/**'
- 'utils/mock-data-loader/**'
- "package*.json"
- "docker*.yml"
- ".github/workflows/**"
- "gef-ui/**"
- "portal/**"
- "portal-api/**"
- "trade-finance-manager-ui/**"
- "trade-finance-manager-api/**"
- "external-api/**"
- "dtfs-central-api/**"
- "azure-functions/**"
- "e2e-tests/**"
- "utils/mock-data-loader/**"

env:
environment: dev
Expand All @@ -32,7 +32,7 @@ jobs:
# 1. Setup test infrastructure
setup:
name: Infrastructure setup 🔧
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
Expand All @@ -48,7 +48,7 @@ jobs:
name: Scanning 🎨
environment:
name: ${{ needs.setup.outputs.environment }}
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
steps:
- name: Timezone
uses: szenius/set-timezone@v1.2
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
id: release
with:
release-type: node
package-name: uk-export-finance/dtfs
package-name: uk-export-finance/dtfs2
default-branch: main
labels: 'chore'
changelog-types: '[
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/sca.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ jobs:
# 1. Setup test infrastructure
setup:
name: Infrastructure setup 🔧
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest
outputs:
environment: ${{ env.environment }}
timezone: ${{ env.timezone }}
Expand All @@ -38,7 +38,7 @@ jobs:
needs: setup
environment:
name: ${{ needs.setup.outputs.environment }}
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest

steps:
- name: Repository
Expand Down Expand Up @@ -75,7 +75,7 @@ jobs:
needs: setup
environment:
name: ${{ needs.setup.outputs.environment }}
runs-on: [self-hosted, linux]
runs-on: ubuntu-latest

steps:
- name: Repository
Expand Down
23 changes: 16 additions & 7 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ env:
node: ${{ vars.NODE_VERSION }}
credentials: ${{ secrets.AZURE_DIGITAL_DEV }}
MONGODB_URI: ${{ secrets.MONGODB_URI }}
MONGO_INITDB_DATABASE: ${{ secrets.MONGO_INITDB_DATABASE}}
AZURE_PORTAL_STORAGE_ACCOUNT: ${{ secrets.AZURE_PORTAL_STORAGE_ACCOUNT }}
AZURE_PORTAL_STORAGE_ACCESS_KEY: ${{ secrets.AZURE_PORTAL_STORAGE_ACCESS_KEY }}
AZURE_PORTAL_FILESHARE_NAME: ${{ secrets.AZURE_PORTAL_FILESHARE_NAME }}
Expand Down Expand Up @@ -139,7 +140,7 @@ jobs:
- name: Initialise
working-directory: ./utils/mock-data-loader
run: |
sleep 30s
sleep 60s
npm run load

- name: Execute
Expand Down Expand Up @@ -282,13 +283,16 @@ jobs:
spec:
[
"*.spec.js",
"AD integration/**/*.spec.js",
"admin/**/*.spec.js",
"checker/**/*.spec.js",
"dashboard/**/*.spec.js",
"feedback/**/*.spec.js",
"login/**/*.spec.js",
"maker/**/*.spec.js",
"maker-about-supply-contract/**/*.spec.js",
"maker-bond/**/*.spec.js",
"maker-facilities/**/*.spec.js",
"maker-loan/**/*.spec.js",
"number-generator/**/*.spec.js",
"read-only/**/*.spec.js",
"reports/**/*.spec.js",
Expand Down Expand Up @@ -317,7 +321,7 @@ jobs:
- name: Initialise
working-directory: ./utils/mock-data-loader
run: |
sleep 30s
sleep 60s
npm run load
curl "http://localhost:7072/api/orchestrators/numbergenerator" -d '{ "entityType":"facility", "entityId":"12211" }'

Expand All @@ -338,7 +342,12 @@ jobs:
fail-fast: false
# Single dimension matrix
matrix:
spec: ["*.spec.js", "scenarios/**/*.spec.js"]
spec:
[
"*.spec.js",
"scenarios/**/*.spec.js",
"unissued-facilities/**/*.spec.js"
]

concurrency:
group: e2e-tests-gef-${{ github.workflow }}-${{ github.workflow_ref }}-${{ matrix.spec }}
Expand All @@ -362,7 +371,7 @@ jobs:
- name: Initialise
working-directory: ./utils/mock-data-loader
run: |
sleep 30s
sleep 60s
npm run load
curl "http://localhost:7072/api/orchestrators/numbergenerator" -d '{ "entityType":"facility", "entityId":"12211" }'

Expand Down Expand Up @@ -416,7 +425,7 @@ jobs:
- name: Initialise
working-directory: ./utils/mock-data-loader
run: |
sleep 30s
sleep 60s
npm run load
curl "http://localhost:7072/api/orchestrators/numbergenerator" -d '{ "entityType":"facility", "entityId":"12211" }'

Expand Down Expand Up @@ -483,7 +492,7 @@ jobs:
- name: Initialise
working-directory: ./utils/mock-data-loader
run: |
sleep 30s
sleep 60s
npm run load
curl "http://localhost:7072/api/orchestrators/numbergenerator" -d '{ "entityType":"facility", "entityId":"12211" }'

Expand Down
41 changes: 28 additions & 13 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,15 @@

1. Clone this repository.
2. Run `nvm install` to ensure you're using the correct Node.js version.
3. Create `.env` files for each service, using `.env.sample` as a base. Some sensitive variables may need to be shared within the team.
3. Create `.env` files for each service (including `utils/mock-data-loader`), using `.env.sample` as a base. Some sensitive variables may need to be shared within the team.
4. Generate JWT key pairs with `secrets/set_jwt_keypair.sh` (use `bash secrets/set_jwt_keypair.sh` for Windows).
5. Base64 encode the generated public and private keys and add them to your portal-api `.env` file as follows:
- `JWT_SIGNING_KEY=1234`
- `JWT_VALIDATING_KEY=5678`
6. Set UKEF TFM environment variables in your terminal: `UKEF_TFM_API_SYSTEM_KEY` and `UKEF_TFM_API_REPORTS_KEY`.
7. Start your local environment with `docker-compose up --build`.
8. Create mock data by navigating to `utils/mock-data-loader`, running `npm install`, and then `node re-insert-mocks.js`. This should generate mocks in your database.
7. Start your local environment with `docker-compose -f docker-compose.dev.yml up --build`.
8. Create mock data by navigating to `utils/mock-data-loader`, running `npm install`, and then `npm run load`. This should generate mocks in your database.
9. Run `npm install` in the root folder of the repository.

Recommended: Install a MongoDB client such as Compass or Robo 3T.

Expand All @@ -47,16 +48,16 @@

Several services are built:

| Service | URL |
| ---------------- | ------------------------------------ |
| Portal UI | [http://localhost:5000](http://localhost:5000) |
| Portal API | [http://localhost:5001](http://localhost:5001) |
| External API | [http://localhost:5002](http://localhost:5002) |
| TFM UI | [http://localhost:5003](http://localhost:5003) |
| TFM API | [http://localhost:5004](http://localhost:5004) |
| Central API | [http://localhost:5005](http://localhost:5005) |
| GEF | [http://localhost:5006](http://localhost:5006) |
| MongoDB | `root:r00t@localhost:27017` (Connect via MongoDB client) |
| Service | URL |
| ------------ | -------------------------------------------------------- |
| Portal UI | [http://localhost:5000](http://localhost:5000) |
| Portal API | [http://localhost:5001](http://localhost:5001) |
| External API | [http://localhost:5002](http://localhost:5002) |
| TFM UI | [http://localhost:5003](http://localhost:5003) |
| TFM API | [http://localhost:5004](http://localhost:5004) |
| Central API | [http://localhost:5005](http://localhost:5005) |
| GEF | [http://localhost:5006](http://localhost:5006) |
| MongoDB | `root:r00t@localhost:27017` (Connect via MongoDB client) |

To access GEF locally, use [http://localhost](http://localhost).

Expand Down Expand Up @@ -148,6 +149,19 @@
npm run test /path/to/file.test.js
```

## Building CSS and JS :wrench:

Check warning on line 152 in README.md

View check run for this annotation

Codacy Production / Codacy Static Code Analysis

README.md#L152

[no-heading-punctuation] Don’t add a trailing `:` to headings

The `gef-ui`, `portal` and `trade-finance-manager-ui` folders/services all have a `public` folder which contains compiled/minified CSS and JS that is used in the running application.

These CSS and JS files are built from SCSS and JS source files using a tool called Webpack. You can check which SCSS and JS source files are used in the `webpack.common.config.js` file (each relevant service has one). In general, each of the three services has:

- A `scripts` folder containing the source JS.
- A `styles` folder containing the source SCSS.

The developer should run `npm run build` inside the service in question to recompile the CSS and JS in the `public` folder after making any changes to the source files or their dependencies.

IMPORTANT: When recompiling JS files, the developer should ensure that they update the `integrity` attribute in any HTML/Nunjucks `script` tags that use the file to reflect the new hash of the recompiled file (a good place to check for these `script` tags is the `templates/index.njk` file in the service). An easy way of finding the new hash is to render a template that uses the script in a browser; a console error should give you the hash of the recompiled file.

## Linting :mag_right:

In the root directory or any service, run:
Expand Down Expand Up @@ -178,6 +192,7 @@
- [Production Environment](http://tfs-xxx-fd.azurefd.net/)

### GEF

The GEF test environment is hosted on the same URL as Portal v2. Following steps would allow access to GEF portal.

- Log in to Portal v2: [https://tfs-xxx-fd.azurefd.net](https://tfs-xxx-fd.azurefd.net)
Expand Down
Loading
Loading