This repository is a pnpm monorepo containing everything related to MTD's public Developer API:
- The documentation and developer portal (Next.js app)
- The OpenAPI specification package
- The TypeScript types package
- The API client package built from the spec and types
- The tooling used to generate and maintain those packages
/
site/ # Next.js documentation site & developer portal
packages/
spec/ # @mtd.org/developer-api-spec (OpenAPI spec package)
types/ # @mtd.org/developer-api-types (generated TS types)
client/ # @mtd.org/developer-api-client (API client)
tools/ # Generators used to build the packages
The packages/* projects are published to npm and intended for external developers building against the API.
The site project is the public documentation and account portal hosted at https://mtd.dev.
- Node.js v22.x
- Corepack enabled
- pnpm (managed via Corepack)
corepack enable
pnpm install
All commands are run from the repository root.
pnpm dev
Starts all projects that expose a dev script (primarily the site).
pnpm build
Builds packages and the site in dependency order.
pnpm ci:verify
pnpm lint
pnpm format
pnpm typecheck
pnpm gen
pnpm typegen
Runs generators in /tools and type generation in relevant projects.
| Package | Purpose | Published |
|---|---|---|
@mtd.org/developer-api-spec |
OpenAPI spec for the public API | Yes |
@mtd.org/developer-api-types |
Generated TypeScript types from the spec | Yes |
@mtd.org/developer-api-client |
Type-safe API client | Yes |
These packages are built using tooling in /tools and are not directly used by the site at runtime. The site documents how to use them.
This repo uses Changesets to manage package version bumps and changelogs in our pnpm monorepo. Each meaningful change to a published package should include a changeset so releases can be automated.
Add a changeset for any change that affects a package consumer, including:
- New features or behavior changes
- Bug fixes
- Performance improvements
- Dependency changes that affect runtime behavior
- Breaking changes (API changes, removed exports, behavior changes)
You can usually skip a changeset for:
- Docs-only changes
- Tests-only changes
- Internal refactors that do not change public behavior
- CI/build tooling changes that do not affect published output
If you’re unsure, add one — it’s cheap and keeps releases predictable.
From the repo root:
pnpm changesetFollow the prompts to select:
which package(s) changed
the bump type (patch, minor, or major)
a short description (this becomes part of the changelog)
This will create a new markdown file in .changeset/. Commit that file with your PR.
This project uses Changesets for version management and npm publishing.
# Create a changeset for your changes
pnpm changeset
# Commit the changeset with your changes
git add .changeset/*.md
git commit -m "feat: your changes"When merged to main, a Release PR is automatically created. Merging the Release PR publishes to npm using npm Trusted Publishing.
For detailed information, see RELEASE.md.
AI agents and contributors should read:
.github/copilot-instructions.md
This file defines the architectural rules and boundaries of the project.
The documentation site (/site) is deployed to Vercel. CI and releases are handled via GitHub Actions.
See LICENSE.