• This repository has been archived on 24/Jun/2022
  • Stars
    star
    889
  • Rank 51,338 (Top 2 %)
  • Language
    TypeScript
  • License
    Apache License 2.0
  • Created over 4 years ago
  • Updated over 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Exposure notification client application / Application client de notification d'exposition

La version française suit.

COVID Alert is now retired: For more information, visit the Government of Canada COVID Alert home page.

COVID Alert Mobile App

Lint + Typscript

Available for iOS and Android:

Download on the App Store Get it on Google Play

Pour iOS et Android:

Télécharger dans l'App Store Disponible sur Google Play

Adapted from https://github.com/CovidShield/mobile (upstream)

This repository implements a React Native client application for Apple/Google's Exposure Notification framework, informed by the guidance provided by Canada's Privacy Commissioners.

Overview

This app is built using React Native and designed to work well with patterns on both Android and iOS devices. It works alongside the COVID Alert Diagnosis Server & COVID Alert Portal.

Local development

Prerequisites

Follow the steps outlined in React Native Development Environment Setup to make sure you have the proper tools installed.

Node

iOS

Android

  • Android device with the ability to run the latest version of Google Play Services or Google Play Services Beta. Sign up for beta program here https://developers.google.com/android/guides/beta-program.
  • You also need a safelisted APPLICATION_ID that will be used to publish to Google Play. You could use APPLICATION_ID from Google Sample App for testing purposes "com.google.android.apps.exposurenotification". Go to Environment config to see how to change APPLICATION_ID.

1. Check out the repository

git clone [email protected]:cds-snc/covid-shield-mobile.git

2. Install dependencies

yarn install
2.1 Additional step for iOS
2.1.1 Install Cocoapods
sudo gem install cocoapods
2.1.2 Install pods
bundle install && yarn pod-install

3. Environment config

Check .env and adjust configuration if necessary. See react-native-config for more information.

Ex:

ENVFILE=.env.production yarn run-ios
ENVFILE=.env.production yarn run-android

4. Start app in development mode

You can now launch the app using the following commands for both iOS and Android.

yarn run-ios
yarn run-android

You can also build the app with native development tool:

  • For iOS, using Xcode by opening the CovidShield.xcworkspace file in the ios folder.
  • For Android, using Android Studio by opening android folder.

Development mode

When the app is running in development mode, you can tap on the COVID Alert logo at the top of the app to open the Test menu. This menu enables you to:

  • Put the app into test mode to bypass the Exposure Notification API check
  • Change the system status
  • Change the exposure status
  • Send a sample notification
  • Reset the app to onboarding state

Note that: Test menu is enabled if the environment config file (.env*) has TEST_MODE=true. To disable test mode UI on production build, simply set it to false in the environment config file TEST_MODE=false.

Customization

You can customize the look and feel of the app largely by editing values found in the Theme File.

Localization

The COVID Alert app is available in French and English. Fully localized content can be modified by editing translations files found in the translations directory. More translations can be added by using the same mechanism as French and English.

After modifying the content you must run the generate-translations command in order for the app to reflect your changes.

yarn generate-translations

Note: For regional content please see updating regional content

Add new translation

  1. Create a new i18n file in src/locale/translations/.
  2. Add the new option pt in translations.js.
  3. Regenerate the translations yarn generate-translations.
  4. Add the new option in src/components/LanguageToggle.tsx.
  5. Add the new option in src/screens/language/Language.tsx.
  6. Add the new option in Xcode Localizations settings (Project -> CovidShield -> Info tab -> Localizations) and make sure Launch Screen.storyboard is checked.

Testing

Who built COVID Alert?

COVID Alert was originally developed by volunteers at Shopify. It was released free of charge under a flexible open-source license.

This repository is being developed by the Canadian Digital Service. We can be reached at [email protected].

Troubleshooting

[Android] Problem with debug.keystore during run Android version

Logs

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/YOUR_USER/.android/debug.keystore": keystore password was incorrect

Generate a new debug.keystore:

cd android/app
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

Copy your debug.keystore to ~/.android/debug.keystore:

cd android/app
cp debug.keystore ~/.android/debug.keystore

Now you can run yarn run-android in your root folder.

[MacOS] Problem installing Cocoapods

When following step 2.1.1 Install Cocoapods if you receive an error that looks like the following (Please Note: Error message will not be identical but simliar):

