Service in Monorepo | SonarCloud |
---|---|
frontend | |
admin-frontend | |
backend | |
doc-gen-service | |
backend-external |
Pay Transparency Reporting Tool is a webapp that employers use to generate a pdf report. The Gender equity - Pay transparency website has more information and a link to the tool.
- OpenShift and helm charts
- PostgreSQL and Prisma
- node.js
- Vue and Vuetify
- Vite
- jest, vitest, and playwright
- ESLint and Prettier
- SonarCloud
- Pull requests automatically create a temporary instance on OpenShift and are automatically removed when merged to main
- Unit tests, integration tests, and end-to-end test are automatically performed.
- SonarCloud scans
- Deploy to Test environment
- Deploy to Prod environment
- BC Gov VPN
- Keycloak and BCeID authorization
- Podman (or equivalent for running docker containers)
- Node.js
- Ports need to be available for the application to work locally
- 8081 frontend
- 8084 admin-frontend
- 3000 backend
- 3001 doc-gen-service
- 3002 backend-external
- 3011 clamav-service ( node.js api)
- 3310 clamav (clamav daemon)
- 5432 postgres
-
Clone repo
-
Create and populate environment variable files
/backend/.env
/frontend/env.js
-
(Optional) A VSCode workspace is provided in .vscode/fin-pay-transparency.code-workspace which can easily install npm packages and launch all services.
-
Install npm packages for each project in repo
npm -C backend ci
npm -C backend-external ci
npm -C doc-gen-service ci
npm -C frontend ci
npm -C admin-frontend ci
-
Build and start the database container
podman-compose up --build -d database
-
Run the database migrations to create/update the database for this project
podman-compose up -d database-migrations
- The backend requires the doc-gen-service and the database docker container to be running.
- The backend-external requires the backend service to be running.
- The frontend requires the backend to be running in order to login.
npm -C backend run dev
npm -C backend-external run dev
npm -C doc-gen-service run dev
npm -C frontend run serve
npm -C admin-frontend run serve
All projects have unit tests and can be run with
npm run test
Only backend-external has integration tests. Requires that backend-external and backend services be running.
npm run test:integration
The frontend end-to-end test is performed by playwright.
-
Install playwright tools:
npx playwright install --with-deps
-
Create and populate environment variable file
'/frontend/.env.playwright'
-
Run the tests:
npm run e2e
flowchart
A[Last Released To Production Tag ex: 1.17.2] -->|create a hotfix branch from the tag ex: hotfix/1.17.2_hotfix.1| B(Make Changes)
A[Last Released To Production Tag ex: 1.17.2] -->|create releases/hotfix branch from the tag | C( Branch to Which pull request will be raised)
B --> C[Create pull request to releases/hotfix branch, from the hotfix/x.x.x_hotfix.x branch]
C --> D[Changes Deployed to Dev environment with Postgres DB, follow .github/workflows/ci_cd_on_pr_hotfix.yml]
D -->|On Approval and Merge to releases/hotfix| E[Clean up PR environment and create the new Docker Tags and GitHub Tag]
E -->|Promote to PROD, using the tag that was generated in previous step | F[Promote to Prod using branch releases/hotfix using existing github workflow, check the is hostfix deployment to true, cd-to-prod-on-workflow-dispatch.yml]
F -->|Create a PR to main branch from releases/hotfix| G[Resolve Merge Conflicts here and promote through, DEV and TEST]
G --> H[Close the releases/hotfix branch]