Various docs improvements (#2456)

* Added MCP to the intro

* Added human-in-the-loop and new build extensions

* Waitpoint notes

* Moved openai guardrails example to Python

* Added a connection limit note

* Added Supabase + Prisma note to supabase auth

* Updates based on what the rabbit said

* Moved the supavisor section to the prismaExtension docs
This commit is contained in:
Dan
2025-08-29 16:48:04 +01:00
committed by GitHub
parent fee31f2dc0
commit 847ea866b6
5 changed files with 123 additions and 32 deletions
@@ -137,6 +137,32 @@ export default defineConfig({
These environment variables are only used during the build process and are not embedded in the final container image.
If you're experiencing database connection issues during deployment, you may need to add `?connection_limit=1` to your `DATABASE_URL` to limit the number of concurrent connections during the build process.
</Note>
### Using with Supabase Supavisor
When using Prisma with Supabase's Supavisor pooler, use a pooled URL for Prisma Client and a session/direct URL for schema operations to avoid prepared statement conflicts. As of Feb 28, 2025, port 6543 runs Transaction Mode only; use port 5432 for Session Mode.
```ts
prismaExtension({
schema: "prisma/schema.prisma",
directUrlEnvVarName: "DATABASE_URL_UNPOOLED",
}),
```
```bash
# Environment variables
# Pooled (Transaction Mode, port 6543)
DATABASE_URL="postgresql://postgres.[PROJECT_REF]:<PASSWORD>@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1"
# Session/Direct (used by Prisma schema engine, port 5432)
DATABASE_URL_UNPOOLED="postgresql://postgres.[PROJECT_REF]:<PASSWORD>@aws-0-[REGION].pooler.supabase.com:5432/postgres"
```
<Note>
Use the pooled connection (port 6543, Transaction Mode) for regular Prisma Client queries. Use the
session/direct connection (port 5432, Session Mode) for migrations and other schema operations.
</Note>
### Multiple schemas
+1 -1
View File
@@ -341,7 +341,6 @@
"guides/example-projects/human-in-the-loop-workflow",
"guides/example-projects/mastra-agents-with-memory",
"guides/example-projects/meme-generator-human-in-the-loop",
"guides/example-projects/openai-agent-sdk-guardrails",
"guides/example-projects/openai-agents-sdk-typescript-playground",
"guides/example-projects/realtime-csv-importer",
"guides/example-projects/realtime-fal-ai",
@@ -353,6 +352,7 @@
{
"group": "Python guides",
"pages": [
"guides/example-projects/openai-agent-sdk-guardrails",
"guides/python/python-image-processing",
"guides/python/python-doc-to-markdown",
"guides/python/python-crawl4ai",

Before

Width:  |  Height:  |  Size: 25 KiB

After

Width:  |  Height:  |  Size: 25 KiB

+93 -28
View File
@@ -7,17 +7,17 @@ mode: "center"
<CardGroup cols={2}>
<Card title="Quick start" img="/images/intro-quickstart.jpg" href="/quick-start">
Get started with Trigger.dev in 3 minutes
</Card>
<Card title="Examples" img="/images/intro-examples.jpg" href="/guides/introduction#example-tasks">
Explore dozens of examples tasks to use in your own projects
Get started with Trigger.dev and run your first task in 3 minutes
</Card>
<Card
title="Frameworks"
img="/images/intro-frameworks.jpg"
href="/guides/introduction#frameworks"
title="Guides, frameworks & examples"
img="/images/intro-examples.jpg"
href="/guides/introduction#example-tasks"
>
Learn how to use Trigger.dev with your favorite frameworks
Browse our wide range of guides, frameworks and example projects
</Card>
<Card title="MCP Server" img="/images/intro-mcp.jpg" href="/mcp-introduction">
Learn how to install and configure the Trigger.dev MCP Server
</Card>
<Card title="Video walkthrough" img="/images/intro-video.jpg" href="/video-walkthrough">
Watch an end-to-end demo of Trigger.dev in 10 minutes
@@ -74,26 +74,17 @@ We provide everything you need to build and manage background tasks: a CLI and S
<Card title="Concurrency & Queues" icon="line-height" href="/queue-concurrency" color="#D946EF">
Configure what you want to happen when there is more than one run at a time.
</Card>
</CardGroup>
## Explore by example
<CardGroup cols={3}>
<Card title="FFmpeg" img="/images/intro-ffmpeg.jpg" href="/guides/examples/ffmpeg-video-processing"/>
<Card title="Fal.ai" img="/images/intro-fal.jpg" href="/guides/examples/fal-ai-image-to-cartoon"/>
<Card title="Puppeteer" img="/images/intro-puppeteer.jpg" href="/guides/examples/puppeteer"/>
<Card title="LibreOffice" img="/images/intro-libreoffice.jpg" href="/guides/examples/libreoffice-pdf-conversion"/>
<Card title="OpenAI" img="/images/intro-openai.jpg" href="/guides/examples/open-ai-with-retrying"/>
<Card title="Browserbase" img="/images/intro-browserbase.jpg" href="/guides/examples/scrape-hacker-news"/>
<Card title="Sentry" img="/images/intro-sentry.jpg" href="/guides/examples/sentry-error-tracking"/>
<Card title="Resend" img="/images/intro-resend.jpg" href="/guides/examples/resend-email-sequence"/>
<Card title="Vercel AI SDK" img="/images/intro-vercel.jpg" href="/guides/examples/vercel-ai-sdk"/>
<Card title="Sharp" img="/images/intro-sharp.jpg" href="/guides/examples/sharp-image-processing"/>
<Card title="Deepgram" img="/images/intro-deepgram.jpg" href="/guides/examples/deepgram-transcribe-audio"/>
<Card title="Supabase" img="/images/intro-supabase.jpg" href="/guides/examples/supabase-database-operations"/>
<Card title="DALL•E" img="/images/intro-openai.jpg" href="/guides/examples/dall-e3-generate-image"/>
<Card title="Firecrawl" img="/images/intro-firecrawl.jpg" href="/guides/examples/firecrawl-url-crawl"/>
<Card title="Lightpanda" img="/images/intro-lightpanda.jpg" href="/guides/examples/lightpanda"/>
<Card
title="Wait for token (human-in-the-loop)"
icon="hand"
href="/wait-for-token"
color="#EAEA08"
>
Pause runs until a token is completed via an approval workflow.
</Card>
<Card title="Build extensions" icon="gear" href="/config/extensions/overview" color="#22C55E">
Customize the build process or the resulting bundle and container image.
</Card>
</CardGroup>
## Explore by build extension
@@ -102,7 +93,9 @@ We provide everything you need to build and manage background tasks: a CLI and S
| :-------------------- | :----------------------------------------------------------- | :----------------------------------------------------- |
| prismaExtension | Use Prisma with Trigger.dev | [Learn more](/config/extensions/prismaExtension) |
| pythonExtension | Execute Python scripts in Trigger.dev | [Learn more](/config/extensions/pythonExtension) |
| playwright | Use Playwright with Trigger.dev | [Learn more](/config/extensions/playwright) |
| puppeteer | Use Puppeteer with Trigger.dev | [Learn more](/config/extensions/puppeteer) |
| lightpanda | Use Lightpanda with Trigger.dev | [Learn more](/config/extensions/lightpanda) |
| ffmpeg | Use FFmpeg with Trigger.dev | [Learn more](/config/extensions/ffmpeg) |
| aptGet | Install system packages with aptGet | [Learn more](/config/extensions/aptGet) |
| additionalFiles | Copy additional files to the build directory | [Learn more](/config/extensions/additionalFiles) |
@@ -112,6 +105,78 @@ We provide everything you need to build and manage background tasks: a CLI and S
| emitDecoratorMetadata | Support for the emitDecoratorMetadata TypeScript compiler | [Learn more](/config/extensions/emitDecoratorMetadata) |
| audioWaveform | Support for Audio Waveform in your project | [Learn more](/config/extensions/audioWaveform) |
## Explore by example
<CardGroup cols={3}>
<Card
title="FFmpeg"
img="/images/intro-ffmpeg.jpg"
href="/guides/examples/ffmpeg-video-processing"
/>
<Card
title="Fal.ai"
img="/images/intro-fal.jpg"
href="/guides/examples/fal-ai-image-to-cartoon"
/>
<Card title="Puppeteer" img="/images/intro-puppeteer.jpg" href="/guides/examples/puppeteer" />
<Card
title="LibreOffice"
img="/images/intro-libreoffice.jpg"
href="/guides/examples/libreoffice-pdf-conversion"
/>
<Card
title="OpenAI"
img="/images/intro-openai.jpg"
href="/guides/examples/open-ai-with-retrying"
/>
<Card
title="Browserbase"
img="/images/intro-browserbase.jpg"
href="/guides/examples/scrape-hacker-news"
/>
<Card
title="Sentry"
img="/images/intro-sentry.jpg"
href="/guides/examples/sentry-error-tracking"
/>
<Card
title="Resend"
img="/images/intro-resend.jpg"
href="/guides/examples/resend-email-sequence"
/>
<Card
title="Vercel AI SDK"
img="/images/intro-vercel.jpg"
href="/guides/examples/vercel-ai-sdk"
/>
<Card
title="Sharp"
img="/images/intro-sharp.jpg"
href="/guides/examples/sharp-image-processing"
/>
<Card
title="Deepgram"
img="/images/intro-deepgram.jpg"
href="/guides/examples/deepgram-transcribe-audio"
/>
<Card
title="Supabase"
img="/images/intro-supabase.jpg"
href="/guides/examples/supabase-database-operations"
/>
<Card
title="DALL•E"
img="/images/intro-openai.jpg"
href="/guides/examples/dall-e3-generate-image"
/>
<Card
title="Firecrawl"
img="/images/intro-firecrawl.jpg"
href="/guides/examples/firecrawl-url-crawl"
/>
<Card title="Lightpanda" img="/images/intro-lightpanda.jpg" href="/guides/examples/lightpanda" />
</CardGroup>
## Getting help
We'd love to hear from you or give you a hand getting started. Here are some ways to get in touch with us.
+3 -3
View File
@@ -1,6 +1,6 @@
---
title: "Wait for token"
description: "Wait until a token is completed."
description: "Wait until a token is completed using waitpoint tokens."
---
Waitpoint tokens pause task runs until you complete the token. They're commonly used for approval workflows and other scenarios where you need to wait for external confirmation, such as human-in-the-loop processes.
@@ -50,7 +50,7 @@ await wait.completeToken<ApprovalToken>(tokenId, {
});
```
Or you can make an HTTP POST request to the `url` it returns:
Or you can make an HTTP POST request to the `url` it returns. This is an HTTP callback:
```ts
import { wait } from "@trigger.dev/sdk";
@@ -502,4 +502,4 @@ const token = await wait.createToken({
idempotencyKey: "my-idempotency-key",
idempotencyKeyTTL: "1h",
});
```
```