Skip to content

Added basic trigger + nextjs hello world#100

Merged
D-K-P merged 7 commits intomainfrom
trigger-nextjs-hello-world
Mar 12, 2026
Merged

Added basic trigger + nextjs hello world#100
D-K-P merged 7 commits intomainfrom
trigger-nextjs-hello-world

Conversation

@D-K-P
Copy link
Copy Markdown
Member

@D-K-P D-K-P commented Mar 12, 2026

Summary by CodeRabbit

Release Notes

  • New Features

    • Added a Next.js + Trigger.dev "Hello World" example project demonstrating end-to-end task triggering, infrastructure-managed execution with retry logic, and real-time result retrieval.
  • Documentation

    • Expanded examples catalog with new Next.js integration example entry.
    • Added comprehensive project documentation covering local development setup, cloud deployment via Vercel, and links to platform resources and guides.

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

Warning

Rate limit exceeded

@D-K-P has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 18 minutes and 37 seconds before requesting another review.

⌛ How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 8d3439ab-6627-4fc0-aa60-ec5d008b0767

📥 Commits

Reviewing files that changed from the base of the PR and between 273bf43 and 34dd9a9.

📒 Files selected for processing (4)
  • trigger-nextjs-hello-world/README.md
  • trigger-nextjs-hello-world/app/api/hello/route.ts
  • trigger-nextjs-hello-world/app/components/trigger-logo.tsx
  • trigger-nextjs-hello-world/trigger/hello-world.ts

Walkthrough

This pull request adds a complete Next.js + Trigger.dev "Hello World" example project to the repository. The changes include updating the main README with a new example entry, and creating a new directory containing a minimal Next.js application that demonstrates Trigger.dev integration. The example includes configuration files (Next.js, TypeScript, PostCSS, Trigger.dev), an API route that triggers a Trigger.dev task, a client-side page with state management for displaying results, a reusable SVG logo component, styling with Tailwind CSS, task definitions, and comprehensive documentation.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~22 minutes

🚥 Pre-merge checks | ✅ 2 | ❌ 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 (2 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title accurately describes the main change: adding a basic Trigger.dev + Next.js hello world example to the repository.

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

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch trigger-nextjs-hello-world
📝 Coding Plan for PR comments
  • Generate coding plan

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

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

@D-K-P
Copy link
Copy Markdown
Member Author

D-K-P commented Mar 12, 2026

@CodeRabbit review

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 12, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@D-K-P D-K-P marked this pull request as ready for review March 12, 2026 16:11
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: 4

🧹 Nitpick comments (1)
trigger-nextjs-hello-world/package.json (1)

20-24: Consider adding @types/react-dom to devDependencies.

Since react-dom is listed in dependencies, adding the corresponding type definitions would improve TypeScript support.

📦 Proposed fix
   "devDependencies": {
     "@types/node": "^22.0.0",
     "@types/react": "^19.0.0",
+    "@types/react-dom": "^19.0.0",
     "typescript": "^5.7.0"
   }
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@trigger-nextjs-hello-world/package.json` around lines 20 - 24, The
package.json currently lists "react-dom" under dependencies but is missing
TypeScript types; add "@types/react-dom" to devDependencies in package.json so
TypeScript picks up DOM-related React type definitions; update the
devDependencies block (next to "@types/react" and "@types/node") to include the
"@types/react-dom" entry with an appropriate semver (e.g., matching React
version) and run install to update lockfile.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@trigger-nextjs-hello-world/app/api/hello/route.ts`:
- Around line 5-13: The POST handler currently lets errors from
tasks.trigger("hello-world", ...) bubble up; wrap the call in a try/catch inside
the exported POST function, and on error return a JSON response via
NextResponse.json with an error payload (e.g. { error: true, message:
err.message, details: ... }) and an appropriate non-2xx status (e.g. 500),
preserving the successful response structure (id/publicAccessToken) when no
error occurs; update references in the catch to use the same handle variable and
include enough error info to diagnose Trigger failures.

In `@trigger-nextjs-hello-world/app/page.tsx`:
- Around line 61-67: The anchor wrapping the TriggerLogo SVG lacks an accessible
name so screen readers announce it as an unlabeled link; update the <a> element
that contains TriggerLogo (or the TriggerLogo component itself) to provide an
accessible name—either add an aria-label attribute to the anchor (e.g.,
aria-label="Trigger homepage") or modify the TriggerLogo component to accept and
render a title prop—so the link is properly announced by assistive technology.

In `@trigger-nextjs-hello-world/README.md`:
- Line 3: Update the Vercel deploy button URL in README.md to remove the
extraneous “.js” suffix so it points to the correct repository name; locate the
Markdown link line containing
"https://vercel.com/new/clone?repository-url=https://github.com/triggerdotdev/trigger-nextjs-hello-world.js"
and change the repository-url parameter to
"https://github.com/triggerdotdev/trigger-nextjs-hello-world" (retain the rest
of the query string).

In `@trigger-nextjs-hello-world/trigger.config.ts`:
- Around line 3-5: The config currently uses process.env.TRIGGER_PROJECT_REF!
which only silences TS and can pass undefined at runtime; modify the file to
read the env into a const (e.g., const projectRef =
process.env.TRIGGER_PROJECT_REF) and immediately throw a clear Error if it's
falsy, then pass that validated projectRef into defineConfig's project property
(refer to defineConfig and the project property) so the app fails fast when
TRIGGER_PROJECT_REF is missing.

---

Nitpick comments:
In `@trigger-nextjs-hello-world/package.json`:
- Around line 20-24: The package.json currently lists "react-dom" under
dependencies but is missing TypeScript types; add "@types/react-dom" to
devDependencies in package.json so TypeScript picks up DOM-related React type
definitions; update the devDependencies block (next to "@types/react" and
"@types/node") to include the "@types/react-dom" entry with an appropriate
semver (e.g., matching React version) and run install to update lockfile.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 9f8438cb-48de-44ab-ada7-321ba9238e71

📥 Commits

Reviewing files that changed from the base of the PR and between 5054351 and 273bf43.

⛔ Files ignored due to path filters (2)
  • trigger-nextjs-hello-world/app/favicon.ico is excluded by !**/*.ico
  • trigger-nextjs-hello-world/pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (15)
  • README.md
  • trigger-nextjs-hello-world/.env.example
  • trigger-nextjs-hello-world/.gitignore
  • trigger-nextjs-hello-world/README.md
  • trigger-nextjs-hello-world/app/api/hello/route.ts
  • trigger-nextjs-hello-world/app/components/trigger-logo.tsx
  • trigger-nextjs-hello-world/app/globals.css
  • trigger-nextjs-hello-world/app/layout.tsx
  • trigger-nextjs-hello-world/app/page.tsx
  • trigger-nextjs-hello-world/next.config.ts
  • trigger-nextjs-hello-world/package.json
  • trigger-nextjs-hello-world/postcss.config.mjs
  • trigger-nextjs-hello-world/trigger.config.ts
  • trigger-nextjs-hello-world/trigger/hello-world.ts
  • trigger-nextjs-hello-world/tsconfig.json

@D-K-P D-K-P merged commit fc50453 into main Mar 12, 2026
1 check passed
@D-K-P D-K-P deleted the trigger-nextjs-hello-world branch March 12, 2026 16: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.

2 participants