Yhteisöjen ja järjestöjen digitaalinen Helsinki (= YJDH).
This monorepo contains code for three different employment services:
-
Kesäseteli
- Backend
- Admin
- Youth
- Employer
-
Benefit / Helsinki-lisä
- Backend
- Applicant
- Handler
-
TET Job Search - retired and can be found in here
- Backend
- Youth
- Admin
- Docker@^19.03.0 (or higher)
- NodeJS@^22.13.1
- Yarn@^1.22
Follow these instructions to spin up a service:
- Kesäseteli:
- Benefit aka. Helsinki-lisä:
There is additional README's about authentication and backend development and frontend development.
Release Please is used to automate release and release tag creation. Release Please creates release pull requests when the main branch has new commits after the last release, with commit messages prefixed with specific Conventional Commits types (feat:, fix: or deps:). More info about types here. Release PR might also already exist (if not merged before). Merging release PR creates appropriate release tag which triggers staging + production deploy. Refer to the Release Please docs.
More information in Confluence.
- Merge to
mainbranch triggers dev + test deploys. Merging release pull requests created by Release Please triggers staging + production deploys. - Use Conventional Commits
- Merge with merge commit is disabled on pull requests as it doesn't play well with Release Please. Release Please documentation recommends using squash merge, so keep PR's small enough so that squashing makes sense. Rebase and merge also works if PR is large. More info about merge methods in GitHub docs.
- Pull request title should include Jira handle (for Jira integration to work)
- Release Please figures out how much to increase the version number based on commit messages. Look SemVer and Release Please docs.
- Branch off from
mainto feature branch named after Jira handle, e.g.git checkout -b hl-123-new-feature - Do your changes & commit using Conventional Commits, e.g.
git commit -m "feat: new feature backend" - Make additional changes & commit, e.g.
git commit -m "feat: new feature frontend" - Open a pull request, for example with title
HL-123: New feature - After PR checks are passed and PR is approved, merge with squash merge (set commit message to e.g.
feat: new feature) or rebase and merge - Release Please opens release PR with a title similar to this:
chore(main): release benefit-backend 1.1.1 - Merge release pull request to
main. This creates a versioned release tag (e.g.benefit-backend: v1.1.1) that triggers staging and production deploy (Deploys still must be approved from Azure DevOps).
Git hooks are run with pre-commit. Pre-commit also runs the frontend hooks that were run with husky and lerna.
- Install Pre-commit
- Install packages from
package.json - Run
pre-commit install
Git hooks can be disabled temporarily with --no-verify when committing.
YJDH-Kesäseteli service for employers to fulfill employee applications
-
Run
yarnto install necessary packages -
Copy the contents of
.env.kesaseteli-backend.exampleto.env.kesaseteli-backendand modify it if needed. -
Copy the contents of
.env.kesaseteli-employer.exampleto.env.kesaseteli-employerand modify it if needed. -
Run
yarn employer upor, if you want to rebuild, thenyarn employer up --build
- The employer frontend is now running at localhost:3000
- The backend is now running at localhost:8000
- If services fail to get up,
yarn cleanordocker system prune --allmight help.
YJDH-Kesäseteli service for young people to send kesäseteli applications
-
Run
yarnto install necessary packages -
Copy the contents of
.env.kesaseteli-backend.exampleto.env.kesaseteli-backendand modify it if needed. -
Copy the contents of
.env.kesaseteli-youth.exampleto.env.kesaseteli-youthand modify it if needed. -
Run
yarn youth upor, if you want to rebuild, thenyarn youth up --build
- The youth frontend is now running at localhost:3100
- The backend is now running at localhost:8000
- If services fail to get up,
yarn cleanmight help.
YJDH-Kesäseteli service for young people to send kesäseteli applications
-
Run
yarnto install necessary packages -
Copy the contents of
.env.kesaseteli-backend.exampleto.env.kesaseteli-backendand modify it if needed. -
Copy the contents of
.env.kesaseteli-handler.exampleto.env.kesaseteli-handlerand modify it if needed. -
Run
yarn handler upor, if you want to rebuild, thenyarn handler up --build
- The handler frontend is now running at localhost:3200
- The backend is now running at localhost:8000
- If services fail to get up,
yarn cleanmight help.
YJDH-Benefit provides two services for applying and for handling the application of discretionary support:
- Service for a private or third-sector employer that hires an unemployed Helsinki resident
- Service for the City Of Helsinki backoffice to handle aforementioned applications
-
Run
yarnto install necessary packages -
Copy the contents of
.env.benefit-*.exampleto.env.benefit-*and modify them if needed. Or better yet, get one from a fellow contributor. -
Run
yarn benefit upor, if you want to rebuild, thenyarn benefit up --build
- The Applicant Frontend is now running at localhost:3000
- The Handler Frontend is now running at localhost:3100
- The backend is now running at localhost:8000
- If github action deploy fail with error like this in your pull-request:
Error: rendered manifests contain a resource that already exists.
Unable to continue with install: Service "yjdh-135-send-localization-param-to-suomifi-yjdh-ks-service"
in namespace "yjdh-yjdh-135-send-localization-param-to-suomifi-227" exists and cannot be
imported into the current release: invalid ownership metadata; annotation validation error:
key "meta.helm.sh/release-name" must equal "yjdh-135-send-localization-par-review-yjdh-ks-bknd":
current value is "yjdh-135-send-localization-par-review-yjdh-ks-empl"
The reason for this is that your pr's branch name is too long. You have to rename it and create a new pr. See instructions at StackOverflow.
Project includes a .git-blame-ignore-revs file for ignoring certain commits from git blame.
This can be useful for ignoring e.g. formatting commits, so that it is more clear from git blame
where the actual code change came from. Configure your git to use it for this project with the
following command:
git config blame.ignoreRevsFile .git-blame-ignore-revs