Judicial System

About

TODO

URLs

Backend

Initial setup

First, make sure you have docker, then run:

yarn dev-services judicial-system-backend

Then run the migrations and seed the database:

yarn nx run judicial-system-backend:migrate
yarn nx run judicial-system-backend:seed

Running locally

You can serve this service locally by running:

yarn start judicial-system-backend

To enable SMS notifications to an on-call judge provide a password for the SMS service and court mobile numbers:

NOVA_PASSWORD=<SMS password> COURTS_MOBILE_NUMBERS='{ <court-id>: mobileNumbers: <judge mobile number> }' yarn start judicial-system-backend

Similarly, you can enable electronic signatures of judge rulings by providing a Dokobit access token: DOKOBIT_ACCESS_TOKEN=<Dokobit access token>

To enable email sending via AWS SES turn off email test account and provide an email region:

EMAIL_USE_TEST_ACCOUNT=false EMAIL_REGION=eu-west-1 yarn start judicial-system-backend

You need to be authenticated against AWS for this to work. Alternatively, you can view ethereal nodemailer messages by following the urls shown in the logs.

To enable prison and prison administration email notifications provide email addresses: PRISON_EMAIL=<prison email> PRISON_ADMIN_EMAIL=<prison administration email>

To enable writing to AWS S3 you need to be authenticated against AWS.

Finally, you can enable communication with the court system via xRoad by providing appropriate values for the environment variables specified in the xRoad and courtClientOptions sections in environment.ts.

API

Running locally

You can serve this service locally by running:

yarn start judicial-system-api

You can enable communication with the court system via xRoad by providing appropriate values for the environment variables specified in the xRoad and courtClientOptions sections in environment.ts.

To get latest texts from Contentful you need to provide an appropriate value for the environment variable CONTENTFUL_ACCESS_TOKEN.

Graphql playground

Visit

localhost:3333/api/graphql

OpenApi and Swagger

Visit

localhost:3344/api/swagger

Database changes

Migrations need to be created by hand.

Web

A platform for the exchange of data, information, formal decisions and notifications between parties in the Icelandic judicial system.

Start the application locally

Start the backend locally. Instructions on how to do that can be found in the backend project.

Start the application

yarn start judicial-system-web

Then the project should be running on https://localhost:4200/.

To skip authentication at innskraning.island.is navigate to /api/auth/login?nationalId=<national_id> in the web project where <national_id> is the national id of a known user. Known users:

  • Áki Ákærandi

    • NationalId: 0000000009

    • Role: Prosecutor

  • Dalli Dómritari

    • NationalId: 0000001119

    • Role: Registrar

  • Dóra Dómari

    • NationalId: 0000002229

    • Role: Judge

Running the tests

yarn test judicial-system-web

Code owners and maintainers