• Stars
    star
    609
  • Rank 73,614 (Top 2 %)
  • Language
    TypeScript
  • License
    European Union Pu...
  • Created over 7 years ago
  • Updated 30 days ago

Reviews

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

Repository Details

IO, l'app dei servizi pubblici


IO - The public services app

Download on the App Store Get it on Google Play

The mobile app of the Digital Citizenship project

FAQ

What is the Digital Citizenship project?

Digital Citizenship aims at bringing citizens to the center of the Italian public administrations services.

The project comprises two main components:

  • a platform made of elements that enable the development of citizen-centric digital services;
  • an interface for citizens to manage their data and their digital citizen profiles.

What is the Digital Citizenship mobile app?

The Digital Citizenship mobile app is a native mobile application for iOS and Android with a dual purpose:

  • to be an interface for citizens to manage their data and their digital citizen profile;
  • to act as reference implementation of the integrations with the Digital Citizenship platform.

Who develops the app?

The development of the app is carried out by several contributors:

Can I use the app?

Sure! However you will need a SPID account or have a CIE to login to the app.

How can I help you?

Reporting bugs, bug fixes, translations and generally any improvement is welcome! Send us a Pull Request!

What permissions are used by the IO app?

Because different platforms have different types of Permissions below we have two sections about permissions requested by the IO app for both environments (iOS and Android). Some permissions may be defined but not used. Their presence is due to dependencies with third-party modules or because they are required by the target store.

Android
Permission (android.permission.*) Usage / Meaning
INTERNET Allows the app to open network sockets (e.g. simple internet connectivity)
ACCESS_NETWORK_STATE Allows the app to access information about networks (e.g. details about connection quality/state)
CAMERA Allows the app to access device camera to scan QR codes
NFC Allows the app to perform I/O operations over NFC
RECEIVE_BOOT_COMPLETED Allows the app to receive the Intent.ACTION_BOOT_COMPLETED that is broadcast after the system finishes booting. Used for push notification.
VIBRATE Allows the app to access the vibration motor. This allow the application to emit vibration.
WAKE_LOCK Allows the app to use PowerManager WakeLocks to keep processor from sleeping or screen from dimming. Used for push notification.
READ_APP_BADGE Allows the app to show notification badges on its icon.
READ_CALENDAR Allows the app to read the user's calendar data.
WRITE_CALENDAR Allows the app to write the user's calendar data. Used to automatically set reminders.
READ_EXTERNAL_STORAGE Allows the app to read from external storage. Used to pick images from gallery with payment QRCode.
WRITE_EXTERNAL_STORAGE Allows the app to write to external storage. Used to store images, certificates, etc.
USE_FINGERPRINT Allows the app to use fingerprint hardware for biometric identification required from API level 23 until API level 28
USE_BIOMETRIC Allows the app to use device's available biometric identification system (Face unlock, Iris unlock, Fingerprint) required from API Level 28.
SCHEDULE_EXACT_ALARM Allows the app to send local notifications.
DOWNLOAD_WITHOUT_NOTIFICATION Allows the app to download files in background without promping a notification.
POST_NOTIFICATIONS Allows the app to post notifications. Used for push notification.

Below there are the permissions required by the main android hardware manufacturers. Mainly used to manage notification badge icons.

