Skip to content

feat: add Inngest framework#440

Open
Linell wants to merge 2 commits intoTanStack:mainfrom
Linell:linell/add-inngest-framework
Open

feat: add Inngest framework#440
Linell wants to merge 2 commits intoTanStack:mainfrom
Linell:linell/add-inngest-framework

Conversation

@Linell
Copy link
Copy Markdown

@Linell Linell commented Apr 29, 2026

Add Inngest as a framework selectable for installation during create.

Adds a new 'workflows' category because Inngest didn't fit cleanly into the others .

Summary by CodeRabbit

  • New Features

    • Inngest workflow add-on for React with local dev mode, an interactive demo page to dispatch a sample event, and an API endpoint to handle workflow requests
    • Preconfigured client and sample workflow/function to illustrate sending and handling events
  • Documentation

    • Step-by-step setup and usage guide for local development, production deployment, and creating/ registering typed events/functions
    • Environment template with guidance for local and production secrets

Add Inngest as a framework selectable for installation during `create`.

Adds a new 'workflows' category because Inngest didn't fit cleanly into
the others .
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Apr 29, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 92dc7ee6-76fa-46bc-a8dd-43c64a6b9edc

📥 Commits

Reviewing files that changed from the base of the PR and between 7f6564e and 5bc17bd.

📒 Files selected for processing (2)
  • .claude/settings.local.json
  • packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx
✅ Files skipped from review due to trivial changes (1)
  • .claude/settings.local.json
🚧 Files skipped from review as they are similar to previous changes (1)
  • packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx

📝 Walkthrough

Walkthrough

Adds a new Inngest add-on for the React template: client initialization, typed event + function, API route handler, demo UI route, docs and env guidance, package manifest, and a small types update to classify add-ons as 'workflows'.

Changes

Cohort / File(s) Summary
Add-on metadata & env
packages/create/src/frameworks/react/add-ons/inngest/README.md, packages/create/src/frameworks/react/add-ons/inngest/assets/_dot_env.local.append, packages/create/src/frameworks/react/add-ons/inngest/info.json, packages/create/src/frameworks/react/add-ons/inngest/package.json
Add README and .env guidance for local dev (INNGEST_DEV=1), add-on metadata and demo route registration, and declare inngest@^4.2.4.
Client template
packages/create/src/frameworks/react/add-ons/inngest/assets/src/inngest/client.ts.ejs
EJS template exporting a singleton inngest client initialized with the project name as ID.
Events & functions
packages/create/src/frameworks/react/add-ons/inngest/assets/src/inngest/functions.ts
Define helloWorld event (demo/hello.world, schema { name: string }) and helloWorldFn function with an async handler that waits 1s and returns a personalized message.
HTTP route handlers & demo UI
packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/api/inngest.ts, packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx
Create /api/inngest route forwarding GET/POST/PUT to the Inngest Edge handler; add /demo/inngest page with a server function to send helloWorld events, showing eventId, errors, and quick-start instructions.
Types update
packages/create/src/types.ts
Extend AddOnBaseSchema.category enum to include 'workflows'.
Local CLI settings
.claude/settings.local.json
Allow additional local permission pattern (Bash(gh api *)) in settings.

Sequence Diagram

sequenceDiagram
    actor User
    participant Browser as "React Component"
    participant Server as "Server Function (/demo/inngest)"
    participant API as "API Route (/api/inngest)"
    participant Inngest as "Inngest Client"
    participant InngestSvc as "Inngest Dev/Service"

    User->>Browser: Enter name & click "Send Event"
    Browser->>Server: POST { name }
    activate Server
    Server->>Server: Validate input
    Server->>API: Forward request (if using edge) / call inngest.send(...)
    API->>Inngest: Pass request to handler
    Inngest->>InngestSvc: Dispatch event (demo/hello.world)
    InngestSvc-->>Inngest: Return eventId
    Inngest-->>API: Return eventId
    API-->>Server: Return eventId
    deactivate Server
    Server-->>Browser: { eventId }
    Browser->>User: Display eventId / success
Loading

Estimated Code Review Effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Poem

🐰 I tunneled in with code to show,
A little event, a friendly flow,
Typed helloWorld hopped along,
Demo page sang the event ID song,
Hooray — workflows bloom and grow! 🌱

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title 'feat: add Inngest framework' directly and clearly describes the main change: introducing Inngest as a new selectable framework add-on during the create flow, which is the primary objective of all changes in the PR.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share
Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 3

🧹 Nitpick comments (1)
packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx (1)

84-88: Make async error updates screen-reader friendly.

Add live-region semantics so failures are announced when this block appears.

