Skip to content

Contributor guide

Thanks for helping with Commitment Desk Inbox. This project is an open-source, office-side capture inbox for assessing practices. Please read the project overview before proposing a feature; the milestones and the open-core boundary are deliberate.

  • Use synthetic data only. Never commit real taxpayer data, private prospect notes, client documents, credentials, or screenshots containing them.
  • Keep the open-source core free of paid-service dependencies and Cloudflare-specific imports outside the adapters.
  • Open an issue before large changes so the approach can be agreed on.
  • Report security issues privately as described in SECURITY.md, not in a public issue.
  • Be respectful. See CODE_OF_CONDUCT.md.

Requirements: Node.js 22.20+ and pnpm 11.

Terminal window
corepack enable
pnpm install
pnpm seed
pnpm typecheck
pnpm test
pnpm dev

pnpm dev serves the reviewer inbox at http://localhost:5173 and the API at http://localhost:8787. The web dev server proxies /v1/* to the API. pnpm seed applies D1 migrations and writes a local demo API key, reviewer email, and state file (.local-demo.json, gitignored). With the API running, pnpm demo:capture uploads a synthetic photo and submits a capture.

CI also runs a full-history secret scan, audits production dependencies, and checks dependency licenses. Run pnpm audit:prod and pnpm licenses:check after changing dependencies.

Open the web app and sign in with reviewer@synthetic.test; the magic link appears in the API terminal and as a local development link on the login screen. needs_match captures show a parcel panel: search the capture’s town for an existing parcel or create one, then match it. After matching, accept the capture, return it, reject it, or request information. Every action appears in the audit timeline with the reviewer and reason.

For admin screens, sign in with admin@synthetic.test. The admin account can create towns, create and CSV-import parcels, and create or revoke capture API keys. Raw API keys are shown once; copy them before dismissing the panel.

The M1 acceptance check runs against Miniflare D1/R2 with synthetic data and prints the stored capture, status, attachment hash, and event:

Terminal window
pnpm test:acceptance

The reviewer happy path runs in Chromium against the local API and web app:

Terminal window
pnpm exec playwright install chromium
pnpm test:e2e

pnpm test:e2e seeds synthetic data first, starts the dev servers when they are not already running, and provisions its own uniquely named captures. It covers magic-link login, inbox search, parcel creation, existing-parcel matching, accept, return with a reason, and the audit timeline. The suite also verifies role-aware navigation and deep links, narrow-screen table scrolling, session states, keyboard focus, and appearance persistence and contrast across the four palettes. It is local-only and uses synthetic data.

To exercise the production bundling path locally:

Terminal window
pnpm build

The public documentation site lives in apps/docs. It is generated from curated public Markdown:

Terminal window
pnpm docs:dev # local site on http://127.0.0.1:4321
pnpm docs:check # required pages, navigation, and internal links
pnpm docs:build # static build
pnpm test:e2e:docs # keyboard, search, and responsive browser checks

See the documentation site runbook before changing the curated source list or deployment workflows.

  1. Create a branch from main.

  2. Write or update tests with the implementation.

  3. Run the full check set before pushing:

    Terminal window
    pnpm format
    pnpm lint
    pnpm typecheck
    pnpm test
    pnpm spec:validate
    pnpm docs:check
    pnpm build
  4. Commit with a conventional commit message, signed off under the DCO (see below).

  5. Open a pull request describing the change, the tests run, and any milestone or contract impact.

Keep pull requests focused. Add an ADR under docs/adr/ when a change deviates from the project overview or makes a durable architectural decision.

Non-trivial changes start as an OpenSpec change proposal. The CLI is pinned as a root dev dependency and the workflow skills are committed under .agents/skills/.

Terminal window
pnpm exec openspec list
pnpm exec openspec status --change <name>
pnpm spec:validate

Use /openspec or /openspec-propose in your agent, review the generated artifacts in openspec/changes/<name>/, then implement and archive. Update openspec/specs/ only through the archive or sync workflow so the specs stay a record of behavior that actually shipped.

If you upgrade the OpenSpec CLI, refresh and commit the skills:

Terminal window
pnpm add -Dw @fission-ai/openspec@<version>
pnpm exec openspec update

Do not hand-edit generated files in .agents/skills/.

This project uses the Developer Certificate of Origin instead of a contributor license agreement. Sign off every commit:

Terminal window
git commit -s -m "feat(api): add health endpoint"

The sign-off certifies that you wrote the change or otherwise have the right to submit it under the project’s Apache 2.0 license. Commits without a valid Signed-off-by trailer may be rejected.

Use Conventional Commits:

feat(api): add capture submission endpoint
fix(web): keep status dot visible in dark mode
docs: document the self-host boundary
chore(ci): cache the pnpm store

Common scopes: api, web, schema, core, infra, docs, ci.

  • TypeScript is strict, including noUncheckedIndexedAccess and exactOptionalPropertyTypes.
  • Keep API request and response contracts in packages/capture-schema; do not duplicate types in the apps.
  • Keep domain use cases independent of Cloudflare APIs through the interfaces listed in the project overview §6.
  • Add tests for behavior, not implementation details.
  • Formatting and lint rules are enforced in CI.
  • Tests cover the new behavior.
  • pnpm lint, pnpm typecheck, pnpm test, pnpm build, and pnpm spec:validate pass.
  • pnpm test:e2e passes when the change touches the reviewer browser flow.
  • pnpm test:selfhost passes when the change touches API contracts, storage, webhooks, retention, or the Node adapter.
  • No real taxpayer or client data is included.
  • Public contracts and documentation are updated.
  • An ADR is added if the change deviates from the plan.
  • Commits are signed off (git commit -s).