Permission (manufacturer) Usage / Meaning
com.google.android.c2dm.permission.RECEIVE Allows the app to receive a broadcast from a GCM server that contains a GCM message. Used for push notification.
com.google.android.finsky.permission.BIND_GET_INSTALL_REFERRER_SERVICE Allows the app to recognize where the app was installed from. Used for Firebase.
com.anddoes.launcher.permission.UPDATE_COUNT Allows the app to use notification badges.
com.htc.launcher.permission.READ_SETTINGS Allows the app to use notification badges.
com.htc.launcher.permission.UPDATE_SHORTCUT Allows the app to use notification badges.
com.huawei.android.launcher.permission.CHANGE_BADGE Allows the app to use notification badges.
com.huawei.android.launcher.permission.READ_SETTINGS Allows the app to use notification badges.
com.huawei.android.launcher.permission.WRITE_SETTINGS Allows the app to use notification badges.
com.majeur.launcher.permission.UPDATE_BADGE Allows the app to use notification badges.
com.oppo.launcher.permission.READ_SETTINGS Allows the app to use notification badges.
com.oppo.launcher.permission.WRITE_SETTINGS Allows the app to use notification badgee.
com.sec.android.provider.badge.permission.READ Allows the app to use notification badges.
com.sec.android.provider.badge.permission.WRITE Allows the app to use notification badges.
com.sonyericsson.home.permission.BROADCAST_BADGE Allows the app to use notification badges.
com.sonymobile.home.permission.PROVIDER_INSERT_BADGE Allows the app to use notification badges.
me.everything.badger.permission.BADGE_COUNT_READ Allows the app to use notification badges.
me.everything.badger.permission.BADGE_COUNT_WRITE Allows the app to use notification badges.
com.android.vending.CHECK_LICENSE Allows the app to access Google Play Licensing.
com.samsung.android.providers.context.permission.WRITE_USE_APP_FEATURE_SURVEY Allows the app to use the Samsung Developer SDK. Used for Samsung biometric identification.
com.fingerprints.service.ACCESS_FINGERPRINT_MANAGER Allows the app to access the fingerprint hardware for biometric identification.
iOS
Permission Usage / Meaning
NSAppleMusicUsageDescription Allows the app to access the userโ€™s media library.
NSBluetoothAlwaysUsageDescription Allows the app to use the deviceโ€™s Bluetooth interface.
NSBluetoothPeripheralUsageDescription Allows the app to access Bluetooth peripherals and has a deployment target earlier than iOS 13.
NSContactsUsageDescription Allows the app to access contacts to let you add them in calendar events.
NSLocationAlwaysUsageDescription Allows the app to access the userโ€™s location at all times and deploys to targets earlier than iOS 11.
NSLocationUsageDescription Allows the app to access the userโ€™s location information.
NSLocationWhenInUseUsageDescription Allows the app to access the userโ€™s location information while the app is in use.
NSMicrophoneUsageDescription Allows the app to use the microphone in case you want to leave a voice note. Used in the assistance flow.
NSMotionUsageDescription Allows the app to access the deviceโ€™s motion data.
NSCalendarsUsageDescription Allows the app to access the calendar to add event reminders.
NSCameraUsageDescription Allows the app to use the camera to scan QR codes.
NSFaceIDUsageDescription Allows the app to use Face ID for biometric identification.
NSPhotoLibraryAddUsageDescription Allows the app to access the userโ€™s photo library.
NSPhotoLibraryUsageDescription Allows the app to access the photo library to scan QR codes.
NSSpeechRecognitionUsageDescription Allows the app to send user data to Appleโ€™s speech recognition servers. Used in the assistance flow.
Remote Notification Allows the app to receive remote push notification.
NFC (Near Field Communication Tag Reading) Allows the app to use the NFC.

Getting started

The following sections provide instructions to build and run the app for development purposes.

Prerequisites

NodeJS and Ruby

To run the project you need to install the correct version of NodeJS and Ruby. We recommend the use of a virtual environment of your choice. For ease of use, this guide adopts nodenv for NodeJS, rbenv for Ruby.

The node version used in this project is stored in .node-version, while the version of Ruby is stored in .ruby-version.

React Native

Follow the official tutorial for installing the React Native CLI for your operating system.

If you have a macOS system, you can follow both the tutorial for iOS and for Android. If you have a Linux or Windows system, you need only to install the development environment for Android.

Build the app

In order to build the app, we use yarn for managing javascript dependencies. As stated previously, we also use nodenv and rbenv for managing the environment:

# Clone the repository
$ git clone https://github.com/pagopa/io-app

# CD into the repository
$ cd io-app

# Install NodeJS with nodenv, the returned version should match the one in the .node-version file
$ nodenv install && nodenv version

# Install Ruby with rbenv, the returned version should match the one in the .ruby-version file
$ rbenv install && rbenv version

# Install yarn and rehash to install shims
$ npm install -g yarn && nodenv rehash

# Install bundle
$ gem install bundle

# Install the required Gems from the Gemfile
# Run this only during the first setup and when Gems dependencies change
$ bundle install

# Install dependencies 
# Run this only during the first setup and when JS dependencies change
$ yarn install

# Install podfiles when targeting iOS (ignore this step for Android)
# Run this only during the first setup and when Pods dependencies change
$ cd iOS && bundle exec pod install && cd ..

