Skip to content

pejamz/kieli-ja-kaantajatutkinnot

 
 

Repository files navigation

Kieli- ja kääntäjätutkinnot

AKR OTR VKT Shared Frontend

This mono-repo contains the language and translator services of the Finnish National Agency for Education.

Technologies

  • Maven 3.1+
  • JDK 17
  • PostgreSQL 12.9
  • node v16.16.0
  • yarn 3.2.2 (to enable it, run the following command: corepack enable)

 

Services

Below are listed the OPH services which are a part of this mono-repo.

In addition, the shared frontend content can be found here.

 

Development

Create and start database, backend, and frontend containers for a specific application:

docker-compose -f <service-docker-compose-file-name.yml> up

Or

Start up a certain service of an application:

docker-compose up frontend | backend | postgres

To disable default Spring Security configurations, create the following environment variable and restart the containers:

export AKR_UNSECURE=true
docker-compose -f <service-docker-compose-file-name.yml> up

In case of errors, clean cache and recreate volumes:

docker-compose -f <service-docker-compose-file-name.yml> down
docker-compose -f <service-docker-compose-file-name.yml> up --build --force-recreate --renew-anon-volumes

After starting the services, the frontend runs on > http://localhost:4000

 

Deployment

Deployments are created automatically when a new push is done into dev branch. To create a new deployment from other branches use [deploy] in the commit messages.

For example:

AKR(Frontend): Added new translations [deploy]

 

Frontend conventions

Visual Studio Code

The project uses the shared workspace configs. In order to keep code clean and easily maintainable please use the following VS Code Extensions.

To reformat all frontend files, run:

npm run <project-name>:lint

 

Backend conventions

Styling

Prettier Java is used as a code formatter. It enforces a consistent style by parsing your code and re-printing it with its own rules.

To reformat all Java files in a project, run:

mvn validate

CI/CD validates that the files are formatted properly.

 

Organizing imports

If you are using an IDE such as IntelliJ, you might want to configure it to organize imports.

For IntelliJ, you can use the following configurations:

ìmport * is disabled: Code Style -> Java -> Imports:

Class count to use import with '*': 999
Names count to use static import with '*': 999

 

Git conventions

Commit message conventions

To create a useful revision history the guidelines of Conventional Commits are broadly followed.

A commit message should be structured as follows:

service(scope): <description>

service:     AKR, VKT, OTR, YKI, and SHARED
scope:       Frontend, Backend, Docs, Infra
description: Informal description

For example:

AKR(Frontend): Added new translations

Branching naming conventions

Jira ticket numbers are used as branch names without any extra suffixes.

Used prefixes are feature, hotfix, and release. Below are some examples.

feature/<ticket-number>         ---->   feature/OPHAKRKEH-250
hotfix/<service-name>           ---->   hotfix/akr
release/<service-name/<date>    ---->   release/akr/2022-04-12

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • TypeScript 51.6%
  • Java 42.8%
  • SCSS 2.4%
  • JavaScript 1.6%
  • HTML 1.1%
  • Shell 0.5%