Human In the loop document processing app with Inngest
This is Next.js project showcases how to use @inngest/realtime to display live updates of documents (texts, PDFs, images) analysis.
Copy the .env.example as .env.local and fill in a valid OPENAI_API_KEY:
cp .env.example .env.local
git clone https://github.com/inngest/inngest-js.git
cd inngest-js/examples/realtime/next-realtime-hooks
pnpm install
pnpm run db:generate
pnpm run db:migrate
pnpm run db:seed # optional
You’re app is ready to start!
npm run dev
# or
yarn dev
# or
pnpm dev
In a separate terminal, start the Inngest Dev Server:
npx inngest-cli@latest dev
Open localhost:3000 and click on the “Start” button to see the incoming realtime message appear.
At anytime, open the Drizzle Studio to inspect your local SQLite database records by running:
npx drizzle-kit studio
/app - Next.js app router pages and components/app/api/inngest - Inngest API route handler/app/inngest - Inngest function definitions/components - React components including realtime examples