Skip to content

Commit 6ed389d

Browse files
authored
Merge pull request #92 from triggerdotdev/smart-spreadsheet
Added smart spreadsheet example
2 parents 6151b0e + 4a590e2 commit 6ed389d

48 files changed

Lines changed: 11161 additions & 1 deletion

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,4 +51,5 @@ apps/**/public/build
5151

5252
# Misc
5353
CLAUDE.md
54-
ARCHITECTURE.md
54+
ARCHITECTURE.md
55+
SPEC.md

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ For information on how to run each project, see the README in each directory.
2929
| [Claude agent SDK](/claude-agent-sdk-trigger) | A simple example of how to use the [Claude Agent SDK](https://docs.claude.com/en/docs/agent-sdk/overview) with Trigger.dev |
3030
| [Claude changelog generator](/changelog-generator) | Generate changelogs from a GitHub repository using the [Claude Agent SDK](https://docs.claude.com/en/docs/agent-sdk/overview) with Trigger.dev |
3131
| [Claude agent GitHub wiki](/claude-agent-github-wiki) | AI-powered repository analyzer that lets you ask questions about any public GitHub repository using Anthropic's [Claude Agent SDK](https://platform.claude.com/docs/en/agent-sdk/overview), with real-time streaming via [Trigger.dev Realtime](https://trigger.dev/docs/realtime/overview) |
32+
| [Company enrichment tool](/smart-spreadsheet) | AI-powered company enrichment tool. Enter a company name or URL, get verified data with source links. Uses [Supabase](https://supabase.com), [AI SDK](https://sdk.vercel.ai/docs/introduction), [Trigger.dev](https://trigger.dev) and [Exa](https://exa.ai) |
3233
| [Deep research agent using the AI SDK](/vercel-ai-sdk-deep-research-agent/) | An intelligent deep research agent using the Vercel [AI SDK](https://sdk.vercel.ai/docs/introduction) and Trigger.dev |
3334
| [Monorepos](/monorepos) | Examples of using Trigger.dev in monorepo setups with [Turborepo](https://turbo.build/) and [Prisma](https://www.prisma.io/) |
3435
| [Next.js server actions](/nextjs-server-actions) | A [Next.js app](https://nextjs.org/) that triggers Trigger.dev tasks using Server Actions |

smart-spreadsheet/.gitignore

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# See https://help.github.com/articles/ignoring-files/ for more about ignoring files.
2+
3+
# dependencies
4+
.claude
5+
CLAUDE.md
6+
/node_modules
7+
/.pnp
8+
.pnp.*
9+
.yarn/*
10+
!.yarn/patches
11+
!.yarn/plugins
12+
!.yarn/releases
13+
!.yarn/versions
14+
15+
# testing
16+
/coverage
17+
18+
# next.js
19+
/.next/
20+
/out/
21+
22+
# production
23+
/build
24+
25+
# misc
26+
.DS_Store
27+
*.pem
28+
29+
# debug
30+
npm-debug.log*
31+
yarn-debug.log*
32+
yarn-error.log*
33+
.pnpm-debug.log*
34+
35+
# env files (can opt-in for committing if needed)
36+
.env*
37+
38+
# vercel
39+
.vercel
40+
41+
# typescript
42+
*.tsbuildinfo
43+
next-env.d.ts
44+
45+
progress.txt
46+
.trigger
47+
prd.json
48+
ARCHITECTURE.md
49+
.SPEC.md

smart-spreadsheet/README.md

Lines changed: 90 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
1+
# Smart Spreadsheet
2+
3+
AI-powered company enrichment tool. Enter a company name or URL, get verified data with source links.
4+
5+
## Features
6+
7+
- Enter company name or website URL
8+
- AI enriches: website, description, industry, headcount, funding stage, last round
9+
- Every data point includes source link
10+
- Real-time streaming updates via Trigger.dev
11+
- Google Sheets-like interface
12+
13+
## Tech Stack
14+
15+
- [Next.js 16](https://nextjs.org) (App Router)
16+
- [Supabase](https://supabase.com) (PostgreSQL + Auth)
17+
- [Trigger.dev v4](https://trigger.dev) (Background tasks + Realtime Streams)
18+
- [Exa](https://exa.ai) (Web search API)
19+
- [Claude](https://anthropic.com) (AI extraction via [Vercel AI SDK](https://sdk.vercel.ai))
20+
- [Tailwind](https://tailwindcss.com) + [shadcn/ui](https://ui.shadcn.com)
21+
22+
## Setup
23+
24+
### 1. Clone and install
25+
26+
```bash
27+
git clone <repo-url>
28+
cd smart-spreadsheet
29+
npm install
30+
```
31+
32+
### 2. Environment variables
33+
34+
Copy `.env.example` to `.env.local` and fill in:
35+
36+
```bash
37+
# Supabase
38+
NEXT_PUBLIC_SUPABASE_URL=
39+
NEXT_PUBLIC_SUPABASE_ANON_KEY=
40+
SUPABASE_SECRET_KEY=
41+
42+
# Trigger.dev
43+
TRIGGER_SECRET_KEY=
44+
TRIGGER_PROJECT_REF=
45+
46+
# Exa
47+
EXA_API_KEY=
48+
49+
# Anthropic
50+
ANTHROPIC_API_KEY=
51+
```
52+
53+
### 3. Supabase setup
54+
55+
1. Create a new Supabase project
56+
2. Run [`supabase/schema.sql`](./supabase/schema.sql) in the SQL Editor
57+
58+
> **Note:** The schema runs in dev mode (no auth) by default. For production, enable a Supabase auth provider and follow the RLS instructions in the schema file.
59+
60+
### 4. Trigger.dev setup
61+
62+
```bash
63+
npx trigger.dev@latest init
64+
npx trigger.dev@latest dev
65+
```
66+
67+
## Run locally
68+
69+
```bash
70+
# Terminal 1: Next.js
71+
npm run dev
72+
73+
# Terminal 2: Trigger.dev
74+
npx trigger.dev@latest dev
75+
```
76+
77+
Open [http://localhost:3000](http://localhost:3000)
78+
79+
## How it works
80+
81+
1. User enters company name or URL
82+
2. API triggers `enrich-company` task
83+
3. Task runs 4 parallel subtasks:
84+
- `get-basic-info` - website, description
85+
- `get-industry` - industry classification
86+
- `get-employee-count` - headcount estimate
87+
- `get-funding-round` - stage + last round amount
88+
4. Each subtask uses Exa search + Claude extraction
89+
5. Results stream to UI via Trigger.dev Realtime
90+
6. Data saved to Supabase with source URLs

smart-spreadsheet/components.json

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
{
2+
"$schema": "https://ui.shadcn.com/schema.json",
3+
"style": "new-york",
4+
"rsc": true,
5+
"tsx": true,
6+
"tailwind": {
7+
"config": "",
8+
"css": "src/app/globals.css",
9+
"baseColor": "neutral",
10+
"cssVariables": true,
11+
"prefix": ""
12+
},
13+
"iconLibrary": "lucide",
14+
"aliases": {
15+
"components": "@/components",
16+
"utils": "@/lib/utils",
17+
"ui": "@/components/ui",
18+
"lib": "@/lib",
19+
"hooks": "@/hooks"
20+
},
21+
"registries": {}
22+
}
Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
import { defineConfig, globalIgnores } from "eslint/config";
2+
import nextVitals from "eslint-config-next/core-web-vitals";
3+
import nextTs from "eslint-config-next/typescript";
4+
5+
const eslintConfig = defineConfig([
6+
...nextVitals,
7+
...nextTs,
8+
// Override default ignores of eslint-config-next.
9+
globalIgnores([
10+
// Default ignores of eslint-config-next:
11+
".next/**",
12+
"out/**",
13+
"build/**",
14+
"next-env.d.ts",
15+
]),
16+
]);
17+
18+
export default eslintConfig;

smart-spreadsheet/next.config.ts

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
import type { NextConfig } from "next";
2+
3+
const nextConfig: NextConfig = {
4+
/* config options here */
5+
};
6+
7+
export default nextConfig;

0 commit comments

Comments
 (0)