Skip to content

pagopa/io-wallet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

IO Wallet

Introduction

Welcome! 😊

This is the io-wallet project mono-repository containing applications and packages for the IO Wallet app:

  • apps/io-wallet-support-func: Contains functionalities for assistance and support.
  • apps/io-wallet-user-func: Contains functionalities for end users.
  • packages/io-wallet-common: Contains shared code among the workspaces.
  • infra: Contains Terraform code for provisioning and managing the IO Wallet infrastructure on Azure.

Technologies

This project is built with NodeJS and deployed on Azure Cloud, utilizing Azure Functions and Azure CosmosDB.

It leverages TypeScript, fp-ts, and several Azure SDKs.

We use pnpm as the dependencies manager and Turborepo as the monorepo manager.

Infrastructure is managed with Terraform.

Changelog and versioning are managed with Changesets.

Setting the Azure Subscription to Access the Dev CosmosDB

To start the function apps io-wallet-support-func and io-wallet-user-func, you must first log in on Azure and set the subscription you want to use. Ensure you have the Azure az-cli package installed. If not, follow the instructions on the official website.

This process is necessary for local function apps to connect to the development CosmosDB instance on Azure:

az login                                        # Redirects to your main browser for login.

az account set --subscription DEV-IO            # Sets the DEV-IO subscription for backend apps to connect to the dev CosmosDB.

az ad user show --id YOUR_EMAIL                 # Retrieves user info by email. Copy the "id" value from the output and use it as PRINCIPAL_ID in the next command.

az cosmosdb sql role assignment create
    --account-name io-d-itn-common-cosno-01
    --resource-group io-d-itn-common-rg-01
    --scope "/" --principal-id PRINCIPAL_ID
    --role-definition-id
        00000000-0000-0000-0000-000000000002    # Grants read and write access to the dev CosmosDB.

Install the Azure Functions Core Tools

To run Azure Functions locally, you need to install the Azure Functions Core Tools. Please follow the official instructions here:

https://learn.microsoft.com/en-us/azure/azure-functions/functions-run-local?tabs=macos%2Cisolated-process%2Cnode-v4%2Cpython-v2%2Chttp-trigger%2Ccontainer-apps&pivots=programming-language-javascript#install-the-azure-functions-core-tools

Installation

pnpm install

Tasks

At the root level, you can run the following commands:

pnpm test           # Run all unit tests (performed by vitest) for all projects and packages.

pnpm format         # Run code formatting (performed by prettier) for all projects and packages.

pnpm lint           # Run code linting (performed by ESLint) for all projects and packages without fixing errors or warnings.

pnpm lint:fix       # Run code linting (performed by ESLint) for all projects and packages, attempting to fix correctable errors/warnings.

pnpm build          # Run a build (performed by tsup-node) for all projects and packages. Build results are stored under the dist/ directory.

pnpm code-review    # Run typechecking, code linting, and unit testing for each project and package. This command ensures code quality in PRs.

You can also run specific commands using pnpm --filter <package-selector> for a specific project or package. Replace PROJECT_NAME with the actual project name:

# Typecheck

# Linting and formatting
pnpm --filter PROJECT_NAME run lint
pnpm --filter PROJECT_NAME run lint:fix
pnpm --filter PROJECT_NAME run format

# Unit testing
pnpm --filter PROJECT_NAME run test
pnpm --filter PROJECT_NAME run test:coverage # Not available for io-wallet-common

# Build
pnpm --filter PROJECT_NAME run build
pnpm --filter PROJECT_NAME run build:watch # Not available for io-wallet-common

# Start
pnpm --filter PROJECT_NAME run start # Not available for io-wallet-common

PROJECT_NAME can be one of the following:

  • io-wallet-support-func
  • io-wallet-user-func
  • io-wallet-common

About

Wallet Provider implementation for IT-Wallet

Topics

Resources

Stars

Watchers

Forks

Packages

No packages published

Contributors 15