Skip to content

Helsinki Electronic Records Management Classification System UI

License

Notifications You must be signed in to change notification settings

City-of-Helsinki/helerm-ui

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HELERM UI

This is a front-end project for Helsinki Electronic Records Management Classification System.

The project structure is based on create-react-app (https://create-react-app.dev/).

Looking for the backend code? It's in this repository: helerm - Helsinki Electronic Records Management Classification System

Requirements

  • Node v18 LTS (nvm use)

Install from source

Make sure you have Yarn installed globally.

1. Clone the project:

$ git clone https://github.com/City-of-Helsinki/helerm-ui.git
$ cd helerm-ui

2. Install project dependencies

$ yarn              # Install project dependencies

3. Add needed environmental variables

Add these by copying the .env.example to .env and adding the values to the file, or directly through import.meta.env.

Running the app locally:

$ yarn start    # Launch on local environment

Navigate to http://localhost:3000

Running the app in Docker

$ docker compose build
$ docker compose up    # Launches the containerized version of the application

Navigate to http://localhost:3000

Running production version with Docker

$ DOCKER_TARGET=production docker compose build
$ docker compose up

Navigate to http://localhost:3000

Commit message format

New commit messages must adhere to the Conventional Commits specification, and line length is limited to 72 characters.

commitlint checks every new commit for the correct format.

Development with Helsinki-tunnistus

Configure backend

Change the following configuration in .env

SOCIAL_AUTH_TUNNISTAMO_KEY=tiedonohjaus-django-admin-dev
SOCIAL_AUTH_TUNNISTAMO_SECRET=<ttiedonohjaus-django-admin-dev client secret>
SOCIAL_AUTH_TUNNISTAMO_OIDC_ENDPOINT=https://tunnistus.test.hel.ninja/auth/realms/helsinki-tunnistus
OIDC_API_TOKEN_AUTH_AUDIENCE=tiedonohjaus-api-dev
OIDC_API_TOKEN_AUTH_ISSUER=https://tunnistus.test.hel.ninja/auth/realms/helsinki-tunnistus

Configure frontend

Change the following configuration in .env

REACT_APP_API_URL=http://localhost:8080
REACT_APP_API_VERSION=v1

REACT_APP_OIDC_AUTHORITY=https://tunnistus.test.hel.ninja/auth/realms/helsinki-tunnistus
REACT_APP_OIDC_CLIENT_ID=tiedonohjaus-ui-dev
REACT_APP_OIDC_API_TOKEN_AUTH_AUDIENCE=tiedonohjaus-api-dev
REACT_APP_OIDC_SCOPE="openid profile"
REACT_APP_OIDC_TOKEN_URL=https://tunnistus.test.hel.ninja/auth/realms/helsinki-tunnistus/protocol/openid-connect/token
REACT_APP_OIDC_RESPONSE_TYPE="code"