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
- Backend
- Youth
- Admin
- Docker@^19.03.0 (or higher)
- NodeJS@^18.16.0
- Yarn@^1.22
Follow these instructions to spin up a service:
- Kesäseteli:
- Benefit aka. Helsinki-lisä:
- TET:
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
main
branch 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
main
to 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
yarn
to install necessary packages -
Copy the contents of
.env.kesaseteli.example
to.env.kesaseteli
and modify it if needed. -
Run
yarn employer up
or, if you want to rebuild, thenyarn employer up --build
- The Frontend is now running at localhost:3000
- The backend is now running at localhost:8000
- If services fail to get up,
yarn clean
ordocker system prune --all
might help.
YJDH-Kesäseteli service for young people to send kesäseteli applications
-
Run
yarn
to install necessary packages -
Copy the contents of
.env.kesaseteli.example
to.env.kesaseteli
and modify it if needed. -
Run
yarn youth up
or, if you want to rebuild, thenyarn youth up --build
- The Frontend is now running at localhost:3100
- The backend is now running at localhost:8000
- If services fail to get up,
yarn clean
might help.
YJDH-Kesäseteli service for young people to send kesäseteli applications
-
Run
yarn
to install necessary packages -
Copy the contents of
.env.kesaseteli.example
to.env.kesaseteli
and modify it if needed. -
Run
yarn handler up
or, if you want to rebuild, thenyarn handler up --build
- The Frontend is now running at localhost:3200
- The backend is now running at localhost:8000
- If services fail to get up,
yarn clean
might 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
yarn
to install necessary packages -
Copy the contents of
.env.benefit-*.example
to.env.benefit-*
and modify them if needed. Or better yet, get one from a fellow contributor. -
Run
yarn benefit up
or, 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
YJDH-TET-Admin is a UI for Helsinki city employees or private employers to add TET job advertisements (also called job postings in the code).
-
Run
yarn
to install necessary packages -
Copy the contents of
.env.tet.example
to.env.tet
and modify it if needed. -
You need to set
LINKEDEVENTS_API_KEY
in.env.tet
for this service to work. Usually this is set to Linked Events test environment (default in.env.tet.example
), so you need to ask for this. -
Run
yarn tet-admin up
or, if you want to rebuild, thenyarn tet-admin up --build
- The Frontend is now running at localhost:3002
- The backend is now running at localhost:8000
Running yarn tet-admin down
brings down all services.
YJDH-TET-Youth is a UI for pupils to search for TET job advertisements.
-
Run
yarn
to install necessary packages -
Copy the contents of
.env.tet.example
to.env.tet
and modify it if needed. -
Run
yarn tet-youth up
or, if you want to rebuild, thenyarn tet-youth up --build
- The Frontend is now running at localhost:3001
- The backend is now running at localhost:8000
Running yarn tet-youth down
brings down all services.
- 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.