Skip to content
This repository was archived by the owner on Oct 22, 2025. It is now read-only.

Commit e63bd12

Browse files
committed
chore: update docs (#1029)
1 parent 680ca62 commit e63bd12

File tree

96 files changed

+4842
-5587
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

96 files changed

+4842
-5587
lines changed

CLAUDE.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
Always include a README.md for new packages. The `README.md` should always follow this structure:
1616

1717
```md
18-
# RivetKit {subname, e.g. library: RivetKit Actors, driver and platform: RivetKit Redis Adapter, RivetKit Cloudflare Workers Adapter}
18+
# RivetKit {subname, e.g. library: Rivet Actor, driver and platform: RivetKit Redis Adapter, RivetKit Cloudflare Workers Adapter}
1919

2020
_Lightweight Libraries for Backends_
2121

docs/CLAUDE.md

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# CLAUDE.md
2+
3+
This file provides guidance to Claude Code (claude.ai/code) when working with code in this repository.
4+
5+
## Documentation Project
6+
7+
This is the documentation site for RivetKit built with Mintlify. The documentation covers RivetKit's actor-based stateful serverless framework and related integrations.
8+
9+
## Documentation Structure
10+
11+
- **actors/**: Core actor system documentation (state, actions, events, scheduling)
12+
- **clients/**: Client libraries for JavaScript/TypeScript, React, Rust
13+
- **drivers/**: Storage drivers (Memory, File System, Redis, Cloudflare Workers, Rivet)
14+
- **general/**: Architecture, authentication, testing, logging, CORS
15+
- **integrations/**: Framework integrations (Hono, Express, Elysia, tRPC, Better Auth, Vitest)
16+
- **snippets/**: Reusable content components for landing page
17+
18+
## Key Documentation Files
19+
20+
- `docs.json`: Mintlify configuration with navigation structure
21+
22+
## Documentation Style Guide
23+
24+
### File Structure
25+
- Use `.mdx` extension for all documentation files
26+
- Include frontmatter with `title`, `description`, and `sidebarTitle`
27+
- Use `icon` field for navigation icons (from Font Awesome icon set)
28+
29+
### Content Guidelines
30+
- **Concise and Direct**: Keep explanations brief and actionable
31+
- **Code-First**: Lead with practical examples, then explain concepts
32+
- **Use Cases Focus**: Emphasize practical applications over theoretical details
33+
- **Progressive Disclosure**: Start simple, link to detailed guides
34+
35+
### Code Examples
36+
- Use TypeScript for all code examples
37+
- Show complete, runnable examples when possible
38+
- Include both actor and client code where relevant
39+
- Follow RivetKit naming conventions (`actor`, `c` for context, etc.)
40+
41+
### Navigation
42+
- Group related concepts under clear categories
43+
- Use descriptive but short sidebar titles
44+
- Maintain consistent icon usage for categories
45+
46+
## Development Resources
47+
48+
- Refer to ../packages/core/fixtures/driver-test-suite/*.ts for examples of working actor definitions
49+
- Refer to ../examples/* for fully working projects. This is especially helpful when writing guides for integrations, etc.

docs/actors/actions.mdx

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ actor.
1717
Actions are defined in the `actions` object when creating a actor:
1818

1919
```typescript
20-
import { actor } from "rivetkit";
20+
import { actor } from "@rivetkit/actor";
2121

2222
const mathUtils = actor({
2323
state: {},
@@ -37,7 +37,7 @@ Each action receives a context object (commonly named `c`) as its first paramete
3737
You can define helper functions outside the actions object to keep your code organized. These functions cannot be called directly by clients:
3838

3939
```typescript
40-
import { actor } from "rivetkit";
40+
import { actor } from "@rivetkit/actor";
4141

4242
// Private helper function - not callable by clients
4343
const calculateFee = (amount) => {
@@ -62,7 +62,7 @@ const paymentProcessor = actor({
6262

6363
### Streaming Return Data
6464

65-
Actions have a single return value. To stream realtime data in response to an action, use [events](/concepts/events).
65+
Actions have a single return value. To stream realtime data in response to an action, use [events](/actors/events).
6666

6767
## Calling Actions
6868

@@ -89,7 +89,7 @@ The actor client includes type safety out of the box. When you use `createClient
8989
<CodeGroup>
9090

9191
```typescript src/index.ts
92-
import { setup } from "rivetkit";
92+
import { setup } from "@rivetkit/actor";
9393

9494
// Create simple counter
9595
const counter = actor({
@@ -140,7 +140,7 @@ For example:
140140
<CodeGroup>
141141

142142
```typescript actor.ts
143-
import { actor, UserError } from "rivetkit";
143+
import { actor, UserError } from "@rivetkit/actor";
144144

145145
const user = actor({
146146
state: { users: [] },
@@ -188,7 +188,7 @@ Data schemas are not validated by default. For production applications, use a li
188188
For example, to validate action parameters:
189189

190190
```typescript
191-
import { actor, UserError } from "rivetkit";
191+
import { actor, UserError } from "@rivetkit/actor";
192192
import { z } from "zod";
193193

194194
// Define schema for action parameters
@@ -222,7 +222,7 @@ const counter = actor({
222222

223223
## Authentication
224224

225-
By default, clients can call all actions on a actor without restriction. Make sure to implement authentication if needed. Documentation on authentication is available [here](/concepts/authentication).
225+
By default, clients can call all actions on a actor without restriction. Make sure to implement authentication if needed. Documentation on authentication is available [here](/general/authentication).
226226

227227
## Using `ActionContext` Type Externally
228228

@@ -231,7 +231,7 @@ When writing complex logic for actions, you may want to extract parts of your im
231231
RivetKit provides the `ActionContextOf` utility type for exactly this purpose:
232232

233233
```typescript
234-
import { actor, ActionContextOf } from "rivetkit";
234+
import { actor, ActionContextOf } from "@rivetkit/actor";
235235

236236
const counter = actor({
237237
state: { count: 0 },
@@ -250,4 +250,4 @@ function incrementCount(c: ActionContextOf<typeof counter>) {
250250
}
251251
```
252252

253-
See [Helper Types](/concepts/types) for more details on using `ActionContextOf` and other type utilities.
253+
See [Helper Types](/actors/helper-types) for more details on using `ActionContextOf` and other type utilities.

docs/actors/authentication.mdx

Lines changed: 0 additions & 157 deletions
This file was deleted.

0 commit comments

Comments
 (0)