ERROR:  Loading command: install (LoadError)
  dlopen(/Users/$home/ruby/2.6.5/x86_64-darwin18/openssl.bundle, 9): Library not loaded: /usr/local/opt/openssl/lib/libssl.1.0.0.dylib
  Referenced from: /Users/$home/ruby/2.6.5/x86_64-darwin18/openssl.bundle
ERROR:  While executing gem ... (NoMethodError)

This is because the version of Ruby you have installed does not have OpenSSL included.

You can fix this error by installing Ruby Version Manager (if you do not already have it), and reinstalling the version of Ruby required with OpenSSL using the following steps:

  1. Install RVM following the instructions here: https://rvm.io/
  2. Run the following command to install the version of Ruby needed with OpenSSL included, this will take a few minutes so be patient.
rvm reinstall 2.6.5 --with-openssl-dir=/usr/local/opt/openssl

You should now be able to install cocoapods and gem commands should now work.


Application mobile Alerte COVID

Alerte COVID a été mis hors service. Pour en savoir davantage, visitez la page d'accueil d’Alerte COVID du gouvernement du Canada.

Lint + Typscript

Adapté de https://github.com/CovidShield/mobile (voir les modifications)

Ce dépôt met en œuvre une application client React Native pour le cadriciel Notification d’exposition d’Apple/Google, éclairé par l’orientation fournie par le commissaire à la protection de la vie privée du Canada.

Aperçu

Cette application est construite à l’aide de React Native et est conçue pour bien fonctionner avec des modèles sur les appareils Android et iOS. Elle fonctionne de concert avec le Serveur de diagnostic Alerte COVID & Portail Alerte COVID.

Développement local

Conditions préalables

Suivez les étapes décrites dans Configuration de l’environnement de développement React Native pour vous assurer que les outils appropriés sont installés.

Node

iOS

  • XCode 11.5 ou supérieur
  • appareil ou simulateur iOS avec iOS 13.5 ou plus récent
  • Bundler pour installer la bonne version de CocoaPods localement
  • Vous avez également besoin d’un profil de provisionnement avec le droit de notification d’exposition. Pour obtenir de plus amples renseignements, visitez https://developer.apple.com/documentation/exposurenotification.

Android

  • Appareil Android pouvant exécuter la dernière version de Google Play Services ou Google Play Services Beta. Inscrivez-vous au programme bêta ici https://developers.google.com/android/guides/beta-program.
  • Vous avez également besoin d’un APPLICATION_ID protégé qui sera utilisé pour publier dans Google Play. Vous pouvez utiliser l’APPLICATION_ID de Google Sample App à des fins d’essai « com.google.android.apps.exposurenotification ». Aller à Environment config pour voir comment modifier l’APPLICATION_ID.

1. Consulter le dépôt

git clone [email protected]:cds-snc/covid-shield-mobile.git

2. Installer les dépendances :

yarn install
2.1 Étape supplémentaire pour iOS
2.1.1 Installer Cocoapods
sudo gem install cocoapods
2.1.2 Installer les modules
bundle install && yarn pod-install

3. Configuration environnement

Cocher .env et rajuster la configuration si nécessaire. Voir react-native-config pour plus d’information.

Exemple :

ENVFILE=.env.production yarn run-ios
ENVFILE=.env.production yarn run-android

4. Démarrer l’application en mode développement

Vous pouvez maintenant lancer l’application à l’aide des commandes suivantes pour iOS et Android :

yarn run-ios
yarn run-android

Vous pouvez également construire l’application avec un outil de développement natif :

  • Pour iOS, utilisez XCode en ouvrant le fichier CovidShield.xcworkspace dans le dossier « ios ».
  • Pour Android, utilisez Android Studio en ouvrant le dossier android.

Mode de développement

Lorsque l’application est en mode de développement, vous pouvez appuyer sur le logo Alerte COVID en haut de l’application pour ouvrir le menu Test. Ce menu vous permet de :

  • Mettre l’application en mode test pour contourner le contrôle de l’API de notification d’exposition
  • Modifier l’état du système
  • Modifier le statut d’exposition
  • Envoyer un exemple de notification
  • Réinitialiser l’application à l’état d’intégration

Remarque : Le menu de test est activé si le fichier de configuration de l’environnement (.env*) montre « TEST_MODE=true ». Pour désactiver l’interface utilisateur du mode test en production, il suffit de la définir comme False dans le fichier de configuration d’environnement « TEST_MODE=false ».

