This is Next.js project showcases how to use @inngest/realtime to display live updates of documents (texts, PDFs, images) analysis.
- Live data streaming from Inngest to your frontend
- React hooks for real-time data updates
- Typescript integration with channel and topic typing
- Example pattern for real-time event handling
Copy the .env.example as .env.local and fill in a valid OPENAI_API_KEY:
cp .env.example .env.localgit clone https://github.com/inngest/inngest-js.git
cd inngest-js/examples/realtime/next-realtime-hookspnpm installpnpm run db:generate
pnpm run db:migrate
pnpm run db:seed # optionalYou're app is ready to start!
npm run dev
# or
yarn dev
# or
pnpm devIn a separate terminal, start the Inngest Dev Server:
npx inngest-cli@latest devOpen 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
- Inngest Documentation - Learn about Inngest features and API
- Inngest Realtime Documentation - Learn about the realtime features
- Next.js Documentation - Learn about Next.js features and API