Skip to main content

Templates

Explore templates to quickly start building with Rivet Actors, or give this to your coding agent to build something new.

Give this to your coding agent
Hello World

Hello World

A minimal example demonstrating RivetKit with a real-time counter shared across multiple clients.

Sandbox

Sandbox

Unified sandbox showcasing Rivet Actor features with a single registry, grouped navigation, and interactive demos.

AI Agent

AI Agent

Example project demonstrating queue-driven Rivet Actor AI agents with streaming Vercel AI SDK responses.

Sandbox Coding Agent

Sandbox Coding Agent

Example project demonstrating queue-driven Rivet Actor sessions that control a Sandbox Agent coding runtime.

Chat Room

Chat Room

Example project demonstrating real-time messaging and actor state management.

Collaborative Document

Collaborative Document

A shared text editor that uses Rivet Actors with Yjs for real-time CRDT sync and presence.

Per-Tenant Database

Per-Tenant Database

Example project demonstrating per-company database isolation with Rivet Actor state.

Real-time Collaborative Cursors

Real-time Collaborative Cursors

Example project demonstrating real-time cursor tracking and collaborative canvas.

User and AI Generated Actors Freestyle Deployer

User and AI Generated Actors Freestyle Deployer

Shows how to deploy user or AI-generated Rivet Actor code using a sandboxed namespace and Freestyle

Multiplayer Game

Multiplayer Game

A real-time Agar.io style arena showing a matchmaker coordinator and GameRoom data actors.

Actor Actions

Actor Actions

Demonstrates how to define and call actions on Rivet Actors for RPC-style communication between actors and clients.

Cross-Actor Actions

Cross-Actor Actions

Demonstrates how actors can call actions on other actors for inter-actor communication and coordination.

Geo-Distributed Database

Geo-Distributed Database

Store user session state in edge-local Rivet Actors so preferences and activity stay close to users.

Raw Fetch Handler Example

Raw Fetch Handler Example

Example project demonstrating raw HTTP fetch handling with Hono integration.

Raw WebSocket Handler

Raw WebSocket Handler

Demonstrates raw WebSocket handling with direct actor connections and real-time chat functionality.

Scheduling

Scheduling

Demonstrates how to schedule tasks and execute code at specific times or intervals using Rivet Actors.

State Management

State Management

Demonstrates persistent state management in Rivet Actors with automatic state saving and restoration.

Cloudflare Workers

Example project demonstrating Cloudflare Workers deployment.

Cloudflare Workers with Hono

Example project demonstrating Cloudflare Workers deployment with Hono router.

Real-time Collaborative Cursors (Raw WebSocket)

Real-time Collaborative Cursors (Raw WebSocket)

Demonstrates real-time cursor tracking and collaborative canvas using raw WebSocket handlers instead of RivetKit's higher-level WebSocket abstraction.

Custom Serverless

Example demonstrating custom serverless actor deployment with automatic engine configuration.

Elysia Integration

Example project demonstrating Elysia web framework integration.

AI Agent with Durable Streams (Experimental)

AI Agent with Durable Streams (Experimental)

Example project demonstrating how to build an AI agent that communicates through durable streams for reliable message delivery and persistence.

Hono Integration

Build type-safe HTTP APIs with Hono web framework and RivetKit Actors. Features lightweight routing, middleware support, and seamless actor integration.

Hono + React

Hono + React

Example demonstrating full-stack Hono backend with React frontend integration.

Kitchen Sink Example

Kitchen Sink Example

Example project demonstrating all RivetKit features.

Native WebSockets

Native WebSockets

Demonstrates native WebSocket integration with Rivet Actors for real-time bidirectional communication.

Next.js

Next.js

Minimal Next.js example demonstrating basic actor state management and real-time updates.

Raw WebSocket Handler Proxy

Raw WebSocket Handler Proxy

Demonstrates raw WebSocket handling using a proxy endpoint pattern for routing connections to actors.

React Integration

React Integration

Demonstrates React frontend integration with Rivet Actors.

Drizzle Integration

Demonstrates Drizzle ORM integration with Rivet Actors for type-safe database operations.

SQLite Raw Example

This example demonstrates using the raw SQLite driver with RivetKit actors.

Stream Processor

Stream Processor

Example project demonstrating real-time top-K stream processing.

tRPC Integration

Example project demonstrating tRPC integration.