Skip to content

pagopa/io-messages

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

726 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

    pnpm exec devcontainer up --workspace-folder .
    pnpm exec devcontainer exec -- workspace-folder . /bin/bash

Using local machine

This project use specific versions of node, pnpm 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 pnpm using corepack (Node Package Manager version manager, it is distributed with node). This step will also install all the required dependencies

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

    pnpm 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.

pnpm changeset

Useful commands

This project uses pnpm 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
pnpm build
# or
pnpm turbo build

# to execute COMMAND on WORKSPACE_NAME
pnpm --filter WORKSPACE_NAME run command
# to execute COMMAD on all workspaces
pnpm -r run command

# run unit tests on citizen-func
pnpm --filter citizen-func run test
# or (with turbo)
pnpm turbo test -- citizen-func

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

Add dependencies

# add a dependency to the workspace root
pnpm add turbo

# add vitest as devDependency on citizen-func
pnpm --filter citizen-func add -D vitest

# add zod as dependency on each workspace
pnpm -r 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