Skip to content

SvanBoxel/nl-covid19-notification-app-backend

 
 

COVID-19 Notification App - Backend

Introduction

This repository contains the backend code for the Dutch exposure notification app.

Development & Contribution process

The core team works on the repository in a private fork (for reasons of compliance with existing processes) and will share its work as often as possible.

If you plan to make non-trivial changes, we recommend to open an issue beforehand where we can discuss your planned changes. This increases the chance that we might be able to use your contribution (or it avoids doing work if there are reasons why we wouldn't be able to use it).

Running a standalone server

Local development support is provided for all platforms - Windows, macOS, Linux - by ServerStandAlone - a .NET Core MVC Web App, and the command line apps in the Data Utilities folder.

Development Tools

  • Visual Studio 2019 (or Rider)
  • Your choice of SQL Server instances
  • Or quickstart: only Docker

Docker – to quickstart local app development

To quickly start a local Standalone development environment for app testing purposes you can use of the docker-compose file:

# Solution root
cd docker
docker-compose up --build

Please be aware of the 'quickstart development'-only semi-secrets in docker/**/*, the Docker configuration has no intentions to be used in publicly available testing, acceptation or production environments.

Supporting local mobile app development

First make sure that you have the following installed:

  1. Dotnet Core 3.1 SDK: https://dotnet.microsoft.com/download/dotnet-core/3.1
  2. Node JS 12.18.1+ with NPM: https://nodejs.org/en/
  3. Yarn: https://yarnpkg.com/
  4. Angular CLI: https://angular.io/guide/setup-local
  5. Optionally either Visual Studio or Rider.
  6. A terminal is recommended, if you're running an older windows then https://cmder.net/ is useful. You need gitbash.

Then clone this repo.

Standalone

  1. Setup a database instance. Windows users can use a local SQL Server.
  2. Add an appsettings.Development.json file. This overrides the settings in appsettings.json. And add a value for the MSS connection string.
  3. Go to the ServerStandAlone folder and run it with 'dotnet run'.

ICC Portal

The ICC Portal consists of a .Net Core backend found under IccBackend and an Angular / ASP.Net MVC Core frontend found under ICCPortal

ICC Portal backend

  1. Setup a database instance. Windows users can use a local SQL Server.
  2. Add an appsettings.Development.json file to the folder IccBackend. This overrides the settings in appsettings.json. And add a value for the MSS connection string.
  3. Go to the \IccBackend folder and run it with dotnet run, this will start the backend in Kestrel.
  4. Access the APIs here: http://localhost:5000/swagger/index.html.
  5. To provision the database you must execute ​/devops​/nukeandpavedb in Swagger.
  6. Done :)

ICC Portal frontend

  1. Clone this repo
  2. Open a terminal and go to \ICCPortal\ClientApp.
  3. Run yarn to install all of the dependencies.
  4. Run the frontend with ng serve.
  5. The server API url can be configured in ICCPortal\ClientApp\src\environments\environment.ts
  6. Done :)

Building and packaging

The build and package pipeline for this project is implemented as a set of batch scripts. These scripts can be executed on a development machine without arguments or via a build server (Jenkins, Azure Devops) without the need to lock-in the build process to one specific vendor. This should also make it easier to build older versions of the server because all of the logic required to build is committed to version control.

To run the scripts you must have following installed and accessible in your path:

  • 7zip

Here is an overview of our scripts:

Name Description
build.bat Builds all of the project in release mode
and publishes packages into the folder
publish in the root of the solution.
package.bat Packages the published files as zip
archives and puts them in publish.

Attribution

Some parts of this application are inspired by the work on Private Tracer. You can find their license here.

About

No description, website, or topics provided.

Resources

License

EUPL-1.2, Unknown licenses found

Licenses found

EUPL-1.2
LICENSE.txt
Unknown
LICENSE.pdf

Code of conduct

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C# 80.3%
  • JavaScript 7.6%
  • TypeScript 4.3%
  • TSQL 2.9%
  • PowerShell 2.7%
  • HTML 1.2%
  • Other 1.0%