Personnalisation

Vous pouvez personnaliser l’apparence de l’application en grande partie en modifiant les valeurs du Theme File.

Localisation

L’application Alerte COVID est disponible en français et en anglais. Le contenu entièrement localisé peut être modifié en modifiant les fichiers de traduction qui se trouvent dans le répertoire des traductions. On peut ajouter plus de traductions en utilisant le même mécanisme pour le français et l’anglais.

Après avoir modifié le contenu, vous devez exécuter la commande generate-translations pour que l’application reflète vos modifications.

yarn generate-translations

Ajouter une nouvelle traduction

  1. Créer un nouveau fichier i18n dans src/local/translations/.
  2. Ajouter la nouvelle option pt dans translations.js.
  3. Régénérer les traductions yarn generate-translations.
  4. Ajouter la nouvelle option dans src/components/Languagetoggle.tsx.
  5. Ajouter la nouvelle option dans src/screens/language/Language.tsx.
  6. Ajouter la nouvelle option dans les paramètres Xcode Localizations (Project -> CovidShield -> onglet Info -> Localizations) et assurez-vous que Launch Screen.storyboard est coché.

Qui a conçu Alerte COVID?

Alerte COVID a été développé à l’origine par des bénévoles de Shopify. Il a été diffusé gratuitement en vertu d’une licence ouverte flexible.

Ce dépôt est maintenu par le Service numérique canadien. Vous pouvez nous joindre à [email protected].

Résolution de problèmes

[Android] Problème avec debug.keystore pendant l’exécution de la version Android

Journaux

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':app:packageDebug'.
> A failure occurred while executing com.android.build.gradle.internal.tasks.Workers$ActionFacade
   > com.android.ide.common.signing.KeytoolException: Failed to read key AndroidDebugKey from store "/Users/YOUR_USER/.android/debug.keystore": keystore password was incorrect

Créer un nouveau debug.keystore :

cd android/app
keytool -genkey -v -keystore debug.keystore -storepass android -alias androiddebugkey -keypass android -keyalg RSA -keysize 2048 -validity 10000

Copiez votre debug.keystore sur ~/.android/debug.keystore :

cd android/app
cp debug.keystore ~/.android/debug.keystore

Vous pouvez maintenant exécuter yarn run-android dans votre dossier racine.

More Repositories

1

covid-alert-server

Exposure Notification: Diagnosis Server implementation / Notification d’exposition : Mise en œuvre du serveur de diagnostic
Go
297
star
2

bundle-size-tracker

Serverless bundle size tracking over time / Suivi continu et sans serveur des tailles de paquets
JavaScript
71
star
3

github-actions

Repository for CDS specific GitHub actions
JavaScript
65
star
4

notification-api

GC Notify API | GC Notification API
Python
51
star
5

digital-canada-ca

Website for the Canadian Digital Service / Site Web du Service numérique canadien
JavaScript
49
star
6

terraform-plan

GitHub Action to run Terraform plan and add a comment with the changes.
JavaScript
48
star
7

covid-alert-portal

COVID Alert Portal for healthcare providers | Portail Alerte COVID pour les professionnels de la santé
Python
44
star
8

gcds-components

GC Design System Components is a monorepo managing the web components of the GC Design System. | « GC Design System Components » (Composants de Système de design GC) est un référentiel unique qui gère les composants Web de Système de design GC.
TypeScript
37
star
9

report-a-cybercrime

Report a computer crime or scam / Signaler un crime informatique ou une fraude
JavaScript
28
star
10

ircc-rescheduler

🙅🗓
JavaScript
25
star
11

security-goals

🦑 Security Goals - Automatic compliance reporting for Kubernetes / Rapport de conformité automatique pour Kubernetes
JavaScript
24
star
12

platform-forms-client

NextJS application that serves the public-facing website for Forms
TypeScript
23
star
13

kubernetes-branch-review

🚟 Review clusters of GitHub pull requests / Examen des groupes de demandes de tirage de GitHub
TypeScript
21
star
14

covid-alert-server-staging-terraform

HCL
19
star
15

notification-admin

Notification Admin
Python
19
star
16

forms-terraform

Infrastructure as Code for the GC Forms environment
HCL
15
star
17

dns

DNS Configuration for domains managed by CDS
HCL
14
star
18

terraform-modules

Terraform modules for AWS
HCL
14
star
19

