You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/guides/example-projects/smart-spreadsheet.mdx
+31-4Lines changed: 31 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,13 +8,13 @@ import RealtimeLearnMore from "/snippets/realtime-learn-more.mdx";
8
8
9
9
## Overview
10
10
11
-
Smart Spreadsheet is an AI-powered tool that enriches company data on demand. Input a company name or website URL and get verified information including industry, headcount, and funding details; each with source attribution. Results stream to the frontend in real-time as they're processed.
11
+
Smart Spreadsheet is an AI-powered tool that enriches company data on demand. Input a company name or website URL and get verified information including industry, headcount, and funding details; each with source attribution. Results appear in the frontend in real-time as each task completes.
12
12
13
13
- A [Next.js](https://nextjs.org/) app with [Trigger.dev](https://trigger.dev/) for background tasks
14
14
-[Exa](https://exa.ai/) – an AI-native search engine that returns clean, structured content ready for LLM extraction
15
15
-[Claude](https://anthropic.com/) via the [Vercel AI SDK](https://sdk.vercel.ai/) for data extraction
16
16
-[Supabase](https://supabase.com/) PostgreSQL database for persistence
17
-
- Trigger.dev [Realtime](/realtime/overview)to stream updates to the frontend
17
+
- Trigger.dev [Realtime](/realtime/overview)for live updates to the frontend
18
18
19
19
## Video
20
20
@@ -42,16 +42,43 @@ The enrichment workflow:
42
42
1.**Trigger enrichment** – User enters a company name or URL in the spreadsheet UI
43
43
2.**Parallel data gathering** – Four subtasks run concurrently to fetch basic info, industry, employee count, and funding details
44
44
3.**AI extraction** – Each subtask uses Exa search + Claude to extract structured data with source URLs
45
-
4.**Real-time updates** – Results stream back to the frontend as each subtask completes
45
+
4.**Real-time updates** – Results appear in the frontend as each subtask completes
46
46
5.**Persist results** – Enriched data is saved to Supabase with source attribution
47
47
48
48
## Features
49
49
50
50
-**Parallel processing** – All four enrichment categories run simultaneously using [batch.triggerByTaskAndWait](/triggering#batch-trigger-by-task-and-wait)
51
51
-**Source attribution** – Every data point includes the URL it was extracted from
52
-
-**Real-time streaming** – Results appear in the UI as they're processed using [Realtime](/realtime/overview)
52
+
-**Live updates** – Results appear in the UI as each task completes using [Realtime](/realtime/overview)
53
53
-**Structured extraction** – Zod schemas ensure consistent data output from Claude
54
54
55
+
## Key code patterns
56
+
57
+
### Parallel task execution
58
+
59
+
The main task triggers all four enrichment subtasks simultaneously using `batch.triggerByTaskAndWait`:
0 commit comments