# Generate the definitions from the OpenAPI specs and from the YAML translations
# Run this only during the first setup and when specs/translations change
$ yarn generate

Environment variables

Production

You can target the production server by copying the included .env.production file to .env:

$ cp .env.production .env

Note
The sample configuration sets the app to interface with our test environment, on which we work continuously; therefore, it may occur that some features are not always available or fully working. Check the comments in the file for more informations about environment variables.

io-dev-api-server

You can also target the io-dev-api-server for development purposes by coyping the included .env.local file to .env:

$ cp .env.local .env

Run the app

Android Emulator

An Android Emulator must be created and launched manually. Then, from your command line, run these commands:

# Perform the port forwarding
$ adb reverse tcp:8081 tcp:8081;adb reverse tcp:3000 tcp:3000;adb reverse tcp:9090 tcp:9090

# Run Android build
$ yarn run-android

iOS Simulator

# Run iOS build
$ yarn run-ios

Pyshical devices

The React Native documentation provides a useful guide for running projects on pyshical devices.

Warning
On iOS you also have to change the Bundle Identifier to something unique before running io-app on your pyshical device. This can be done in the Signing (Debug) section of Xcode.

Troubleshooting

This section lists possible solutions to problems you might encounter while building the app.

iOS build
  • error: redefinition of module 'YogaKit' build Failed
    

    Restart your machine to fix the issue.


  • error: Can't find 'node' binary to build React Native bundle If you have non-standard nodejs installation, select your project in Xcode, find 'Build Phases' - 'Bundle React Native code and images' and change NODE_BINARY to absolute path to your node executable (you can find it by invoking 'which node' in the terminal)
    

    While using a virtual node enviroment and building with Xcode you might encounter the aformentioned error. Create a local Xcode enviroment file by running:

    $ cd ios
    $ cp .xcode.env .xcode.env.local

    Edit .xcode.env.local to your needs by adding your node binary path which can be found by running which node.


  • error No simulator available with name "iPhone 13".
    

    This happens because new versions of Xcode do not automatically create a simulator for the iPhone 13. To fix the issue you can either create a new simulator and name it iPhone 13 or run the command yarn run-ios --simulator='a valid simulator name'.


  • Application launch for 'it.pagopa.app.io' did not return a valid pid nor a launch error. Domain: NSPOSIXErrorDomain Code: 3 Failure Reason: No such process User Info: { DVTErrorCreationDateKey = "2022-01-25 12:02:41 +0000"; IDERunOperationFailingWorker = IDELaunchiPhoneSimulatorLauncher; }
    

    This happens on Apple Silicon CPUs because some Pods do not implement the XCFramework yet. Install Rosetta by running softwareupdate --install-rosetta to fix the issue.


Architecture

Main technologies used

SPID Authentication

The application relies on a backend for the authentication through SPID (the Public System for Digital Identity) and for interacting with the other components and APIs that are part of the digital citizenship project.

The backend implements a SAML2 Service Provider that deals with user authentication with the SPID Identity Providers (IdP).

The authentication between the application and the backend takes place via a session token, generated by the backend at the time of the authentication with the SPID IdP.

Once the backend communicates the session token to the application, it is used for all subsequent calls that the application makes to the API exposed by the backend.

The authentication flow is as follows:

  1. The user selects the IdP;
  2. The app opens a webview on the SAML SP authentication endpoint implemented in the backend, which specifies: the entity ID of the IdP selected by the user and, as returns URL, the URL of the endpoint that generates a new session token.
  3. The SAML SP logic takes over the authentication process by redirecting the user to the chosen IdP.
  4. After the authentication, a redirect is made from the IdP to the backend endpoint that deals with the generation of a new session token.
  5. The endpoint that generates a new token receives the SPID attributes via the HTTP header; then, it generates a new random session token and returns to the webview an HTTP redirect to an URL well-known containing the session token.
  6. The app, which monitors the webview, intercepts this URL before the HTTP request is made, extracts the session token and ends the authentication flow by closing the webview.
  7. Next, the session token is used by the app to make calls to the backend API.

Deep linking

The application is able to manage deep links. Deep linking allows opening the app or a specific screen once a user clicks on specific URL. The URL scheme for io-app is: ioit://.

