Skip to content

Latest commit

Β 

History

History
56 lines (46 loc) Β· 2.64 KB

File metadata and controls

56 lines (46 loc) Β· 2.64 KB

Contributing to oRPC

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.

Setup

This repository uses:

  • Node.js v22+ (use pnpm env for quick setup)
  • pnpm and pnpm workspaces for dependency management
  • Vitest for testing
  • ESLint with @antfu/eslint-config for linting and formatting

Workflow

  1. Fork: Fork the repository.
  2. Clone: Clone your fork.
  3. Install: Install dependencies.
    pnpm install
  4. Branch: Create a new branch:
    git checkout -b feature/your-feature
  5. Code: Make your changes.
  6. Test: Manually verify in a playground, e.g.:
    cd playgrounds/next
    pnpm dev
  7. Tests: Add or update tests:
    • Unit tests: add .test-d.ts, .test.ts, .test.tsx files next to code.
    • E2E tests: place in /tests under the relevant package.
  8. Commit & Push:
  9. Pull Request: Open a PR against main (or corresponding version branch).
    • our PR title should follow the Conventional Commits Cheatsheet, with scope corresponding to the package.
    • In the description, summarize your changes and reference any related issue, e.g., Fixes #123.

Structure

  • @orpc/shared β€” shared utilities and types.
  • @orpc/client β€” core library, ORPCError, RPC serializers, RPC link,...
  • @orpc/contract β€” contract definitions (input/output/errors/meta/route, contract builder).
  • @orpc/server β€” contract implementer, procedure/router builder, procedure/router client, RPC handler, ...
  • @orpc/openapi-client - OpenAPI serializers, OpenAPI Link, ...
  • @orpc/openapi β€” OpenAPI Spec generator, OpenAPI handler, ...
  • @orpc/standard-server* β€” environment adapters (fetch, node, etc.).
  • playgrounds/ β€” example applications.
  • apps/content/ - content, documentation, and website.