tracker

Check whether a Government of Canada domain is adhering to best security practices.
Python
12
star
20

scan-websites

On-demand scanning of websites for accessibility and security vulnerabilities/compliance / Analyse à la demande des sites Web pour les vulnérabilités/conformité en matière d'accessibilité et de sécurité
Python
12
star
21

notification-terraform

Terraform for notification.canada.ca
HCL
11
star
22

track-web

Check whether a Government of Canada domain is adhering to best security practices.
HTML
11
star
23

threat-modeling-tool

CDS Threat Modeling Tool MVP
TypeScript
11
star
24

design-research-handbook

CDS design research team handbook / Guide de recherche en conception du SNC
CSS
10
star
25

laptop

A shell script which turns your Mac into an awesome web development machine.
Shell
10
star
26

gcui

GC UI components for the some previous systems...
JavaScript
9
star
27

talent

CDS talent team handbook / Guide de talent du SNC
CSS
7
star
28

cds-website-terraform

Terraform for Website infrastructure (Strapi)
HCL
7
star
29

gc-articles

This repo is for GC Articles web publishing product undertaken by CDS platform August 2021
PHP
7
star
30

covid-alert-documentation

Supporting documentation for COVID Alert / Documentation à l’appui de l’application Alerte COVID
7
star
31

ipv4-geolocate-webservice

The purpose of this webservice is to translate IP v4 (ex. 23.233.63.149) into a geographic location.
Rust
6
star
32

sre-bot

Slack bot for site reliability engineering
Python
6
star
33

cra-alpha

📬💵
JavaScript
6
star
34

pulse

