Skip to content

Introduction

Queuebase is a background job processing system. Jobs use a callback model: your app defines job handlers at a webhook endpoint, the Queuebase service stores and schedules jobs, then calls back to your app to execute them. This works identically in local dev (via the CLI) and in production.

  • No separate worker infrastructure — Your job handlers live in your app. Queuebase stores, schedules, and retries jobs, then calls back to your app to execute them.
  • Same flow in dev and production — The CLI runs a local server with SQLite for development. In production, the hosted API uses Postgres. Your code doesn’t change.
  • Type-safe with any validator — Define job inputs with any Standard Schema-compatible library (Zod, Valibot, ArkType). Get full type inference from enqueue to handler.
  1. Your app calls jobClient.myJob.enqueue({ ... })
  2. The SDK POSTs the job to the Queuebase API (local CLI in dev, hosted API in production)
  3. Queuebase stores the job in the database and schedules it
  4. When it’s time to run, Queuebase POSTs back to your app’s webhook endpoint (e.g. /api/queuebase)
  5. Your handler executes the job and returns the result

This callback model means your job code lives in your app, not in a separate worker process. Queuebase handles the scheduling, retries, and persistence.

  • Node.js 18 or later
  • A Next.js or Node.js application
  • A validation library compatible with Standard Schema (Zod, Valibot, ArkType, etc.)
Terminal window
# Zod is shown here, but any Standard Schema-compatible library works
npm install @queuebase/nextjs zod
Terminal window
# Zod is shown here, but any Standard Schema-compatible library works
npm install @queuebase/node zod

Both packages re-export everything from @queuebase/core, so you only need one.