The Roger Protocol

Quick Start

Get started with the Roger Protocol

Installation

JavaScript / TypeScript Setup

To use the Roger Protocol spec package inside of your JS/TS project, ensure you have Node.js installed and run the following command:

npm i @roger-protocol/specs

Then, import Zod schemas in your JS/TS files

import { loginBodySchema } from "@roger-protocol/specs/auth"
import { coolFeatureBodySchema } from "@roger-protocol/specs/feature"

Non JavaScript Ecosystems

If you are implementing the Roger Protocol in another programming language than JavaScript/TypeScript (like Go, Python, Rust, ...), you can use the compiled openapi.json to generate type-safe clients with tools like openapi-generator.

The openapi.json file can be found in multiple locations:

  • In the npm package:
import openapiJson from '@roger-protocol/specs/openapi.json';
  • In the node_modules folder: Located under ../node_modules/@roger-protocol/specs/dist/openapi.json after install
  • Directly in GitHub: Attached as a static asset under the GitHub Release of your choice