tRPC Integration

Example project demonstrating tRPC integration.

Features

  • tRPC integration: Use tRPC for type-safe API endpoints that call Rivet Actors
  • End-to-end type safety: Full TypeScript types from frontend to actor actions
  • React Query integration: Automatic caching and real-time updates with tRPC React hooks
  • Actor backend: Rivet Actors handle business logic while tRPC provides the API layer

Implementation

This example demonstrates integrating tRPC with Rivet Actors:

  • Actor Definition (src/backend/registry.ts): Shows how to integrate tRPC router with actors for end-to-end type safety

Resources

Read more about actions, state, and setup.