| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Name | Name | Last commit date | ||
|---|---|---|---|---|
DeepWork is a web application that demonstrates the power of combining OpenAI's Deep Research API with the Hookdeck Event Gateway to support highly reliable and scalable asynchronous workflows and background jobs.
The application enables users to submit complex research questions to OpenAI's Deep Research service, which runs asynchronously in the background. Hookdeck manages both the outbound API requests (via queue) and inbound webhook responses, providing complete visibility into the entire research workflow.
graph TB
subgraph "DeepWork Application"
UI[Next.js Web UI]
API[Next.js API Routes]
KV[Vercel KV Store]
end
subgraph "Hookdeck Infrastructure"
subgraph "Connection: openai-queue"
SourceA[Source A<br/>Queue Endpoint]
DestA[Destination<br/>OpenAI API]
end
subgraph "Connection: openai-webhook"
SourceB[Source B<br/>Webhook Endpoint]
DestB[Destination<br/>/api/webhooks/openai]
end
end
subgraph "OpenAI"
DeepResearch[Deep Research API<br/>Background Mode]
end
UI --> API
API --> KV
API --> SourceA
SourceA --> DestA
DestA --> DeepResearch
DeepResearch --> SourceB
SourceB --> DestB
DestB --> API
API --> KV
| Component | Technology | Purpose |
|---|---|---|
| Language | TypeScript | Type-safe development throughout |
| Framework | Next.js 14+ (App Router) | Modern React framework with API routes |
| Authentication | NextAuth.js | Simple demo authentication |
| Data Store | Vercel KV | Serverless Redis for persistence |
| Event Gateway | Hookdeck Event Gateway | Event Gateway infrastructure for queuing and webhooks |
| AI Service | OpenAI Deep Research | Long-running research capabilities |
| Deployment | Vercel | Serverless deployment platform |
| Polling | SWR | Data fetching with automatic revalidation |
Clone the repository and install the dependencies:
git clone https://github.com/hookdeck/deepwork.git
cd deepwork
npm installThis project uses a setup script to configure your local environment.
npm run setup:devThe script will prompt you for your Hookdeck and OpenAI API keys and create a .env.local file with the necessary environment variables.
Once the setup is complete, start the development server:
npm run devOpen http://localhost:3000 in your browser to see the application.
To receive webhooks from OpenAI locally, you need to use the Hookdeck CLI.
First, log in to your Hookdeck account:
npm run hookdeck:loginThen, start listening for webhooks:
npm run hookdeck:listenThis command forwards webhooks for the openai-webhook source to your local development server. The setup:dev script will have already configured the necessary Hookdeck connections for you.
This application is designed for deployment on Vercel.
To learn more about the technologies used in this project, see the following resources:
| Back | FazBrowse Home | New Git URL |