Supported URLs

main

ioit://main/messages
ioit://main/services
ioit://main/profile

wallet

ioit://wallet
ioit://wallet/payments-history
ioit://wallet/card-onboarding-attempts

services

ioit://services/service-detail?serviceId=:id

profile

ioit://profile
ioit://profile/preferences
ioit://profile/privacy
ioit://profile/privacy-main

fci

ioit://fci/main?signatureRequestId=:id
ioit://fci/signature-requests
ioit://cgn-details/categories-merchant/:category

More Repositories

1

io

Repository principale di IO: offre una mappa di informazioni e risorse per orientarsi nel progetto
121
star
2

io-backend

App IO (backend)
TypeScript
94
star
3

openapi-codegen-ts

App IO - Utils
TypeScript
34
star
4

io-sdk

SDK sperimentale per l'integrazione delle API di IO
CSS
32
star
5

io.italia.it

Landing page for io.italia.it
Rich Text Format
24
star
6

io-ts-commons

IO - Common code
TypeScript
21
star
7

pagopa-api

Tutti gli schemi XSD e WSDL che seguono release diverse dalle SANP
Shell
18
star
8

mui-italia

Material-UI theme inspired by BootstrapItalia.
TypeScript
16
star
9

codemotion-workshop-fest-2022--fpts

Support material for a workshop at Codemotion Workshop Fest 2022
TypeScript
15
star
10

io-functions

Digital Citizenship APIs
TypeScript
15
star
11

io-handbook

Handbook of IO
14
star
12

io-infrastructure-modules-new

HCL
13
star
13

io-dev-api-server

A mock server to help io-app development https://io.italia.it/
TypeScript
13
star
14

io-app-design-system

TypeScript
12
star
15

azure-pipeline-templates

A collection of common Azure Pipeline tasks to be used across out projects
TypeScript
12
star
16

io-infrastructure-live-new

HCL
11
star
17

pn-frontend

TypeScript
9
star
18

lg-pagopa-docs

pagoPA, linee guida pagamenti elettronici a favore delle Pubbliche Amministrazioni e dei gestori di pubblici servizi
Python
9
star
19

io-services-metadata

Metadata for services used by the IO app
JavaScript
9
star
20

nteract-on-ckan

It contains a set of analyses and tutorials developed using nteract-on-ckan
Jupyter Notebook
9
star
21

pdnd-interop-frontend

Frontend per la piattaforma PDND Interoperabilitร 
TypeScript
9
star
22

pagopa-android-example

Example PagoPA application for Android
Java
8
star
23

io-infrastructure-live

Terragrunt live scripts to provision the IO infrastructure
HCL
7
star
24

terraform-azurerm-v3

Terraform modules for Azure cloud
HCL
7
star
25

io-infra

IO platform infrastructure
HCL
7
star
26

azurerm

Terraform modules for Azure cloud
HCL
7
star
27

io-wallet

EUDI Wallet and Italian Wallet implementation for App IO
TypeScript
6
star
28

cstar-infrastructure

Code infrastructure CSTAR project
Smarty
6
star
29

io-infrastructure-modules

Terragrunt modules to provision the IO infrastructure
HCL
6
star
30

pagopa-infra

pagoPA platform infrastructure
Smarty
6
star
31

atm-layer-wf-process

Java
6
star
32

rtd-ms-transaction-filter

Component that defines the batch process for filtering the input transaction records, based on a list of pan, recovered from a local directory or through a remote service.
Java
5
star
33

io-functions-admin

IO platform APIs for the Admin
TypeScript
5
star
34

io-gateway

IO-Gateway
Shell
5
star
35

site-pagopa.gov.it

Rich Text Format
5
star
36

graphql-publisher

PDND Datalake - Graphql Publisher
Scala
5
star
37

atm-layer-wf-task

Java
5
star
38

io-developer-portal-frontend

The developer portal frontend
TypeScript
5
star
39

pm-infra

HCL
5
star
40

atm-layer-mil-adapter

Java
5
star
41

atm-layer-model

HTML
5
star
42

pn-local-emulator

A system that emulates a subset of HTTP API provided by Piattaforma Notifiche, driven by well-defined use cases, and produces a report describing their coverage and correctness.
TypeScript
5
star
43

