Skip to content

Repository files navigation

Note: This is a public mirror of TouchBistro's internal touchbistro-node-shared monorepo. It is provided for community visibility and reuse, not as a live development repo. Pull requests cannot be merged; changes flow from the internal canonical repo, not into it. Code is provided as-is under the MIT license.


TouchBistro Node Shared Libraries

Shared Node.js packages used across TouchBistro services and tooling. The monorepo uses Yarn workspaces and Lerna for package orchestration and provides common building blocks for configuration, data access, messaging, jobs, auth, and developer tooling.

Documentation

  • Repo workflow and safety rules: AGENTS.md
  • Package usage: packages/*/README.md
  • Package workflows: packages/*/AGENTS.md
  • Release history: packages/*/CHANGELOG.md

Requirements

  • Node.js >= 20.3
  • Yarn 1.22.22 (classic)
  • PostgreSQL for DB-backed packages and tests
  • Optional: MSSQL for node-knex MSSQL coverage tests

Quick start (contributors)

  1. Install dependencies
yarn
  1. Build all packages
yarn build
  1. Set environment variables as needed
cp .env.example .env
  1. For DB-backed tests, prepare the local test database (destructive)
yarn db:prepare

Common commands

# build and typecheck
yarn build
yarn tsc

# lint and format
yarn lint
yarn fmt

# tests
yarn test
yarn test:package <folder>
yarn verify

# database tasks (node-knex)
yarn db:prepare

Package index

  • @touchbistro/danger-plugin - standard DangerJS PR checks for CI
  • @touchbistro/eslint-config - base ESLint config for Node services
  • @touchbistro/eslint-config-react - ESLint config for React apps
  • @touchbistro/jobseeker - Postgres-backed recurring job scheduler
  • @touchbistro/json-schema-formats - AJV JSON Schema format extensions
  • @touchbistro/node-aws-s3-client - AWS S3 client wrapper with optional mock
  • @touchbistro/node-aws-sqs-client - AWS SQS client wrapper with mock and metrics hooks
  • @touchbistro/node-common - shared utilities and re-export facade
  • @touchbistro/node-data-files - structured data file read/write
  • @touchbistro/node-express - standard Express middleware
  • @touchbistro/node-jwt-cli - JWT and JWK CLI utilities
  • @touchbistro/node-knex - Knex utilities and maintenance tasks
  • @touchbistro/node-locale - locale parsing and negotiation utilities
  • @touchbistro/node-message-sender - message sender framework
  • @touchbistro/node-redis - Redis and Valkey config bootstrap
  • @touchbistro/node-tasks - task tooling facade on node-knex
  • @touchbistro/node-workflow - workflow engine core
  • @touchbistro/react-feature-flags - React feature flag providers

Contributing

  • Follow conventional commits; commitlint is enforced in CI.
  • Update .env.example when adding new environment variables.
  • Keep changes focused and update package docs when behavior or APIs change.

For full contribution workflow, see AGENTS.md.

Releasing

In order to keep a changelog this repo implements a check for commit messages to adhere to conventional commits format https://www.conventionalcommits.org/en/v1.0.0/

Commit message examples

The following is a guideline showing examples of commit messages that satisfy commitlint rules for all cases of version updates.

NOTE: Commit message subjects; right-hand side of the colon have to start with an uppercase character.

Major version update
feat(special-lib): Major breaking changes header

BREAKING CHANGE: Description about the breaking change
Minor version update
feat(special-lib): Minor version bump header
Patch version update
fix(special-lib): Patch small things header
chore(special-lib): Chore work header

The workflow for working on and automatically publishing packages:

  1. Branch off of master and do your changes (making sure commit messages adhere to format)
  2. Push and check the finished CI job for the canary package tags Canary CI
  3. Use the canary package tags to test your dependent services locally (add it to the package.json and test locally)
  4. Once satisfied, merge into master and any changed packages will automatically be published with the version number in the package.json. Versions will be incremented based on conventional commit changelogs.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

Packages

Used by

Contributors

Languages