{"id":18724667,"url":"https://github.com/digital-blueprint/greenlight-app","last_synced_at":"2025-04-12T16:31:51.666Z","repository":{"id":65425022,"uuid":"587293962","full_name":"digital-blueprint/greenlight-app","owner":"digital-blueprint","description":"Greenlight Application","archived":true,"fork":false,"pushed_at":"2023-11-30T11:01:08.000Z","size":9421,"stargazers_count":3,"open_issues_count":4,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-05T02:42:15.936Z","etag":null,"topics":["covid19","dbp","dbp-greenlight","digital-blueprint"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"lgpl-2.1","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/digital-blueprint.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2023-01-10T12:21:31.000Z","updated_at":"2024-05-22T14:59:46.000Z","dependencies_parsed_at":"2023-02-13T21:16:22.827Z","dependency_job_id":"bcf399d4-89c0-45e6-93a4-43190a376d3d","html_url":"https://github.com/digital-blueprint/greenlight-app","commit_stats":{"total_commits":801,"total_committers":9,"mean_commits":89.0,"dds":0.682896379525593,"last_synced_commit":"02617bc3c8c21334b0c9cf5693ab71b83ea81284"},"previous_names":["digital-blueprint/greenlight-frontend"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fgreenlight-app","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fgreenlight-app/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fgreenlight-app/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/digital-blueprint%2Fgreenlight-app/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/digital-blueprint","download_url":"https://codeload.github.com/digital-blueprint/greenlight-app/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248596559,"owners_count":21130718,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["covid19","dbp","dbp-greenlight","digital-blueprint"],"created_at":"2024-11-07T14:07:27.577Z","updated_at":"2025-04-12T16:31:50.351Z","avatar_url":"https://github.com/digital-blueprint.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Greenlight Application\n\n[GitHub Repository](https://github.com/digital-blueprint/greenlight-app) |\n[npmjs package](https://www.npmjs.com/package/@digital-blueprint/greenlight-app) |\n[Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/greenlight-app/) |\n[Greenlight Bundle](https://gitlab.tugraz.at/dbp/greenlight/dbp-relay-greenlight-bundle) |\n[Project documentation](https://dbp-demo.tugraz.at/site/software/greenlight.html)\n\n[![Build and Test](https://github.com/digital-blueprint/greenlight-app/actions/workflows/build-test-publish.yml/badge.svg)](https://github.com/digital-blueprint/greenlight-app/actions/workflows/build-test-publish.yml)\n\n**Note:** This project depends on the DCC infrastructure of the Austrian\nGovernment. Since the DCC infrastructure is [no longer available since June\n2023](https://github.com/Federal-Ministry-of-Health-AT/green-pass-overview/issues/11#issuecomment-1617997232),\nthis project is no longer actively maintained.\n\nCreates 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.\nThe ticket then enables you to access the university premises quickly and efficiently.\n\n![Screenshot](./screenshot.png)\n\n## Prerequisites\n\n- You need the [API server](https://gitlab.tugraz.at/dbp/relay/dbp-relay-server-template) running\n- You need the [DbpRelayGreenlightBundle](https://gitlab.tugraz.at/dbp/greenlight/dbp-relay-greenlight-bundle) to create permits for the Covid19 certificate evaluation process\n- For more information please visit the [Greenlight project documentation](https://dbp-demo.tugraz.at/site/software/greenlight.html)\n\n## Local development\n\n```bash\n# get the source\ngit clone git@github.com:digital-blueprint/greenlight-frontend.git\ncd greenlight\ngit submodule update --init\n\n# install dependencies\nnpm install\n\n# constantly build dist/bundle.js and run a local web-server on port 8001 \nnpm run watch\n\n# constantly build dist/bundle.js and run a local web-server on port 8001 using a custom assets directory assets_custom/\nnpm run watch-custom\n\n# run tests\nnpm test\n```\n\nJump to \u003chttps://localhost:8001\u003e, and you should get a Single Sign On login page.\n\nTo enable building with custom assets, you need to provide your custom assets in the directory `assets_custom/greenlight-app/assets/`. If you want to, you can also change this path in the file `rollup.config.js`. For more information, please visit the [dbp handbook page on custom assets](https://handbook.digital-blueprint.org/frameworks/frontend/dev/assets/#custom-assets).\n\n## Using this app as pre-built package\n\n### Install app\n\nIf you want to install the dbp greenlight app in a new folder `greenlight-app` you can call:\n\n```bash\nnpx @digital-blueprint/cli@latest install-app greenlight greenlight-app /\n```\n\n**Warning:** There may be issues when you run these commands as root user, best use a non-root user, like `www-data`.\nTo do this you can for example open a shell with `runuser -u www-data -- bash`.\n\nAfterwards you can point your Apache web-server to `greenlight-app/public`.\n\nMake sure you are allowing `.htaccess` files in your Apache configuration.\n\nAlso make sure to add all of your resources you are using (like your API and Keycloak servers) to the\n`Content-Security-Policy` in your `greenlight-app/public/.htaccess`, so the browser allows access to those sites.\n\nYou can also use this app directly from the [Unpkg CDN](https://unpkg.com/browse/@digital-blueprint/greenlight-app/)\nfor example like this: [dbp-greenlight/index.html](https://github.com/digital-blueprint/greenlight-app/tree/main/examples/dbp-greenlight/index.html)\n\nNote that you will need a Keycloak server along with a client id for the domain you are running this html on.\n\n### Update app\n\nIf you want to update the dbp greenlight app in the current folder you can call:\n\n```bash\nnpx @digital-blueprint/cli@latest update-app greenlight\n```\n\n**Warning:** After the update the trust data has to be restored, see below.\n\n**Warning:** There may be issues when you run these commands as root user, best use a non-root user, like `www-data`.\nTo do this you can for example open a shell with `runuser -u www-data -- bash`.\n\n## Cron job for Updating the Trust Data\n\nThe app depends on the official trust list, value sets and business rules which\nare provided via\nhttps://github.com/Federal-Ministry-of-Health-AT/green-pass-overview\n\nIn addition it depends on a set of business rules which are maintained at\nhttps://github.com/digital-blueprint/dcc-at-rule-sets\n\nBoth data sets need to be updated regularly via a cron job.\n\n```\n0    *    *    *    *     /\u003cmy-path\u003e/greenlight-app/public/app/update.sh TUGRAZ\n```\n\nThe first argument passed to update.sh defines the rule set which should be\ndownloaded. The script depends on `curl` being installed.\n\nYou will find the certificates downloaded in `/\u003cmy-path\u003e/greenlight-app/public/app/local/@digital-blueprint/greenlight-app/dgc-trust/prod`.\n\nNOTE: Failing to update the data will result in signatures expiring after 2 days\nwhich breaks the core functionality of the app.\n\n## Activities\n\nThis app has the following activities:\n- `dbp-acquire-3g-ticket`\n- `dbp-show-active-tickets`\n- `dbp-show-reference-ticket`\n\nYou can find the documentation of these activities in the [greenlight activities documentation](https://github.com/digital-blueprint/greenlight-app/tree/main/src).\n\n## Adapt app\n\n### Functionality\n\nYou can add multiple attributes to the `\u003cdbp-greenlight\u003e` tag.\n\n| attribute name | value | Link to description |\n|----------------|-------| ------------|\n| `provider-root` | Boolean | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `lang`         | String | [language-select](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/language-select#attributes) | \n| `entry-point-url` | String | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `keycloak-config` | Object | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `base-path` | String | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `src` | String | [app-shell](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell#attributes) |\n| `html-overrides` | String | [common](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/common#overriding-slots-in-nested-web-components) |\n| `themes` | Array | [theme-switcher](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/theme-switcher#themes-attribute) |\n| `darkModeThemeOverride` | String | [theme-switcher](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/theme-switcher#themes-attribute) |\n| `gp-search-hash-string` | String | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |\n| `gp-search-self-test-string-array` | String | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |\n| `gp-self-test-valid` | Boolean | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |\n| `ticket-types` | Object | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src#shared-attributes) |\n| `show-preselected` | Boolean | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |\n| `preselected-option` | String | [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src) |\n| `file-handling-enabled-targets` | String | [file-handling](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling#attributes) |\n| `nextcloud-web-app-password-url` | String | [file-handling](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling#attributes) |\n| `nextcloud-web-dav-url` | String | [file-handling](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling#attributes) |\n| `nextcloud-file-url` | String | [file-handling](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling#attributes) |\n| `nextcloud-auth-info` | String | [file-handling](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling#attributes) |\n| `nextcloud-name` | String | [file-handling](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/file-handling#attributes) |\n\n#### Mandatory attributes\n\nIf you are not using the `provider-root` attribute to \"terminate\" all provider attributes\nyou need to manually add these attributes so that the topic will work properly:\n\n```html\n\u003cdbp-greenlight\n    auth\n    requested-login-status\n    analytics-event\n\u003e\n\u003c/dbp-greenlight\u003e\n```\n\n### Design\n\nFor frontend design customizations, such as logo, colors, font, favicon, and more, take a look at the [theming documentation](https://dbp-demo.tugraz.at/dev-guide/frontend/theming/).\n\n## \"dbp-greenlight\" slots\n\nThese are common slots for the app-shell. You can find the documentation of these slots in the [app-shell documentation](https://gitlab.tugraz.at/dbp/web-components/toolkit/-/tree/master/packages/app-shell).\nFor the app specific slots take a look at the [greenlight activities](https://github.com/digital-blueprint/greenlight-app/tree/main/src).\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-blueprint%2Fgreenlight-app","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdigital-blueprint%2Fgreenlight-app","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdigital-blueprint%2Fgreenlight-app/lists"}