Skip to content

Latest commit

 

History

History
60 lines (43 loc) · 2.5 KB

File metadata and controls

60 lines (43 loc) · 2.5 KB

Contributing to MatchMesh

Thank you for improving MatchMesh. RC1 prioritizes correctness, provider independence, deterministic tests, and small changes that preserve architectural boundaries.

Development setup

  1. Install Node.js 22 and pnpm 10.
  2. Copy .env.example to .env and replace local secrets.
  3. Start PostgreSQL and Redis with docker compose -f infra/docker-compose.yml up postgres redis.
  4. Run pnpm install --frozen-lockfile, pnpm db:generate, and pnpm exec prisma migrate deploy.
  5. Run pnpm dev.

Before opening a change

pnpm build
pnpm lint
pnpm typecheck
pnpm test
pnpm db:validate

Run the relevant manual validation runner when changing MCP, x402, CCTP, or Agent Skills. If infrastructure was not available, state that explicitly in the change description.

Architecture rules

  • Domain and application code depend on ports, not Prisma, Redis, Fastify, API-Football, Circle, or an LLM vendor.
  • Provider data must be normalized before entering MatchMesh domain models.
  • MCP tools call FootballQueryService; they do not call repositories.
  • x402 spending and CCTP funding remain independent. Their shared boundary is BalanceService only.
  • Prices live in the Pricing Registry, prompts in versioned templates, and schemas in registries/manifests.
  • Add dependencies through constructor injection/composition. Do not add global service singletons.
  • Preserve immutable ledgers and uniqueness constraints. Never edit a committed migration.
  • Keep frontend calculations presentational; authoritative prices, balances, analytics, and status come from backend DTOs.

Changes and tests

  • Add a regression test for every bug fix when practical.
  • Prefer small focused tests at the owning package boundary.
  • Use valid version-4 UUIDs in fixtures.
  • Do not replace mock providers with network calls in unit tests.
  • Update API.md, .env.example, and CHANGELOG.md when changing a contract or configuration.

Database changes

Format and validate Prisma first:

pnpm db:format
pnpm db:validate
pnpm exec prisma migrate dev --name descriptive_name

Review generated SQL, indexes, unique constraints, and delete behavior. Production images use prisma migrate deploy.

Pull requests

Describe the problem, architectural impact, validation performed, infrastructure not verified, screenshots for visible changes, and any follow-up debt. Keep unrelated formatting or generated-file churn out of the change.

By participating, you agree to the Code of Conduct.