Thank you for your interest in contributing to oRPC! We welcome all kinds of contributions: bug reports, feature requests, documentation improvements, and code enhancements.
If you need help or have questions, please join us on Discord.
Tip
Mini-oRPC is a simplified implementation of oRPC that includes essential features to help you understand the core concepts. It's designed to be straightforward and easy to follow, making it an ideal starting point for learning about oRPC.
This repository uses:
- Node.js v22+ (use
pnpm envfor quick setup) - pnpm and pnpm workspaces for dependency management
- Vitest for testing
- ESLint with @antfu/eslint-config for linting and formatting
- Fork: Fork the repository.
- Clone: Clone your fork.
- Install: Install dependencies.
pnpm install
- Branch: Create a new branch:
git checkout -b feature/your-feature
- Code: Make your changes.
- Test: Manually verify in a playground, e.g.:
cd playgrounds/next pnpm dev - Tests: Add or update tests:
- Unit tests: add
.test-d.ts,.test.ts,.test.tsxfiles next to code. - E2E tests: place in
/testsunder the relevant package.
- Unit tests: add
- Commit & Push:
- Commit should follow the Conventional Commits Cheatsheet but not required because we usually use
Squash and Merge.
- Commit should follow the Conventional Commits Cheatsheet but not required because we usually use
- Pull Request: Open a PR against
main(or corresponding version branch).- our PR title should follow the Conventional Commits Cheatsheet. Scope rules:
- Use the package name (e.g.
feat(server): ...), orrpc/openapifor changes tied to a protocol rather than a single package, such as its serializers, handlers, links, or dedicated plugins. - Use
contentonly for the docs site itself (styles, Blume config, ...), and only with thechoretype — neverfeat/fix/perf/docs, since these changes do not affect library users. Documentation about a package or protocol uses that package/protocol scope instead (e.g.docs(openapi): ...). - Omit the scope when the change is too broad for a single one.
- Use the package name (e.g.
- In the description, summarize your changes and reference any related issue, e.g.,
Fixes #123.
- our PR title should follow the Conventional Commits Cheatsheet. Scope rules:
Every public API mentioned in the documentation (apps/content/docs) must carry a JSDoc comment with a backlink to the official website. This is enforced in CI:
pnpm docs:validate # runs scripts/verify-docs-jsdoc.ts (accepts [--filter server,client] [--strict] [--list] via node) and `blume validate --strict`JSDoc blocks follow this template:
/**
* <Summary: 1-3 short sentences. Verb-first for functions, noun phrase for types/classes.>
*
* @remarks
* **Warning**: <footguns, breaking behavior>
* **Note**: <non-obvious behavior, limits>
*
* @param name - <only extra info beyond the type>
* @returns <only extra info beyond the type>
*
* @see {@link https://orpc.dev/docs/... | Page Title}
*/@remarksis optional (max 1-3 bold lines) and uses**Warning**:/**Note**:— not@warning/@infotags.@param/@returnsonly when they add information beyond the type signature.- No
@exampleblocks — examples live on the linked docs page. @seeis always the last tag. The URL must map to an existingapps/content/docs/<path>.mdxpage (plus optional#anchormatching a real heading). The title after|is the page's title (its frontmattertitle), orPage Title - Headingwhen the link targets an anchor.- Every
https://orpc.dev/...link anywhere in package sources (inline markdown links included) is validated against the content pages inapps/content.
