Skip to content

Conversation

@NathanFlurry
Copy link
Member

No description provided.

Copilot AI and others added 12 commits January 8, 2026 13:30
…stry.serve()

Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
…h start scripts

Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
…atic serving

Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
…implify scripts

Co-authored-by: jog1t <39823706+jog1t@users.noreply.github.com>
@vercel
Copy link

vercel bot commented Jan 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
rivet-cloud Error Error Jan 10, 2026 1:38am
rivetkit-serverless Error Error Jan 10, 2026 1:38am
2 Skipped Deployments
Project Deployment Review Updated (UTC)
rivet-inspector Ignored Ignored Preview Jan 10, 2026 1:38am
rivet-site Ignored Ignored Preview Jan 10, 2026 1:38am

@vercel vercel bot temporarily deployed to Preview – rivetkit-serverless January 9, 2026 19:51 Inactive
@railway-app
Copy link

railway-app bot commented Jan 9, 2026

🚅 Deployed to the rivet-pr-3803 environment in rivet-frontend

Service Status Web Updated (UTC)
website 😴 Sleeping (View Logs) Web Jan 10, 2026 at 1:47 am
frontend-cloud 😴 Sleeping (View Logs) Web Jan 10, 2026 at 1:43 am
frontend-inspector 😴 Sleeping (View Logs) Web Jan 10, 2026 at 1:43 am

Copy link
Member Author

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more


How to use the Graphite Merge Queue

Add the label merge-queue to this PR to add it to the merge queue.

You must have a Graphite account in order to use the merge queue. Sign up using this link.

An organization admin has enabled the Graphite Merge Queue in this repository.

Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue.

This stack of pull requests is managed by Graphite. Learn more about stacking.

@claude
Copy link

claude bot commented Jan 9, 2026

PR Review: chore(rivetkit): update cloudflare workers and nextjs to latest

Thank you for this comprehensive refactoring effort! This PR makes significant progress toward standardizing the examples structure. I've identified several critical issues that should be addressed before merging.


🔴 Critical Issues

1. Broken README Links - All Implementation Sections Reference Non-Existent Paths

Problem: All example READMEs reference src/backend/registry.ts in their Implementation sections, but this path doesn't exist in any example.

Affected Examples:

  • examples/actor-actions/README.md
  • examples/ai-agent/README.md
  • examples/chat-room/README.md
  • examples/hono/README.md
  • examples/hono-react/README.md
  • examples/cloudflare-workers/README.md
  • examples/cloudflare-workers-hono/README.md
  • examples/next-js/README.md

Expected Links:

<!-- Current (broken) -->
[`src/backend/registry.ts`](src/backend/registry.ts)

<!-- Should be -->
[`src/actors.ts`](src/actors.ts)  # For most examples
[`src/registry.ts`](src/registry.ts)  # For cloudflare-workers examples

Impact: Users clicking these links get 404 errors. This breaks the documented learning path.

Fix Required: Update all README Implementation section links to point to actual file locations.


2. Inconsistent Naming: registry.ts vs actors.ts

Problem: The examples/CLAUDE.md standard mandates src/actors.ts, but some examples still use src/registry.ts.

Non-Compliant Examples:

  • examples/cloudflare-workers/src/registry.ts
  • examples/cloudflare-workers-hono/src/registry.ts
  • examples/cloudflare-workers-inline-client/src/registry.ts

Compliant Examples:

  • examples/chat-room/src/actors.ts
  • examples/ai-agent/src/actors.ts
  • examples/hono/src/actors.ts

From CLAUDE.md:

Actor definitions go in src/actors.ts

Fix Required: Rename registry.tsactors.ts in all cloudflare-workers examples and update all imports.


🟠 High Priority Issues

3. Missing ESM TypeScript Configuration

Problem: Several examples lack the required tsconfig options for ESM compliance documented in examples/CLAUDE.md.

Missing Configuration:

{
  "compilerOptions": {
    "allowImportingTsExtensions": true,
    "rewriteRelativeImportExtensions": true
  }
}

Affected Examples:

  • examples/hono/tsconfig.json
  • examples/cloudflare-workers/tsconfig.json
  • examples/cloudflare-workers-hono/tsconfig.json

Why This Matters: These options enable proper ESM-compliant .ts imports, which is a documented standard:

This is enforced by the tsconfig options allowImportingTsExtensions and rewriteRelativeImportExtensions.

Fix Required: Add these options to all example tsconfig.json files.


4. Non-Standard Next.js Structure

Problem: examples/next-js uses src/rivet/registry.ts instead of the standard src/actors.ts location.

Current Structure:

next-js/
├── src/
│   └── rivet/
│       └── registry.ts  ← Non-standard location

Expected Structure:

next-js/
├── src/
│   └── actors.ts  ← Standard location

Impact: Inconsistent with all other examples, makes it harder for developers to understand the standard pattern.

