This package has been deprecated

Author message:

Package no longer supported. Contact Support at https://www.npmjs.com/support for more info.

@digital-blueprint/greenlight-app

1.2.3 • Public • Published

Greenlight Application

GitHub Repository | npmjs package | Unpkg CDN | Greenlight Bundle | Project documentation

Build and Test

Creates an entrance ticket and imports your evidence of a low epidemiological risk on the working device to validate it for admission even before attending a course or exam. The ticket then enables you to access the university premises quickly and efficiently.

Prerequisites

Local development

# get the source
git clone git@github.com:digital-blueprint/greenlight-frontend.git
cd greenlight
git submodule update --init

# install dependencies
yarn install

# constantly build dist/bundle.js and run a local web-server on port 8001 
yarn run watch

# run tests
yarn test

Jump to https://localhost:8001, and you should get a Single Sign On login page.

Using this app as pre-built package

Install app

If you want to install the dbp greenlight app in a new folder greenlight-app you can call:

npx @digital-blueprint/cli@latest install-app greenlight greenlight-app /

Warning: There may be issues when you run these commands as root user, best use a non-root user, like www-data. To do this you can for example open a shell with runuser -u www-data -- bash.

Afterwards you can point your Apache web-server to greenlight-app/public.

Make sure you are allowing .htaccess files in your Apache configuration.

Also make sure to add all of your resources you are using (like your API and Keycloak servers) to the Content-Security-Policy in your greenlight-app/public/.htaccess, so the browser allows access to those sites.

You can also use this app directly from the Unpkg CDN for example like this: dbp-greenlight/index.html

Note that you will need a Keycloak server along with a client id for the domain you are running this html on.

Update app

If you want to update the dbp greenlight app in the current folder you can call:

npx @digital-blueprint/cli@latest update-app greenlight

Warning: After the update the trust data has to be restored, see below.

Warning: There may be issues when you run these commands as root user, best use a non-root user, like www-data. To do this you can for example open a shell with runuser -u www-data -- bash.

Cron job for Updating the Trust Data

The app depends on the official trust list, value sets and business rules which are provided via https://github.com/Federal-Ministry-of-Health-AT/green-pass-overview

In addition it depends on a set of business rules which are maintained at https://github.com/digital-blueprint/dcc-at-rule-sets

Both data sets need to be updated regularly via a cron job.

0    *    *    *    *     /<my-path>/greenlight-app/public/app/update.sh TUGRAZ

The first argument passed to update.sh defines the rule set which should be downloaded. The script depends on curl being installed.

You will find the certificates downloaded in /<my-path>/greenlight-app/public/app/local/@digital-blueprint/greenlight-app/dgc-trust/prod.

NOTE: Failing to update the data will result in signatures expiring after 2 days which breaks the core functionality of the app.

Activities

This app has the following activities:

  • dbp-acquire-3g-ticket
  • dbp-show-active-tickets
  • dbp-show-reference-ticket

You can find the documentation of these activities in the greenlight activities documentation.

Adapt app

Functionality

You can add multiple attributes to the <dbp-greenlight> tag.

attribute name value Link to description
provider-root Boolean app-shell
lang String language-select
entry-point-url String app-shell
keycloak-config Object app-shell
base-path String app-shell
src String app-shell
html-overrides String common
themes Array theme-switcher
darkModeThemeOverride String theme-switcher
gp-search-hash-string String greenlight activities
gp-search-self-test-string-array String greenlight activities
gp-self-test-valid Boolean greenlight activities
ticket-types Object greenlight activities
show-preselected Boolean greenlight activities
preselected-option String greenlight activities
file-handling-enabled-targets String file-handling
nextcloud-web-app-password-url String file-handling
nextcloud-web-dav-url String file-handling
nextcloud-file-url String file-handling
nextcloud-auth-info String file-handling
nextcloud-name String file-handling

Mandatory attributes

If you are not using the provider-root attribute to "terminate" all provider attributes you need to manually add these attributes so that the topic will work properly:

<dbp-greenlight
    auth
    requested-login-status
    analytics-event
>
</dbp-greenlight>

Design

For frontend design customizations, such as logo, colors, font, favicon, and more, take a look at the theming documentation.

"dbp-greenlight" slots

These are common slots for the app-shell. You can find the documentation of these slots in the app-shell documentation. For the app specific slots take a look at the greenlight activities.

Readme

Keywords

none

Package Sidebar

Install

npm i @digital-blueprint/greenlight-app

Weekly Downloads

21

Version

1.2.3

License

LGPL-2.1-or-later

Unpacked Size

41.7 MB

Total Files

914

Last publish

Collaborators

  • dbp-deploy
  • pbek