Skip to content

Commit 847ea86

Browse files
authored
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
1 parent fee31f2 commit 847ea86

File tree

5 files changed

+123
-32
lines changed

5 files changed

+123
-32
lines changed

docs/config/extensions/prismaExtension.mdx

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -137,6 +137,32 @@ export default defineConfig({
137137

138138
These environment variables are only used during the build process and are not embedded in the final container image.
139139

140+
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.
141+
142+
</Note>
143+
144+
### Using with Supabase Supavisor
145+
146+
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.
147+
148+
```ts
149+
prismaExtension({
150+
schema: "prisma/schema.prisma",
151+
directUrlEnvVarName: "DATABASE_URL_UNPOOLED",
152+
}),
153+
```
154+
155+
```bash
156+
# Environment variables
157+
# Pooled (Transaction Mode, port 6543)
158+
DATABASE_URL="postgresql://postgres.[PROJECT_REF]:<PASSWORD>@aws-0-[REGION].pooler.supabase.com:6543/postgres?pgbouncer=true&connection_limit=1"
159+
# Session/Direct (used by Prisma schema engine, port 5432)
160+
DATABASE_URL_UNPOOLED="postgresql://postgres.[PROJECT_REF]:<PASSWORD>@aws-0-[REGION].pooler.supabase.com:5432/postgres"
161+
```
162+
163+
<Note>
164+
Use the pooled connection (port 6543, Transaction Mode) for regular Prisma Client queries. Use the
165+
session/direct connection (port 5432, Session Mode) for migrations and other schema operations.
140166
</Note>
141167

142168
### Multiple schemas

docs/docs.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -341,7 +341,6 @@
341341
"guides/example-projects/human-in-the-loop-workflow",
342342
"guides/example-projects/mastra-agents-with-memory",
343343
"guides/example-projects/meme-generator-human-in-the-loop",
344-
"guides/example-projects/openai-agent-sdk-guardrails",
345344
"guides/example-projects/openai-agents-sdk-typescript-playground",
346345
"guides/example-projects/realtime-csv-importer",
347346
"guides/example-projects/realtime-fal-ai",
@@ -353,6 +352,7 @@
353352
{
354353
"group": "Python guides",
355354
"pages": [
355+
"guides/example-projects/openai-agent-sdk-guardrails",
356356
"guides/python/python-image-processing",
357357
"guides/python/python-doc-to-markdown",
358358
"guides/python/python-crawl4ai",
File renamed without changes.

docs/introduction.mdx

Lines changed: 93 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -7,17 +7,17 @@ mode: "center"
77

88
<CardGroup cols={2}>
99
<Card title="Quick start" img="/images/intro-quickstart.jpg" href="/quick-start">
10-
Get started with Trigger.dev in 3 minutes
11-
</Card>
12-
<Card title="Examples" img="/images/intro-examples.jpg" href="/guides/introduction#example-tasks">
13-
Explore dozens of examples tasks to use in your own projects
10+
Get started with Trigger.dev and run your first task in 3 minutes
1411
</Card>
1512
<Card
16-
title="Frameworks"
17-
img="/images/intro-frameworks.jpg"
18-
href="/guides/introduction#frameworks"
13+
title="Guides, frameworks & examples"
14+
img="/images/intro-examples.jpg"
15+
href="/guides/introduction#example-tasks"
1916
>
20-
Learn how to use Trigger.dev with your favorite frameworks
17+
Browse our wide range of guides, frameworks and example projects
18+
</Card>
19+
<Card title="MCP Server" img="/images/intro-mcp.jpg" href="/mcp-introduction">
20+
Learn how to install and configure the Trigger.dev MCP Server
2121
</Card>
2222
<Card title="Video walkthrough" img="/images/intro-video.jpg" href="/video-walkthrough">
2323
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
7474
<Card title="Concurrency & Queues" icon="line-height" href="/queue-concurrency" color="#D946EF">
7575
Configure what you want to happen when there is more than one run at a time.
7676
</Card>
77-
</CardGroup>
78-
79-
## Explore by example
80-
81-
<CardGroup cols={3}>
82-
<Card title="FFmpeg" img="/images/intro-ffmpeg.jpg" href="/guides/examples/ffmpeg-video-processing"/>
83-
<Card title="Fal.ai" img="/images/intro-fal.jpg" href="/guides/examples/fal-ai-image-to-cartoon"/>
84-
<Card title="Puppeteer" img="/images/intro-puppeteer.jpg" href="/guides/examples/puppeteer"/>
85-
<Card title="LibreOffice" img="/images/intro-libreoffice.jpg" href="/guides/examples/libreoffice-pdf-conversion"/>
86-
<Card title="OpenAI" img="/images/intro-openai.jpg" href="/guides/examples/open-ai-with-retrying"/>
87-
<Card title="Browserbase" img="/images/intro-browserbase.jpg" href="/guides/examples/scrape-hacker-news"/>
88-
<Card title="Sentry" img="/images/intro-sentry.jpg" href="/guides/examples/sentry-error-tracking"/>
89-
<Card title="Resend" img="/images/intro-resend.jpg" href="/guides/examples/resend-email-sequence"/>
90-
<Card title="Vercel AI SDK" img="/images/intro-vercel.jpg" href="/guides/examples/vercel-ai-sdk"/>
91-
<Card title="Sharp" img="/images/intro-sharp.jpg" href="/guides/examples/sharp-image-processing"/>
92-
<Card title="Deepgram" img="/images/intro-deepgram.jpg" href="/guides/examples/deepgram-transcribe-audio"/>
93-
<Card title="Supabase" img="/images/intro-supabase.jpg" href="/guides/examples/supabase-database-operations"/>
94-
<Card title="DALL•E" img="/images/intro-openai.jpg" href="/guides/examples/dall-e3-generate-image"/>
95-
<Card title="Firecrawl" img="/images/intro-firecrawl.jpg" href="/guides/examples/firecrawl-url-crawl"/>
96-
<Card title="Lightpanda" img="/images/intro-lightpanda.jpg" href="/guides/examples/lightpanda"/>
77+
<Card
78+
title="Wait for token (human-in-the-loop)"
79+
icon="hand"
80+
href="/wait-for-token"
81+
color="#EAEA08"
82+
>
83+
Pause runs until a token is completed via an approval workflow.
84+
</Card>
85+
<Card title="Build extensions" icon="gear" href="/config/extensions/overview" color="#22C55E">
86+
Customize the build process or the resulting bundle and container image.
87+
</Card>
9788
</CardGroup>
9889

9990
## Explore by build extension
@@ -102,7 +93,9 @@ We provide everything you need to build and manage background tasks: a CLI and S
10293
| :-------------------- | :----------------------------------------------------------- | :----------------------------------------------------- |
10394
| prismaExtension | Use Prisma with Trigger.dev | [Learn more](/config/extensions/prismaExtension) |
10495
| pythonExtension | Execute Python scripts in Trigger.dev | [Learn more](/config/extensions/pythonExtension) |
96+
| playwright | Use Playwright with Trigger.dev | [Learn more](/config/extensions/playwright) |
10597
| puppeteer | Use Puppeteer with Trigger.dev | [Learn more](/config/extensions/puppeteer) |
98+
| lightpanda | Use Lightpanda with Trigger.dev | [Learn more](/config/extensions/lightpanda) |
10699
| ffmpeg | Use FFmpeg with Trigger.dev | [Learn more](/config/extensions/ffmpeg) |
107100
| aptGet | Install system packages with aptGet | [Learn more](/config/extensions/aptGet) |
108101
| 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
112105
| emitDecoratorMetadata | Support for the emitDecoratorMetadata TypeScript compiler | [Learn more](/config/extensions/emitDecoratorMetadata) |
113106
| audioWaveform | Support for Audio Waveform in your project | [Learn more](/config/extensions/audioWaveform) |
114107

108+
## Explore by example
109+
110+
<CardGroup cols={3}>
111+
<Card
112+
title="FFmpeg"
113+
img="/images/intro-ffmpeg.jpg"
114+
href="/guides/examples/ffmpeg-video-processing"
115+
/>
116+
<Card
117+
title="Fal.ai"
118+
img="/images/intro-fal.jpg"
119+
href="/guides/examples/fal-ai-image-to-cartoon"
120+
/>
121+
<Card title="Puppeteer" img="/images/intro-puppeteer.jpg" href="/guides/examples/puppeteer" />
122+
<Card
123+
title="LibreOffice"
124+
img="/images/intro-libreoffice.jpg"
125+
href="/guides/examples/libreoffice-pdf-conversion"
126+
/>
127+
<Card
128+
title="OpenAI"
129+
img="/images/intro-openai.jpg"
130+
href="/guides/examples/open-ai-with-retrying"
131+
/>
132+
<Card
133+
title="Browserbase"
134+
img="/images/intro-browserbase.jpg"
135+
href="/guides/examples/scrape-hacker-news"
136+
/>
137+
<Card
138+
title="Sentry"
139+
img="/images/intro-sentry.jpg"
140+
href="/guides/examples/sentry-error-tracking"
141+
/>
142+
<Card
143+
title="Resend"
144+
img="/images/intro-resend.jpg"
145+
href="/guides/examples/resend-email-sequence"
146+
/>
147+
<Card
148+
title="Vercel AI SDK"
149+
img="/images/intro-vercel.jpg"
150+
href="/guides/examples/vercel-ai-sdk"
151+
/>
152+
<Card
153+
title="Sharp"
154+
img="/images/intro-sharp.jpg"
155+
href="/guides/examples/sharp-image-processing"
156+
/>
157+
<Card
158+
title="Deepgram"
159+
img="/images/intro-deepgram.jpg"
160+
href="/guides/examples/deepgram-transcribe-audio"
161+
/>
162+
<Card
163+
title="Supabase"
164+
img="/images/intro-supabase.jpg"
165+
href="/guides/examples/supabase-database-operations"
166+
/>
167+
<Card
168+
title="DALL•E"
169+
img="/images/intro-openai.jpg"
170+
href="/guides/examples/dall-e3-generate-image"
171+
/>
172+
<Card
173+
title="Firecrawl"
174+
img="/images/intro-firecrawl.jpg"
175+
href="/guides/examples/firecrawl-url-crawl"
176+
/>
177+
<Card title="Lightpanda" img="/images/intro-lightpanda.jpg" href="/guides/examples/lightpanda" />
178+
</CardGroup>
179+
115180
## Getting help
116181

117182
We'd love to hear from you or give you a hand getting started. Here are some ways to get in touch with us.

docs/wait-for-token.mdx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: "Wait for token"
3-
description: "Wait until a token is completed."
3+
description: "Wait until a token is completed using waitpoint tokens."
44
---
55

66
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, {
5050
});
5151
```
5252

53-
Or you can make an HTTP POST request to the `url` it returns:
53+
Or you can make an HTTP POST request to the `url` it returns. This is an HTTP callback:
5454

5555
```ts
5656
import { wait } from "@trigger.dev/sdk";
@@ -502,4 +502,4 @@ const token = await wait.createToken({
502502
idempotencyKey: "my-idempotency-key",
503503
idempotencyKeyTTL: "1h",
504504
});
505-
```
505+
```

0 commit comments

Comments
 (0)