Skip to content

This is a monorepo that contains all the backend microservices and functionalities related to messaging in IO.

Notifications You must be signed in to change notification settings

pagopa/io-messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

io-messages

Setup

Using Devcontainer

The preferred way to setup your development environment is to use Devcontainer (Host system requirements).

Tip

If you are on macOS we recommend using Rancher Desktop configured to use VZ as Virtual Machine Type and virtiofs as volume Mount Type.

Visual Studio Code

  1. Make sure docker is available and running in your host system
  2. Install the Devcontainer Extension
  3. Open the project root folder and select Dev Containers: Reopen in Container from the command palette
  4. Visual Studio Code will build the devcontainer image and then open the project inside the container, with all the needed tools and extension configured

Console

If you use a code editor that doesn't support Dev Container, you can still run it in your terminal.

  1. Follow the instruction of the following chapter ("Using local machine") to setup your local environment
  2. Run devcontainer from your terminal
    yarn devcontainer up --workspace-folder .
    yarn devcontainer exec -- workspace-folder . /bin/bash

Using local machine

This project use specific versions of node, yarn and terraform. To make sure your development setup matches with production follow the recommended installation methods.

  1. Install and configure the follow tool in your machine

    • nodenv - Node version manager
    • tfenv - Terraform version manager
    • terraform-docs - Generate Terraform modules documentation in various formats
    • tflint - A Pluggable Terraform Linter
    • pre-commit - A framework for managing and maintaining multi-language pre-commit hooks
  2. Install node at the right version used by this project

     cd path/to/io-messages
     nodenv install
  3. Install yarn using corepack (Node Package Manager version manager, it is distributed with node). This step will also install all the required dependencies

    [!IMPORTANT] Yarn uses Plug and Play for dependency management. For more information, see: Yarn Plug’n’Play

    corepack enable
    yarn
  4. Build all the workspaces contained by this repo

    yarn build

Release management

We use changesets to automate package versioning and releases.

Each Pull Request that includes changes that require a version bump must include a changeset file that describes the introduced changes.

To create a changeset file run the following command and follow the instructions.

yarn changeset

Useful commands

This project uses yarn and turbo with workspaces to manage projects and dependencies. Here is a list of useful commands to work in this repo.

Work with workspaces

# build all the workspaces using turbo
yarn build
# or
yarn turbo build

# to execute COMMAND on WORKSPACE_NAME
yarn workspace WORKSPACE_NAME run command
# to execute COMMAD on all workspaces
yarn workspace foreach run command

# run unit tests on citizen-func
yarn workspace citizen-func run test
# or (with turbo)
yarn turbo test -- citizen-func

# run the typecheck script on all workspaces
yarn workspaces foreach run typecheck

Add dependencies

# add a dependency to the workspace root
yarn add turbo

# add vitest as devDependency on citizen-func
yarn workspace citizen-func add -D vitest

# add zod as dependency on each workspace
yarn workspace foreach add zod

About

This is a monorepo that contains all the backend microservices and functionalities related to messaging in IO.

Topics

Resources

Stars

Watchers

Forks

Packages

 
 
 

Contributors 13