A collection of developer tools for the OpenRPC ecosystem.
- Overview
- Packages
- Installation
- Development
- Version Management
- Contributing
- Changelog
- License
- Resources
OpenRPC Tools is a monorepo containing various tools and utilities for working with the OpenRPC specification. These tools help developers create, validate, document, and interact with JSON-RPC APIs using the OpenRPC standard.
The OpenRPC specification provides a way to describe JSON-RPC 2.0 APIs in a machine-readable format, similar to how OpenAPI/Swagger works for REST APIs. This repository contains React components, utilities, and applications that make working with OpenRPC documents easier.
Package | Description | Link |
---|---|---|
@open-rpc/inspector | A tool to create, modify and execute JSON-RPC requests | README |
@open-rpc/docs-react | React component for rendering OpenRPC documentation | README |
@open-rpc/extensions | Collection of OpenRPC Specification Extensions | README |
@open-rpc/playground | Editor and live-preview for OpenRPC documents | README |
@open-rpc/logs-react | React component for displaying JSON-RPC logs | README |
@open-rpc/json-schema-to-react-tree | React component to visually display JSON Schemas | README |
@open-rpc/monaco-editor-react | Monaco editor with OpenRPC support | README |
This project requires Node.js version 20 or higher.
To install all dependencies and build all packages:
npm install
npm run build
This repository is structured as a monorepo using npm workspaces. To work on a specific package:
cd packages/<package-name>
npm install
npm start
For testing:
# Run tests for all packages
npm test
# Run tests for a specific package
cd packages/<package-name>
npm test
To build an individual package, navigate to the package directory and run the build:package script:
# Navigate to the package directory
cd packages/<package-name>
# Build the package
npm run build:package
The build process respects dependencies between packages, so if you build a package that depends on another package, the dependency will be built first.
This project uses Changesets to manage versions and generate changelogs.
When making changes that should result in a version bump, create a changeset using the npm script:
npm run changeset
This will prompt you to:
- Select the packages that have changed
- Choose the semver increment (major, minor, patch)
- Provide a description of the changes
The changeset will be added to the .changeset
directory and should be committed with your changes.
If your PR doesn't require a version change, you can create an empty changeset:
npm run changeset -- --empty
This creates a special changeset that satisfies the PR validation check without triggering a version bump.
The versioning and publishing process is handled automatically by GitHub Actions:
- When a PR is opened, the CI checks for the presence of a changeset
- When a PR is merged to main, the changesets/action:
- Updates package versions based on the changesets
- Generates changelog entries
- Publishes packages to npm
For more details on the CI/CD process, see the workflow files in the .github/workflows directory.
We welcome contributions to any of the packages in this repository! Please read the following documents before contributing:
- CONTRIBUTING.md - How to contribute to this project
- BUILDING.md - How to build the project
- RELEASING.md - How to release new versions
- CONVENTIONAL_COMMITS.md - Commit message format
When contributing code changes, please also include a changeset describing your changes as described in the Version Management section.
This project uses a semantic-release style changelog generator. For more information on how changelogs are generated and maintained, see CHANGELOG_GUIDE.md.