Skip to content

Commit f43468e

Browse files
committed
More improvements
1 parent e38c062 commit f43468e

4 files changed

Lines changed: 369 additions & 120 deletions

File tree

docs/guides/use-cases/data-processing-etl.mdx

Lines changed: 85 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,98 @@ Process thousands of records simultaneously while respecting API rate limits. Sc
4646

4747
Show row-by-row processing status updating live in your dashboard. Users see exactly where processing is and how long remains.
4848

49-
## Common workflows
50-
51-
Here are some basic examples of data processing and ETL workflows:
49+
## Example workflows
5250

5351
<Tabs>
52+
<Tab title="CSV import">
53+
Simple CSV import pipeline. Receives file upload, parses CSV rows, validates data, imports to database with progress tracking.
54+
55+
<div align="center">
56+
57+
```mermaid
58+
graph TB
59+
A[importCSV] --> B[parseCSVFile]
60+
B --> C[validateRows]
61+
C --> D[bulkInsertToDB]
62+
D --> E[notifyCompletion]
63+
```
64+
65+
</div>
66+
</Tab>
67+
5468
<Tab title="ETL pipeline">
55-
<Steps>
56-
<Step title="Extract">Pull from APIs, databases, S3, or web scraping</Step>
57-
<Step title="Transform">Clean, validate, enrich data</Step>
58-
<Step title="Load">Write to warehouse, database, or storage</Step>
59-
<Step title="Monitor">Track progress, handle failures</Step>
60-
</Steps>
69+
**Coordinator pattern with parallel extraction**. Batch triggers parallel extraction from multiple sources (APIs, databases, S3), transforms and validates data, loads to data warehouse with monitoring.
70+
71+
<div align="center">
72+
73+
```mermaid
74+
graph TB
75+
A[runETLPipeline] --> B[coordinateExtraction]
76+
B --> C[batchTriggerAndWait]
77+
78+
C --> D[extractFromAPI]
79+
C --> E[extractFromDatabase]
80+
C --> F[extractFromS3]
81+
82+
D --> G[transformData]
83+
E --> G
84+
F --> G
85+
86+
G --> H[validateData]
87+
H --> I[loadToWarehouse]
88+
```
89+
90+
</div>
6191
</Tab>
92+
6293
<Tab title="Web scraping">
63-
<Steps>
64-
<Step title="Navigate">Load target pages with headless browser</Step>
65-
<Step title="Extract">Pull content, links, structured data</Step>
66-
<Step title="Transform">Clean HTML, parse JSON, normalize data</Step>
67-
<Step title="Store">Save to database or file storage</Step>
68-
</Steps>
94+
**Coordinator pattern with browser automation**. Launches headless browsers in parallel to scrape multiple pages, extracts structured data, cleans and normalizes content, stores in database.
95+
96+
<div align="center">
97+
98+
```mermaid
99+
graph TB
100+
A[scrapeSite] --> B[coordinateScraping]
101+
B --> C[batchTriggerAndWait]
102+
103+
C --> D[scrapePage1]
104+
C --> E[scrapePage2]
105+
C --> F[scrapePageN]
106+
107+
D --> G[cleanData]
108+
E --> G
109+
F --> G
110+
111+
G --> H[normalizeData]
112+
H --> I[storeInDatabase]
113+
```
114+
115+
</div>
69116
</Tab>
117+
70118
<Tab title="Batch enrichment">
71-
<Steps>
72-
<Step title="Query">Fetch records needing enrichment</Step>
73-
<Step title="Enrich">Call external APIs in parallel batches</Step>
74-
<Step title="Validate">Check data quality and completeness</Step>
75-
<Step title="Update">Write enriched data back to database</Step>
76-
</Steps>
77-
</Tab>
78-
<Tab title="File processing">
79-
<Steps>
80-
<Step title="Upload">Receive file via webhook or storage event</Step>
81-
<Step title="Parse">Read CSV, JSON, XML, or binary format</Step>
82-
<Step title="Process">Transform, validate, chunk large files</Step>
83-
<Step title="Import">Bulk insert to database or data warehouse</Step>
84-
</Steps>
119+
**Coordinator pattern with rate limiting**. Fetches records needing enrichment, batch triggers parallel API calls with configurable concurrency to respect rate limits, validates enriched data, updates database.
120+
121+
<div align="center">
122+
123+
```mermaid
124+
graph TB
125+
A[enrichRecords] --> B[fetchRecordsToEnrich]
126+
B --> C[coordinateEnrichment]
127+
C --> D[batchTriggerAndWait]
128+
129+
D --> E[enrichRecord1]
130+
D --> F[enrichRecord2]
131+
D --> G[enrichRecordN]
132+
133+
E --> H[validateEnrichedData]
134+
F --> H
135+
G --> H
136+
137+
H --> I[updateDatabase]
138+
```
139+
140+
</div>
85141
</Tab>
86142
</Tabs>
87143