pagopa-specifichepagamenti-docs

pagoPA, Specifiche Attuative del Nodo dei Pagamenti-SPC
Python
4
star
44

aks-microservice-chart-blueprint

PagoPA AKS microservice chart blueprint
Shell
4
star
45

io-template-typescript

Template repository for Typescript based projects
JavaScript
4
star
46

pdnd-uservice-rest-template

Scala
4
star
47

atm-layer-infra

HCL
4
star
48

io-react-native-wallet

A package for React Native to provide data structures, helpers and API to IO Wallet to obtain and manage Wallet Instance Attestations
TypeScript
4
star
49

atm-layer

HTML
4
star
50

io-react-native-jwt

TypeScript
4
star
51

codemotion-webinar-2022-iac-tls

HCL
4
star
52

io-functions-commons

Common functionality shared among the functions of project IO
TypeScript
4
star
53

git-hooks

A collection of useful git hooks to automate part of our workflow
Shell
4
star
54

pagopa-api-config

Api per configurare la piattaforma pagoPa
Java
4
star
55

atm-layer-wf-engine

YAML
4
star
56

github-actions-template

All the templates for GitHub Actions
4
star
57

io-sign

IO platform feature that allows the signing of PDF documents
TypeScript
4
star
58

io-cie-sdk

C
4
star
59

terraform-infrastructure-template

Terraform template repository for infrastructures projects
HCL
4
star
60

template-aws-infrastructure

Template useful to create a AWS terraform project
HCL
4
star
61

io-functions-services

TypeScript
4
star
62

pagopa-wallet-fe

new wallet frontend
TypeScript
4
star
63

pn-ss

Java
3
star
64

azuredevops-tf-modules

Terraform modules for Azure DevOps
HCL
3
star
65

pn-downtime-logs

Java
3
star
66

pagopa-checkout-fe

New FE for Checkout project
TypeScript
3
star
67

io-mock

Docker files to replicate the whole IO backend platform locally for development purposes and integration tests
Dockerfile
3
star
68

pn-ec

Java
3
star
69

io-functions-app

IO platform APIs for the app
TypeScript
3
star
70

interop-be-api-gateway

Scala
3
star
71

pagopa-debt-position

PagoPA service to manage Creditor Institution debtor positions
Java
3
star
72

si-team

Strategic Innovation Team, updates and documents
3
star
73

io-docs

Docs for IO project
JavaScript
3
star
74

io-pagopa-proxy

A proxy for interacting with pagoPA backend
TypeScript
3
star
75

pn-radd-fsu

Java
3
star
76

io-developer-portal-backend

Backend of the IO developer portal
TypeScript
3
star
77

danger-plugin

This module provides custom rules over Danger CI automation.
TypeScript
3
star
78

io-react-native-cieid

A React Native bridge to add CieID authentication on IO
TypeScript
3
star
79

eng-azure-governance

scripts to manage azure: subscription, policy, policy initiatives
HCL
3
star
80

pdv-user-registry-infra

Code to build the Private Data Vault project infrastructure
HCL
3
star
81

pn-commons

Java
3
star
82

pagopa-azure-devops

HCL
3
star
83

io-infrastructure

Infrastructure of IO
HCL
3
star
84

atm-layer-schema

Smarty
3
star
85

interop-fe-probing

CSS
2
star
86

cgn_load_tests

JavaScript
2
star
87

tfcloudvars

Simple script to manage terraform cloud variables
Go
2
star
88

cra-template-typescript

TypeScript
2
star
89

corporate-site-fe

Corporate site FE
TypeScript
2
star
90

pn-model

Codice che rappresenta le entitร  "reali" di PN
Java
2
star
91

gitops

HCL
2
star
92

pn-delivery-push

Java
2
star
93

io-functions-eucovidcerts

A set of Azure functions that handle the integration with DGC api.
TypeScript
2
star
94

io-bulkops

TypeScript
2
star
95

io-functions-template

Typescript template - IO Azure functions
TypeScript
2
star
96

io-cie-ios-sdk

C
2
star
97

atm-layer-console-service

HTML
2
star
98

pn-cicd

Repository del sistema di CI/CD
Shell
2
star
99

atm-layer-emulator

TypeScript
2
star
100

cgn-onboarding-portal-backend

Java
2
star