Archived: [Project has been split out into two components, @ https://github.com/cds-snc/tracker and https://github.com/cds-snc/track-web ] Check whether a Government of Canada domain is adhering to best security practices.
CSS
6
star
35

accessibility-handbook

CDS Accessibility Handbook ♿
SCSS
6
star
36

site-reliability-engineering-public

Public releases of CDS site reliability engineering practices
5
star
37

secret

Share Secrets securily
Python
5
star
38

notification-planning

Project planning for GC Notify Team
5
star
39

simplify-privacy-statements-V2

starter-app repo based version of privacy app.
Nunjucks
5
star
40

exploration-documentation

5
star
41

automatic-website-scanning

Runs automatic scanning tools against CDS website properties
5
star
42

node-starter-app

Quick start application setup.... because you have to start somewhere.
JavaScript
5
star
43

design-gc-conception

4
star
44

list-manager

CDS list manager
Python
4
star
45

notification-documentation

Documentation website for GC Notify | Documentation de GC Notification
Vue
4
star
46

cra-claim-tax-benefits

A benefit signup prototype by the Canadian Digital Service
JavaScript
4
star
47

covid-alert-metrics-terraform

HCL
4
star
48

url-shortener

An API written in Python that shortens URLs
Python
4
star
49

e-briefing-service

Backend service to the e-briefing mobile app
PHP
4
star
50

pii-checker

Personal identifiable information checking
JavaScript
4
star
51

gcds-docs

GC Design System Docs is a documentation website for GC Design System. | Docs de Système de design GC est un site Web contenant de la documentation portant sur Système de design GC.
JavaScript
4
star
52

share-files-securely

PoC Sharing file securely
CSS
4
star
53

notification-manifests

Kubernetes manifest files for notification.canada.ca | Configuration Kubernetes pour notification.canada.ca
Go
4
star
54

status-statut

Status page for CDS products / Page de statut pour les produits du SNC
Markdown
4
star
55

cds-aws-lz

HCL
4
star
56

technical-playbook-manuel-technique

CDS Technical Playbook - Manuel Technique SNC
SCSS
4
star
57

gc-simple-dictionary

A simple web page with an autocomplete feature to lookup all the acronyms you can stumble on at the Government of Canada
JavaScript
4
star
58

dependency-checker

Makes recommendations about the Node dependencies in your code
JavaScript
3
star
59

scan-files

File scanning for CDS Platform products
Python
3
star
60

notification-utils

Notification Utils
Python
3
star
61

docs

Documentation Repository
3
star
62

common-assets

A repository for common assets that are used by CDS-SNC
3
star
63

resources-ressources

Learning Resources / Ressources d'apprentissage
Vue
3
star
64

terraform-demo

Terraform 101 Workshop Docs + Boilerplate
HCL
3
star
65

a11y-tracker

A web app for collecting and visualizing axe scan result data
JavaScript
3
star
66

covid-alert-data

Open data reported by the COVID Alert system, in CSV format / Données ouvertes recueillies par le système Alerte COVID, au format CSV
3
star
67

hello-esdc

C#
3
star
68

smtp-proxy-for-notify

SMTP proxy for Notify
Go
3
star
69

security-tools

This repository will contain various tools used by CDS to ensure the confidentiality, integrity and availability of CDS applications and services
HCL
3
star
70

cppd-medical-report-sails

IN EARLY DEVELOPMENT - Online form for Medical Report for Canada Pension Plan Disability (CPPD). Form ISP-2519. | Prototype en évolution - Formulaire en ligne du rapport médical pour une prestation d'invalidité du Régime de pensions du Canada (RPC). Formulaire ISP-2519.
JavaScript
2
star
71

energuide

NRCAN's Energuide API
JavaScript
2
star
72

github-secret-scanning

GitHub secret scanning alert service
HCL
2
star
73

notification-scheduler

JavaScript
2
star
74

gcds-utility

GC Design System Utility is a utility framework for GC Design System. | L'utilitaire de Système de design GC est un cadre utilitaire pour ce système.
HTML
2
star
75

check_guardrails

Audit cloud environments for implementation of guardrails
Go
2
star
76

github-repository-metadata-exporter

📯 Exports GitHub repository metadata to Sentinel
JavaScript
2
star
77

notification-pr-bot

Small script to make deploy to production PRs for Notify
JavaScript
2
star
78

booking-documentation

Documentation site for Booking Discovery
CSS
2
star
79

cppd-medical-report

IN EARLY DEVELOPMENT - Online form for Medical Report for Canada Pension Plan Disability (CPPD). Form ISP-2519. | Prototype en évolution - Formulaire en ligne du rapport médical pour une prestation d'invalidité du Régime de pensions du Canada (RPC). Formulaire ISP-2519.
JavaScript
2
star
80

e-briefing-app

Ionic-based cross platform mobile app for the e-briefing service
TypeScript
2
star
81

ITSG-33-baselines

ITSG-33 baselines
2
star
82

github-repository-quality-index

🙈 Measures the quality of GitHub repositories based on CDS identified best practices
TypeScript
2
star
83

security-goals-demo

Demonstration repository for security goals
2
star
84

find-benefits-and-services

Demo version of find benefits and services app
JavaScript
2
star
85

project-template

Generic project template for new CDS repositories.
2
star
86

a11y-reporting

An application to scan and display a11y statistics over time
JavaScript
2
star
87

gcds-tokens

GC Design System Tokens are the smallest building blocks of GC Design System, represent design decisions for basic elements like colour, typography, and spacing. | Les jetons Système de design GC sont les plus petits blocs de construction du système et représentent les choix de design pour les éléments de base (couleur, typographie, espacement…).
CSS
2
star
88

find-benefits-and-services-documentation

Companion documentation for the white-labelled 'Find benefits and services'
CSS
2
star
89

cppd-doc-uploader

Just a quick prototype of an anonymous document upload service.
PHP
2
star
90

c19-benefits-node

Answer some questions to find which federal programs can help you https://covid-benefits.alpha.canada.ca/. - Répondez à quelques questions pour trouver quels programmes d’aide financière fédéraux s’offrent à vous https://covid-prestations.alpha.canada.ca/.
JavaScript
2
star
91

cds-website-pr-bot

Bot to generate PRs in digital-canada-ca when changes are made in the CMS
JavaScript
2
star
92

consultation-references

Repository containing reference material gathered through our consulting engagements. Répertoire contenant du matériel de référence rassemblé au cours de nos engagements de consultations.
2
star
93

service-dashboard

HTML
2
star
94

take-screenshots

Take regular screenshots of web pages and put them together into animated gifs.
JavaScript
1
star
95

terraform-tools-setup

GitHub action to install all the required Terraform tooling needed at CDS
Shell
1
star
96

html-css-workshop

Starter files for HTML/CSS workshop
CSS
1
star
97

ircc

The IRCC fee wizard project
JavaScript
1
star
98

security-goals-checks

A repository of containers to use with the security goals application
Go
1
star
99

e-briefing

PHP
1
star
100

feedback-collector

Express based app to capture form data and send it to you
JavaScript
1
star