docs/guides/use-cases/marketing.mdx

Lines changed: 80 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -50,45 +50,93 @@ Messages send exactly once, even after retries. Personalized content isn't regen
5050

5151
Process thousands in parallel while respecting rate limits. Send to entire segments without overwhelming APIs.
5252

53-
## Common workflows
54-
55-
Here are some basic examples of marketing workflows:
53+
## Example workflows
5654

5755
<Tabs>
58-
<Tab title="Drip campaigns">
59-
<Steps>
60-
<Step title="Trigger">User signs up or performs action</Step>
61-
<Step title="Segment">Query database for targeting criteria</Step>
62-
<Step title="Wait">Pause for specified time (hours/days)</Step>
63-
<Step title="Send">Deliver personalized message</Step>
64-
<Step title="Track">Log engagement and trigger next step</Step>
65-
</Steps>
56+
<Tab title="Email sequence">
57+
Simple drip campaign. User signs up, waits specified delay, sends personalized email, tracks engagement.
58+
59+
<div align="center">
60+
61+
```mermaid
62+
graph TB
63+
A[startDripCampaign] --> B[fetchUserData]
64+
B --> C[wait.for 24h]
65+
C --> D[sendPersonalizedEmail]
66+
D --> E[trackEngagement]
67+
```
68+
69+
</div>
6670
</Tab>
67-
<Tab title="Real-time personalization">
68-
<Steps>
69-
<Step title="User action">Cart add, page view, feature usage</Step>
70-
<Step title="Fetch data">Pull user profile and preferences</Step>
71-
<Step title="Generate content">Create personalized message</Step>
72-
<Step title="Deliver">Send via email, SMS, or in-app</Step>
73-
</Steps>
71+
72+
<Tab title="Multi-channel">
73+
**Router pattern with delay orchestration**. User action triggers campaign, router selects channel based on preferences (email/SMS/push), coordinates multi-day sequence with delays between messages, tracks engagement across channels.
74+
75+
<div align="center">
76+
77+
```mermaid
78+
graph TB
79+
A[startCampaign] --> B[fetchUserProfile]
80+
B --> C[selectChannel]
81+
C --> D{Preferred<br/>Channel?}
82+
83+
D -->|Email| E[sendEmail1]
84+
D -->|SMS| F[sendSMS1]
85+
D -->|Push| G[sendPush1]
86+
87+
E --> H[wait.for 2d]
88+
F --> H
89+
G --> H
90+
91+
H --> I[sendFollowUp]
92+
I --> J[trackConversion]
93+
```
94+
95+
</div>
7496
</Tab>
97+
7598
<Tab title="Content approval">
76-
<Steps>
77-
<Step title="Create draft">Generate AI content or asset</Step>
78-
<Step title="Human review">Pause for approval workflow</Step>
79-
<Step title="Revise">Apply feedback if needed</Step>
80-
<Step title="Approve">Mark ready for publishing</Step>
81-
<Step title="Publish">Deploy to channels</Step>
82-
</Steps>
99+
**Supervisor pattern with approval gate**. Generates AI marketing content (images, copy, assets), pauses with wait.for for human review, applies revisions if needed, publishes to channels after approval.
100+
101+
<div align="center">
102+
103+
```mermaid
104+
graph TB
105+
A[createCampaignAssets] --> B[generateAIContent]
106+
B --> C[wait.for approval]
107+
C --> D{Approved?}
108+
109+
D -->|Yes| E[publishToChannels]
110+
D -->|Needs revision| F[applyFeedback]
111+
F --> B
112+
```
113+
114+
</div>
83115
</Tab>
116+
84117
<Tab title="Survey analysis">
85-
<Steps>
86-
<Step title="Response">User completes survey</Step>
87-
<Step title="Enrich data">Add context from CRM</Step>
88-
<Step title="Analyze">Score and categorize</Step>
89-
<Step title="Update CRM">Save insights</Step>
90-
<Step title="Trigger follow-up">Send personalized response</Step>
91-
</Steps>
118+
**Coordinator pattern with enrichment**. User completes survey, batch triggers parallel enrichment from CRM/analytics, analyzes and scores responses, updates customer profiles, triggers personalized follow-up campaigns.
119+
120+
<div align="center">
121+
122+
```mermaid
123+
graph TB
124+
A[processSurveyResponse] --> B[coordinateEnrichment]
125+
B --> C[batchTriggerAndWait]
126+
127+
C --> D[fetchCRMData]
128+
C --> E[fetchAnalytics]
129+
C --> F[fetchBehaviorData]
130+
131+
D --> G[analyzeAndScore]
132+
E --> G
133+
F --> G
134+
135+
G --> H[updateCRMProfile]
136+
H --> I[triggerFollowUp]
137+
```
138+
139+
</div>
92140
</Tab>
93141
</Tabs>
94142