Accessibility tweak
-          {error && (
-            <div className="rounded-xl border border-[rgba(200,70,70,0.3)] bg-[rgba(200,70,70,0.08)] p-4 text-sm text-[`#c04646`]">
+          {error && (
+            <div
+              role="alert"
+              aria-live="assertive"
+              className="rounded-xl border border-[rgba(200,70,70,0.3)] bg-[rgba(200,70,70,0.08)] p-4 text-sm text-[`#c04646`]"
+            >
               {error}
             </div>
           )}
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In
`@packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx`
around lines 84 - 88, The error display block currently renders plain markup so
screen readers may not announce new errors; update the JSX where {error && ( ...
)} is rendered to include ARIA live-region attributes (e.g.,
aria-live="assertive" and aria-atomic="true") or role="alert" on the container
so failures are announced to assistive tech when it appears; ensure you add
these attributes to the same element that wraps {error} (the rounded-xl div) so
the message is announced immediately.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In
`@packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx`:
- Around line 97-99: Fix the copy typo in the demo Inngest route: locate the JSX
text containing "Cloud.You" and insert a space after the period so it reads
"Cloud. You" (the string appears in the demo route's paragraph in the
inngest.tsx content).
- Around line 7-12: sendHelloEvent's inputValidator is a passthrough and handler
blindly returns ids[0], so validate the incoming name (e.g., require a non-empty
string, trim and check length) in createServerFn.inputValidator and in the
handler check the result of inngest.send(helloWorld.create(...)) for a populated
ids array; if ids is empty or undefined, throw or return a clear error instead
of returning eventId: undefined (reference sendHelloEvent, inputValidator,
handler, inngest.send, and helloWorld.create).

In `@packages/create/src/frameworks/react/add-ons/inngest/info.json`:
- Around line 15-16: jsName is set to "InngestDemo" but the target file exports
the symbol "Route", causing import failures; update jsName to match the exported
symbol or change the export to match jsName. Fix by either setting jsName to
"Route" in the info.json entry (so generated imports use the existing exported
symbol Route) or alter the route module to export default InngestDemo (so the
current jsName is valid); refer to the jsName property and the exported symbol
Route when making the change.

---

Nitpick comments:
In
`@packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx`:
- Around line 84-88: The error display block currently renders plain markup so
screen readers may not announce new errors; update the JSX where {error && ( ...
)} is rendered to include ARIA live-region attributes (e.g.,
aria-live="assertive" and aria-atomic="true") or role="alert" on the container
so failures are announced to assistive tech when it appears; ensure you add
these attributes to the same element that wraps {error} (the rounded-xl div) so
the message is announced immediately.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro

Run ID: 7644bcd4-a57a-469b-af7a-765f9643a0da

📥 Commits

Reviewing files that changed from the base of the PR and between c37953e and 7f6564e.

⛔ Files ignored due to path filters (2)
  • packages/create/src/frameworks/react/add-ons/inngest/logo.svg is excluded by !**/*.svg
  • packages/create/src/frameworks/react/add-ons/inngest/small-logo.svg is excluded by !**/*.svg
📒 Files selected for processing (9)
  • packages/create/src/frameworks/react/add-ons/inngest/README.md
  • packages/create/src/frameworks/react/add-ons/inngest/assets/_dot_env.local.append
  • packages/create/src/frameworks/react/add-ons/inngest/assets/src/inngest/client.ts.ejs
  • packages/create/src/frameworks/react/add-ons/inngest/assets/src/inngest/functions.ts
  • packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/api/inngest.ts
  • packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx
  • packages/create/src/frameworks/react/add-ons/inngest/info.json
  • packages/create/src/frameworks/react/add-ons/inngest/package.json
  • packages/create/src/types.ts

Comment on lines +15 to +16
"path": "src/routes/demo/inngest.tsx",
"jsName": "InngestDemo"
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
# Verify how routes[].jsName is consumed and whether the target symbol is exported.

set -euo pipefail

echo "1) Find jsName consumers:"
rg -n -C3 '\bjsName\b'

echo
echo "2) Check declared jsName in this add-on:"
sed -n '1,120p' packages/create/src/frameworks/react/add-ons/inngest/info.json

echo
echo "3) Check exports in target route file:"
rg -n -C2 'export\s+(const|function|class)\s+' \
  packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx

Repository: TanStack/cli

Length of output: 50368


🏁 Script executed:

cat packages/create/src/frameworks/react/add-ons/inngest/assets/src/routes/demo/inngest.tsx

Repository: TanStack/cli

Length of output: 4858


jsName "InngestDemo" does not match the exported symbol "Route" in the target file.

The route file exports Route, but jsName is set to "InngestDemo". When templates are generated, this will produce import InngestDemo from '...' which will fail because that export does not exist.

💡 Proposed fix
-      "jsName": "InngestDemo"
+      "jsName": "Route"
📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"path": "src/routes/demo/inngest.tsx",
"jsName": "InngestDemo"
"path": "src/routes/demo/inngest.tsx",
"jsName": "Route"
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@packages/create/src/frameworks/react/add-ons/inngest/info.json` around lines
15 - 16, jsName is set to "InngestDemo" but the target file exports the symbol
"Route", causing import failures; update jsName to match the exported symbol or
change the export to match jsName. Fix by either setting jsName to "Route" in
the info.json entry (so generated imports use the existing exported symbol
Route) or alter the route module to export default InngestDemo (so the current
jsName is valid); refer to the jsName property and the exported symbol Route
when making the change.

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.

1 participant