Next.js
Use Chimpbase with Next.js API routes and server actions.
Chimpbase can run alongside Next.js to handle background jobs, cron, workflows, and durable queues while Next.js handles your frontend and API routes.
Architecture
Next.js and Chimpbase run as separate processes sharing the same PostgreSQL database:
Setup
Enqueuing jobs from API routes
Use a shared Chimpbase client to enqueue work from Next.js API routes or server actions:
Worker process
Run Chimpbase as a separate process that handles background work:
Docker Compose
Run both processes together:
When to use this pattern
This works well when you already have a Next.js frontend and need durable background processing without adding a separate message broker or workflow engine. Chimpbase handles the async work while Next.js stays focused on serving pages and API responses.