Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
68 changes: 68 additions & 0 deletions .claude/resources/EXAMPLE_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
# Example README Template

All example READMEs in `/examples/` should follow this structure with exact section headings:

```markdown
<header with title and description>

## Getting Started

[Setup instructions - how to install dependencies and run the example]

## Features

[3-5 features that highlight what this example demonstrates, focusing on RivetKit concepts:]

- Documents dashboard with pagination, drafts, groups, auto-revalidation
- Collaborative whiteboard app with a fully-featured share menu
- Authentication compatible with GitHub, Google, Auth0, and more
- Document permissions can be scoped to users, groups, and the public

## Prerequisites

[Only include this section if there are non-obvious prerequisites like API keys or external services.
Do not include obvious requirements like "Node.js" or "pnpm". For example:]

- OpenAI API Key
- PostgreSQL database

## Implementation

[Explain the key technical concepts, architecture, or implementation details. Always include GitHub
source code links to key files. For example:]

This example works by packaging your application code and uploading it to Freestyle.

See the implementation in [`src/backend/registry.ts`](https://github.com/rivet-dev/rivet/tree/main/examples/example-name/src/backend/registry.ts).

## Resources

[Link to relevant RivetKit documentation that helps users understand the concepts demonstrated:]

Read more about [actions](/docs/actors/actions) and [state](/docs/actors/state).

## License

[License info - typically MIT]
```

## Section Heading Convention

Use these exact section headings (case-sensitive):
- `## Getting Started` - Setup instructions
- `## Features` - Feature list
- `## Prerequisites` - Only if needed for non-obvious dependencies
- `## Implementation` - Technical details (NOT "How it Works")
- `## Resources` - Links to relevant documentation
- `## License` - License info

## Guidelines

- **Features**: Focus on what RivetKit concepts the example demonstrates, not just what the app does. Highlight patterns like actor communication, state management, WebSocket handling, etc.
- **Prerequisites**: Only include if the example requires non-obvious dependencies (API keys, external services). Skip obvious tooling like Node.js or pnpm.
- **Implementation**: Always required. Explain the technical details and include GitHub source code links to key files.
- **Resources**: Always include links to relevant RivetKit documentation that relates to the concepts in the example.
- **Source Code Links**: Use GitHub links in the format: `https://github.com/rivet-dev/rivet/tree/main/examples/{example-name}/{path}`
- Example: `https://github.com/rivet-dev/rivet/tree/main/examples/ai-agent/src/backend/actors/agent.ts`
- **Formatting**: Do not use em dashes (—). Use hyphens (-) or rephrase sentences instead.
- Preserve existing header content (title, description) and license section.
4 changes: 4 additions & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -47,3 +47,7 @@ LICENSE*
# Frontend
!frontend/dist/

# RivetKit packages (need pre-built dist for screenshot generation)
!rivetkit-typescript/packages/*/dist/
!engine/sdks/typescript/*/dist/

5 changes: 5 additions & 0 deletions CLAUDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,10 @@ gt m

- If you need to look at the documentation for a package, visit `https://docs.rs/{package-name}`. For example, serde docs live at https://docs.rs/serde/

## Examples

All example READMEs in `/examples/` should follow the format defined in `.claude/resources/EXAMPLE_TEMPLATE.md`.

## Architecture

### Monorepo Structure
Expand Down Expand Up @@ -184,3 +188,4 @@ Data structures often include:

- When talking about "Rivet Actors" make sure to capitalize "Rivet Actor" as a proper noun and lowercase "actor" as a generic noun


34 changes: 34 additions & 0 deletions examples/actor-actions/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

50 changes: 25 additions & 25 deletions examples/ai-agent/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

7 changes: 5 additions & 2 deletions examples/ai-agent/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions examples/ai-agent/vite.config.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

48 changes: 17 additions & 31 deletions examples/ai-and-user-generated-actors-freestyle/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

17 changes: 15 additions & 2 deletions examples/ai-and-user-generated-actors-freestyle/package.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

34 changes: 34 additions & 0 deletions examples/chat-room-next-js/README.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading
Loading