docs/guides/use-cases/media-generation.mdx

Lines changed: 70 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -46,42 +46,84 @@ Handle generations that take minutes or hours without execution limits. Perfect
4646

4747
Add review steps before publishing AI-generated content. Pause workflows for human approval using waitpoint tokens.
4848

49-
## Common workflows
50-
51-
Here are some basic examples of AI media generation workflows:
49+
## Example workflows
5250

5351
<Tabs>
54-
<Tab title="Single generation">
55-
<Steps>
56-
<Step title="Input">Receive prompts and parameters</Step>
57-
<Step title="Generate">Call AI API (OpenAI, Replicate, Fal.ai)</Step>
58-
<Step title="Post-process">Upscale, optimize, apply transformations</Step>
59-
<Step title="Deliver">Upload to storage, update database</Step>
60-
</Steps>
52+
<Tab title="Image generation">
53+
Simple AI image generation. Receives prompt and parameters, calls OpenAI DALL·E 3, post-processes result, uploads to storage.
54+
55+
<div align="center">
56+
57+
```mermaid
58+
graph TB
59+
A[generateImage] --> B[callDALLE3]
60+
B --> C[optimizeImage]
61+
C --> D[uploadToStorage]
62+
D --> E[updateDatabase]
63+
```
64+
65+
</div>
6166
</Tab>
67+
6268
<Tab title="Batch generation">
63-
<Steps>
64-
<Step title="Queue">Receive batch of generation requests</Step>
65-
<Step title="Generate">Process hundreds in parallel with rate limiting</Step>
66-
<Step title="Quality check">Validate outputs, filter failures</Step>
67-
<Step title="Deliver">Store results, notify completion</Step>
68-
</Steps>
69+
**Coordinator pattern with rate limiting**. Receives batch of generation requests, coordinates parallel processing with configurable concurrency to respect API rate limits, validates outputs, stores results.
70+
71+
<div align="center">
72+
73+
```mermaid
74+
graph TB
75+
A[processBatch] --> B[coordinateGeneration]
76+
B --> C[batchTriggerAndWait]
77+
78+
C --> D[generateImage1]
79+
C --> E[generateImage2]
80+
C --> F[generateImageN]
81+
82+
D --> G[validateResults]
83+
E --> G
84+
F --> G
85+
86+
G --> H[storeResults]
87+
H --> I[notifyCompletion]
88+
```
89+
90+
</div>
6991
</Tab>
92+
7093
<Tab title="Multi-step pipeline">
71-
<Steps>
72-
<Step title="Generate">Create initial content with AI</Step>
73-
<Step title="Transform">Apply style transfer or enhancement</Step>
74-
<Step title="Upscale">Increase quality/resolution</Step>
75-
<Step title="Optimize">Compress and format for delivery</Step>
76-
</Steps>
94+
**Coordinator pattern with sequential processing**. Generates initial content with AI, applies style transfer or enhancement, upscales resolution, optimizes and compresses for delivery.
95+
96+
<div align="center">
97+
98+
```mermaid
99+
graph TB
100+
A[processCreative] --> B[generateWithAI]
101+
B --> C[applyStyleTransfer]
102+
C --> D[upscaleResolution]
103+
D --> E[optimizeAndCompress]
104+
E --> F[uploadToStorage]
105+
```
106+
107+
</div>
77108
</Tab>
109+
78110
<Tab title="Human-in-the-loop">
79-
<Steps>
80-
<Step title="Generate">Create AI content</Step>
81-
<Step title="Review">Pause for human approval</Step>
82-
<Step title="Revise">Apply feedback if needed</Step>
83-
<Step title="Publish">Deploy approved content</Step>
84-
</Steps>
111+
**Supervisor pattern with approval gate**. Generates AI content, pauses execution with wait.for to allow human review, applies feedback if needed, publishes approved content.
112+
113+
<div align="center">
114+
115+
```mermaid
116+
graph TB
117+
A[generateContent] --> B[createWithAI]
118+
B --> C[wait.for approval]
119+
C --> D{Approved?}
120+
121+
D -->|Yes| E[publishContent]
122+
D -->|Needs revision| F[applyFeedback]
123+
F --> B
124+
```
125+
126+
</div>
85127
</Tab>
86128
</Tabs>
87129

0 commit comments

Comments
 (0)