This GitHub organization is the center of development for digital government services on
island.is. It is managed by the Digital Iceland department inside the Ministry of Finance and Economic Affairs.
These solutions are FOSS and open to contributions, but most development will be performed by teams that win tenders to develop new functionality for Digital Iceland.
The repository is a monorepo that has multiple apps (something that can be built and run) and libraries (which other apps and libraries can depend on). All custom-written services are also stored there.
To get more technical information about the project please make sure to read this overview.
If you want to contribute to the repository, please make sure to follow this guide.
You have Node installed
^14.17.0 and Yarn at
You have Docker installed.
You have direnv installed.
You have Java
>= 1.8 installed (for schema generation).
yarn to install the dependencies.
You have AWS command line tools v2 installed.
brew install awscli
You have jq installed.
brew install jq
There are many projects that can be built and run. Click here to see the full list.
For a dev server:
yarn start <project>
The app will automatically reload if you change any of the source files.
To build the project:
yarn build <project>
The build artifacts will be stored in the
dist/ directory. Use the
--prod flag for a production build.
You need to format all files to follow NX code conventions. To do so run:
yarn nx format:write
We have many lint rules to help having a unify code all over the project. To execute the linting:
yarn lint <project>
Running lint locally is slow and fill up heap memory. This is related to Typescript compilation and NX lint builder being slow. As a result you might get a
NODE_OPTIONS=“--max-old-space-size=4096” yarn lint <project>to raise the memory limit.
To execute the unit tests via Jest:
yarn test <project>
To execute the unit tests affected by a change:
To execute end-to-end tests via Cypress:
yarn e2e <project>-e2e
To execute the end-to-end tests affected by a change:
If your project is generating schemas files from an OpenAPI, Codegen or is an API, check out this documentation.
To see a diagram of the dependencies of your projects:
yarn nx dep-graph
A dedicated documentation about fetching shared development secrets or creating new secrets, using AWS secrets is available here.
If you have AWS access to our development account, you can connect to development databases and services using a proxy. We've set up a proxy and connection helpers for our development Postgres, Elastic Search, Redis and X-Road Security Server.
To do so, you can run for example:
It will try to get your AWS credentials from your environment variables and from your
~/.aws/credentials file. We're currently not able to get AWS credentials from an AWS profile configured using AWS SSO. You will need to visit your AWS account and export the credentials manually or add them to your
~/.aws/credentials file. You can find more instructions here.
To be able to access environment variables in purely static projects, you need to do the following:
In the index.html file, add
<!-- environment placeholder -->.
getStaticEnv function from the
library to fetch your environment variables.
Prefix your environment variables with
SI_PUBLIC_, for example
NOTE: This is only to get environment variables when running in kubernetes, not for when running locally. So you should only use
getStaticEnv in your
What happens behind the scenes is that static projects have a bash script that runs when the docker container starts up. This script searches for references of
SI_PUBLIC_* in the code and tries to find a match in the environment. It then puts all the matches inside the index.html which is then served to the client.