Project
Contributing
Messagevisor is an open source monorepo. Packages live under packages/, example projects live under projects/, and documentation lives under docs/.
Repository layout#
packages/├── types/ # shared TypeScript types├── core/ # builder, evaluator, linter, tester, CLI plugins├── cli/ # messagevisor CLI entry point├── sdk/ # JavaScript/TypeScript runtime SDK├── react/ # React provider and hooks├── react-intl-compat/ # react-intl compatibility layer├── catalog/ # catalog UI and static generator├── module-icu/ # ICU message format module└── module-interpolation/ # interpolation moduleprojects/├── project-yml/ # minimal YAML starter├── project-json/ # minimal JSON starter├── project-raw/ # YAML starter without the ICU module├── project-environments/ # sets-based dev/staging/production starter├── project-sets/ # sets-based starter├── project-test-envs/ # sets with restricted promotion flows├── project-demo/ # sets-based ecommerce demo for walkthroughs├── project-rtl/ # RTL-aware locale showcase└── project-1/ # broad internal example used for developmentdocs/ # documentation sourceLocal setup#
Clone the repository and install dependencies from the root:
$ git clone https://github.com/messagevisor/messagevisor.git$ cd messagevisor$ make installThis runs npm install across all packages in the workspace.
Build all packages#
$ make buildIndividual packages can be built directly:
$ npm run build --workspace packages/core$ npm run build --workspace packages/sdkYou can also build a single package by cd-ing into it:
$ (cd packages/sdk && npm run build)Run the test suite#
$ make testTo run tests for a single package:
$ npm test --workspace packages/coreType-check#
$ make typecheckThis catches TypeScript errors in spec files and other sources that normal builds omit from tsc. Per-package: (cd packages/sdk && npm run typecheck).
Lint and format#
$ make lint$ make formatlint runs ESLint and Prettier in check mode. format rewrites files in place.
Use an example project for manual testing#
The projects/ directory contains example Messagevisor projects you can run commands against:
$ cd projects/project-1$ npx messagevisor lint$ npx messagevisor build$ npx messagevisor test$ npx messagevisor catalogAfter changing core behavior, run the relevant example project commands to verify that the output matches expectations.
Package changes#
If you modify package.json in any package, run npm install from the repository root to update the workspace lockfile:
$ npm installMaking a change#
- Fork the repository and create a branch from
main - Make your change
- If you changed CLI behavior or a YAML schema, update the relevant doc in
docs/ - If you changed build output, verify behavior against an example project in
projects/ - Run
make testand confirm everything passes - Open a pull request
Docs contributions#
Documentation source files are in docs/. Each page is a Markdown file named page.md inside a directory matching the URL path.
If you are adding a new feature, add or update the corresponding doc. If you are fixing a bug, check whether the existing doc is misleading or incorrect and update it at the same time.
Style notes:
- Lead paragraph uses
{% .lead %}markup - Code blocks use language tags and
{% path="..." %}for file path annotations - Keep examples short and concrete
- End each page with a
## Relatedsection linking to related pages where relevant
Useful habits#
- Keep examples in
projects/aligned with current behavior. Out-of-date examples mislead contributors. - Run
make buildbefore testing against an example project so the local packages are fresh. - Touch only the packages that are relevant to your change. Avoid broad reformatting that makes diffs harder to review.
- Write a clear commit message that describes what changed and why, not just what the files contain.

