This repository provides an overview over the flagship product Diia developed by the Ministry of Digital Transformation of Ukraine.
Diia is an app with access to citizen’s digital documents and government services.
The application was created so that Ukrainians could interact with the state in a few clicks, without spending their time on queues and paperwork - Diia open source application will help countries, companies and communities build a foundation for long-term relationships. At the heart of these relations are openness, efficiency and humanity.
We're pleased to share the Diia project with you.
Topic | Link | Description |
---|---|---|
Ministry of Digital Transformation of Ukraine | https://thedigital.gov.ua/ | The Official homepage of the Ministry of Digital Transformation of Ukraine |
Diia App | https://diia.gov.ua/ | The Official website for the Diia application |
This repository contains the service which provides authorization functionality with different strategies for the application.
Example:
git clone https://github.com/diia-open-source/be-auth-service.git auth-service
cd ./auth-service
The installation of dependencies consists of the following 2 steps:
Each Diia service depends on dependencies from @diia-inhouse/<package>
scope which are distributed across different repositories, are built separately, and aren't published into public npm registry.
The full list of such dependencies can be found in the target service package.json
file in dependencies
and devDependencies
sections respectively.
Detailed instructions on how to link dependencies from @diia-inhouse/<package>
scope can be found in LINKDEPS.md
In order to install and use the linked dependencies for auth-service
the following command can be used:
$ cd ./auth-service
$ npm link @diia-inhouse/db @diia-inhouse/redis ... @diia-inhouse/<package-name>
In case all dependencies from @diia-inhouse
scope are linked, and can be resolved, you will then have a complete list of dependencies installed for the service code base.
In order to build the service you have to run the command npm run build
inside the root directory of service code base as per:
$ cd ./auth-service
$ npm run build
$ cd ./auth-service
$ mkdir -p secrets && openssl genrsa 4096 > secrets/fld-config.key
In order to run the service locally you need to setup a Docker ecosystem (which runs required services such as Redis, MongoDB etc.), then create a suitable environment file .env
, run database migrations (if required) and finally run the service itself in desired mode.
The following walks through these stages step by step...
See how to run ecosystem.
In order to create a proper .env
file to populate the node process environment you can copy it from .env.example
such as:
$ cd ./auth-service
$ cp .env.example .env
In some services there is requirement to create MongoDB schemas before running these in order to make them functional. If the service has migrate
script inside package.json
then it definitely must be executed.
$ npm run migrate up
Main execution file is located ./dist/index.js
$ node ./dist/index.js
The Diia project welcomes contributions into this solution; please refer to the CONTRIBUTING.md file for details
Copyright (C) Diia and all other contributors.
Licensed under the EUPL (the "License"); you may not use this file except in compliance with the License. Re-use is permitted, although not encouraged, under the EUPL, with the exception of source files that contain a different license.
You may obtain a copy of the License at https://joinup.ec.europa.eu/collection/eupl/eupl-text-eupl-12.
Questions regarding the Diia project, the License and any re-use should be directed to modt.opensource@thedigital.gov.ua.
This project incorporates third party material. In all cases the original copyright notices and the license under which these third party dependencies were provided remains as so. In relation to the Typescript dependency you should also review the Typescript Third Party Notices.