Skip to content

PayPal sandbox only. No real money moves.

BuildersBuilders

Builders

How the repository is organised, the one rule that keeps it honest, and where to start reading.

Verifiedbacked by a real run or committed evidence

Page last changed 7 Nov 2026 (from the git history)

GAVEL is one strict TypeScript monorepo with seven workspace packages under packages/. This track is for people who read, run, change or review the code. Every page here was written from the source; each package page names the files and the tests that guard its rules.

The picture

An arrow means "may import". The arrows are the table ALLOWED in .dependency-cruiser.cjs; CI enforces them, so a package cannot quietly reach into one that is not listed.

The dependency rule

Direction is shared, then engine, then payments; voice depends on shared only; server sits on top of the four; web imports shared and voice only.

PackageMay import
sharednothing from the workspace
engineshared
paymentsshared, engine
voiceshared
servershared, engine, payments, voice
webshared, voice

Two further rules are in the same file or its companion scripts:

  • The engine is pure. The rule engine-no-node-io forbids fs, net, http, child_process, os and the other Node I/O modules under packages/engine/src/, except the folders node/ and testing/. packages/engine/scripts/check-imports.mjs repeats the check and also fails when the engine declares a runtime dependency.
  • Payments keeps one runtime dependency. The root script check:deps runs depcruise, scripts/check-engine-purity.mjs and the payments check that zod is the only runtime dependency.

How to read the repo

Start with the words: glossary and the concepts page.

Read packages/shared/src/index.ts for the vocabulary the other packages share, then shared.

Read the engine's decide/index.ts and evolve.ts: one command in, entries out, state folded from entries. See engine.

Read packages/payments/src/saga/machine.ts (the transition table), then payments.

Read packages/server/src/boot/compose.ts: it is the one place where every package is wired together. See server.

More for builders

Edit on GitHub

Last updated on