Consideration: If Next.js requires a different structure, this should be documented in examples/CLAUDE.md as an exception.


🟡 Medium Priority Issues

5. Cleanup Tasks Not Completed

The examples/CLAUDE.md TODO section lists several cleanup tasks that weren't addressed in this PR:

Still Present:

  • scripts/ directories with CLI client scripts (should be removed per TODO)
    • cloudflare-workers/scripts/client.ts
    • cloudflare-workers-hono/scripts/client.ts
    • next-js/scripts/connect.ts

From CLAUDE.md TODO:

  • Remove scripts/ directories with CLI client scripts

Fix Required: Remove these directories or update the TODO checklist if they're being kept intentionally.


6. Inconsistent Template Metadata

Problem: The package.json template field has inconsistent properties across examples.

Example A (chat-room):

"template": {
  "technologies": ["react", "typescript"],
  "tags": ["real-time"],
  "priority": 200,
  "frontendPort": 5173
}

Example B (hono):

"template": {
  "technologies": ["typescript"],
  "tags": ["backend"]
  // Missing: priority
}

Consideration: Should priority be standardized? If so, document it in examples/CLAUDE.md.


✅ What's Working Well

Strong Compliance Areas

  1. Package.json Scripts - Excellent adherence to documented patterns:

    • ✓ Vite-plugin-srvx examples use correct unified dev pattern
    • ✓ Separate frontend/backend examples use concurrently correctly
    • ✓ Backend-only examples have minimal required scripts
  2. Vite Configuration - Properly implemented across examples:

    // Unified pattern (chat-room)
    plugins: [react(), ...srvx({ entry: "src/server.ts" })]
    
    // Separate pattern (hono-react)
    proxy: { "/api/rivet/": "http://localhost:3000" }
  3. Dependency Management - Good practices:

    • srvx correctly in dependencies (not devDependencies)
    • @hono/node-server and @hono/node-ws in dependencies
    • ✓ Consistent "rivetkit": "*" usage
  4. Turbo Configuration - All examples properly extend root:

    {
      "$schema": "https://turbo.build/schema.json",
      "extends": ["//"]
    }
  5. Vercel Configuration - Correct framework detection:

    {
      "framework": "hono"
    }

    This ensures Vercel doesn't misdetect Vite and correctly uses Hono.


📋 Recommended Action Items

Before Merge (Critical)

  1. Fix all README Implementation section links (src/backend/registry.tssrc/actors.ts)
  2. Rename registry.ts to actors.ts in cloudflare-workers examples
  3. Add ESM tsconfig options to all examples

Before Merge (High Priority)

  1. Standardize next-js structure OR document it as an exception
  2. Remove scripts/ directories per CLAUDE.md TODO

Post-Merge (Medium Priority)

  1. Standardize template metadata priority field
  2. Verify all import statements use explicit .ts extensions

🎯 Overall Assessment

This PR represents substantial progress toward standardizing the examples structure. The new examples/CLAUDE.md documentation is comprehensive and well-structured. The chat-room example serves as an excellent reference implementation.

Strengths:

  • Comprehensive documentation added
  • Most examples follow the new patterns correctly
  • Configuration files are well-structured
  • Package.json scripts are consistent

Weaknesses:

  • README links are broken (critical for documentation)
  • Incomplete migration (registry.ts vs actors.ts)
  • Missing tsconfig ESM options
  • Some TODO items not addressed

Recommendation: Address the 5 critical/high-priority issues before merging. The medium-priority items can be handled in follow-up PRs.


Additional Notes

Testing Verification Needed

Since this PR touches 370 files, please verify:

  1. Build Success: All examples build without errors

    cd examples/chat-room && npm run build
    cd examples/hono && npm run build
    # etc.
  2. Type Checking: All examples pass type checks

    cd examples/chat-room && npm run check-types
    # etc.
  3. Test Suite: All tests pass

    cd examples/chat-room && npm test
    # etc.
  4. Link Validation: Verify GitHub links work in all READMEs


Great work on this refactoring effort! Let me know if you need clarification on any of these points.

@NathanFlurry NathanFlurry changed the base branch from 01-08-chore_examples_update_examples_to_standardized_format to graphite-base/3803 January 9, 2026 21:19
@NathanFlurry NathanFlurry force-pushed the 01-09-chore_rivetkit_update_cloudflare_workers_and_nextjs_to_latest branch from b5dedb8 to 16a5dd9 Compare January 10, 2026 01:29
@railway-app railway-app bot temporarily deployed to rivet-frontend / rivet-pr-3803 January 10, 2026 01:29 Destroyed
@NathanFlurry NathanFlurry changed the base branch from graphite-base/3803 to main January 10, 2026 01:29
@NathanFlurry NathanFlurry marked this pull request as ready for review January 10, 2026 01:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants