Rpc is a full-stack RPC (Remote Procedure Call) framework for TypeScript. Define an API on the server and share its type with the client to get autocompletion and end-to-end type checking, without sharing server implementations with the browser.
The framework uses standard Web API Request and Response objects. It works with SvelteKit, Next.js, Nuxt, Express, Hono, and compatible Node.js or edge runtimes. MessagePack is the primary transport, with JSON support and multipart file uploads.
The central idea is to keep the API contract close to its implementation. A nested server object becomes the shape of the client: related endpoints can live under groups such as posts, and callers use those same names rather than assembling endpoint URLs themselves. The shared contract is a TypeScript type, while the actual call still crosses an HTTP boundary.
Who this book is for
This book is for TypeScript developers integrating Rpc into an application. Familiarity with async functions, HTTP, and your chosen web framework is helpful. The chapters adapt the project's English documentation into a self-contained BookMD book.
Reading guide
Getting started: install the package and connect a server API to a typed client.
You can read the chapters in order or go directly to the topic needed for your integration.
For a first integration, start with one read endpoint and one command, then connect them through the adapter for your framework. Once that round trip works, add validation and authorization before expanding the API. The protocol chapter is most useful when inspecting requests, integrating a non-Rpc client, or diagnosing an encoding mismatch.
Rpc — Type-safe APIs with TypeScript
Rpc is a full-stack RPC (Remote Procedure Call) framework for TypeScript. Define an API on the server and share its type with the client to get autocompletion and end-to-end type checking, without sharing server implementations with the browser.
The framework uses standard Web API
RequestandResponseobjects. It works with SvelteKit, Next.js, Nuxt, Express, Hono, and compatible Node.js or edge runtimes. MessagePack is the primary transport, with JSON support and multipart file uploads.The central idea is to keep the API contract close to its implementation. A nested server object becomes the shape of the client: related endpoints can live under groups such as
posts, and callers use those same names rather than assembling endpoint URLs themselves. The shared contract is a TypeScript type, while the actual call still crosses an HTTP boundary.Who this book is for
This book is for TypeScript developers integrating Rpc into an application. Familiarity with async functions, HTTP, and your chosen web framework is helpful. The chapters adapt the project's English documentation into a self-contained BookMD book.
Reading guide
You can read the chapters in order or go directly to the topic needed for your integration.
For a first integration, start with one read endpoint and one command, then connect them through the adapter for your framework. Once that round trip works, add validation and authorization before expanding the API. The protocol chapter is most useful when inspecting requests, integrating a non-Rpc client, or diagnosing an encoding mismatch.