Skip to content

bcgov/fin-pay-transparency

Repository files navigation

Lifecycle:Maturing

Service in Monorepo SonarCloud
frontend Quality Gate Status Coverage
backend Quality Gate Status Coverage
doc-gen-service Quality Gate Status Coverage
backend-external Quality Gate Status Coverage

Pay Transparency Reporting Tool

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.

Key Technologies Used

  • OpenShift and helm charts
  • PostgreSQL and Prisma
  • node.js
  • Vue and Vuetify
  • Vite
  • jest, vitest, and playwright
  • ESLint and Prettier
  • SonarCloud

GitHub Actions

Automatic actions

  • 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

Manual actions

  • Deploy to Test environment
  • Deploy to Prod environment

Local Environment Setup

Prerequisites

  1. BC Gov VPN
  2. Keycloak and BCeID authorization
  3. Podman (or equivalent for running docker containers)
  4. Node.js
  5. Ports need to be available for the application to work locally
    • 8081 frontend
    • 3000 backend
    • 3001 doc-gen-service
    • 3002 backend-external
    • 5432 postgres

Repo setup

  1. Clone repo

  2. Create .env for backend

  3. (Optional) A VSCode workspace is provided in .vscode/fin-pay-transparency.code-workspace which can easily install npm packages and launch all services.

  4. Install npm packages for each project in repo

    npm -C backend install

    npm -C backend-external install

    npm -C doc-gen-service install

    npm -C frontend install

  5. Build and start the database container

    podman-compose up --build -d database

  6. Run the database migrations to create/update the database for this project

    podman-compose up -d database-migrations

Start servers

  • 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

Tests

Unit

All projects have unit tests and can be run with

npm run test

Integration

Only backend-external has integration tests. Requires that backend-external and backend services be running.

npm run test:integration

End-to-end

The frontend end-to-end test is performed by playwright.

First install playwright tools:

npx playwright install --with-deps

Then run the tests:

npm run e2e