Important: This documentation covers Yarn 1 (Classic).
For Yarn 2+ docs and migration guide, see yarnpkg.com.

Package detail

@sidequest/core

sidequestjs2.3kLGPL-3.0-or-later1.10.0TypeScript support: included

@sidequest/core is the core package of SideQuest, a distributed background job queue for Node.js and TypeScript applications.

nodejs, javascript, typescript, queue, concurrency, background-jobs, distributed, background

readme

Sidequest

NPM Version License Build Status TypeScript Node.js Version Docs

Sidequest.js Logo

Sidequest is a modern, scalable background job processor for Node.js applications. Built with TypeScript and designed for production use, it provides reliable job processing with multiple database backends, a beautiful web dashboard, and comprehensive monitoring capabilities.

For the complete documentation, visit docs.sidequestjs.com.

For a comprehensive FAQ, visit docs.sidequestjs.com/faq.

✨ Features

  • 🚀 High Performance - Worker threads for non-blocking job processing
  • 🗄️ Multiple Backends - PostgreSQL, MySQL, SQLite, MongoDB support out of the box
  • ESM and CJS support - Fully compatible with modern JavaScript
  • 📝 Support for Typescript - Supports TypeScript jobs by default if you are using Node.js >= v23.6.0
  • 📊 Web Dashboard - Beautiful, responsive dashboard for monitoring jobs and queues
  • 🎯 Queue Management - Multiple queues with configurable workers and priorities
  • 🫀 Job Lifecycle Management - Configurable retry with exponential backoff, snooze, and fail mechanisms
  • Scheduled Jobs - Support for scheduling jobs to run at specific times
  • 🔒 Job Uniqueness - Prevent duplicate jobs with flexible uniqueness constraints
  • 🛠️ CLI Tools - Command-line interface for database migrations and management
  • 🏗️ Monorepo Architecture - Modular packages for flexible deployment

📦 Installation

To get started with Sidequest, first install the main package:

npm install sidequest
# or
yarn add sidequest

Make sure you are using Node.js >= 22.6.0. Also, Sidequest does not run with Bun yet.

To keep the application minimal, the main package does not include the backend drivers. Thus you need to install only the driver you will use:

PostgreSQL (recommended)

npm install @sidequest/postgres-backend
# or
yarn add @sidequest/postgres-backend
<summary>MySQL</summary>
npm install @sidequest/mysql-backend
# or
yarn add @sidequest/mysql-backend
<summary>SQLite (default - not recommended for production)</summary>
npm install @sidequest/sqlite-backend
# or
yarn add @sidequest/sqlite-backend
<summary>MongoDB</summary>
npm install @sidequest/mongo-backend
# or
yarn add @sidequest/mongo-backend

⚙️ Usage

1. Create a Job class

// jobs/EmailJob.js
import { Job } from "sidequest";

export class EmailJob extends Job {
  async run(to, subject, body) {
    console.log(`Sending email to ${to}: ${subject}`);
    // Your email sending logic here
    return { sent: true, timestamp: new Date() };
  }
}

2. Configure and Start Sidequest

// app.js
import { Sidequest } from "sidequest";

// Start Sidequest
await Sidequest.start({
  // You can leave the config empty to use the default SQLite backend.
  // Make sure to install the SQLite backend driver if you want to use it.
  backend: {
    driver: "@sidequest/postgres-backend",
    config: "postgres://postgres:postgres@localhost:5432",
  },
});

console.log("Sidequest started! Dashboard: http://localhost:8678");

3. Enqueue Jobs

// Somewhere in your application
import { Sidequest } from "sidequest";
import { EmailJob } from "./jobs/EmailJob.js";

// Simple job
await Sidequest.build(EmailJob).enqueue("user@example.com", "Welcome!", "Thanks for signing up!");

🤝 Contributing

We welcome contributions! Please see our Contributing Guidelines for details.

📄 License

This project is licensed under the LGPL-3.0-or-later license.

🆘 Support


Made with ❤️ by Lucas Merencia and Giovani Guizzo

changelog

1.10.0 (2025-10-08)

Features

  • enable WAL mode for SQLite backend to improve concurrency and performance (#116) (a2ee3d2)

1.9.0 (2025-10-08)

Features

  • implement selection saving and restoring functionality in layout (#115) (3a97b63)

1.8.0 (2025-09-22)

Features

  • add retry delay and backoff strategy to job data and related tests (#102) (664fe5a)

1.7.1 (2025-09-10)

Bug Fixes

  • scheduled jobs not stopping with Sidequest (#100) (129ee4e)

1.7.0 (2025-09-03)

Features

  • manual (sidequest.jobs.js) job resolution (#94) (c173dea)

1.6.2 (2025-08-28)

Bug Fixes

1.6.1 (2025-08-27)

Bug Fixes

1.6.0 (2025-08-21)

Features

  • add rerun button for canceled, failed, or completed jobs in jobs table (#83) (d1a89a0)

1.5.2 (2025-08-21)

Bug Fixes

  • fix flaky integration test (#81) (a828bd4)
  • replace JSON.stringify with util.inspect for logging (#79) (2704907)

1.5.1 (2025-08-21)

Bug Fixes

  • fix unknown type on backend config (#73) (f45b440)

1.5.0 (2025-08-16)

Features

  • Add countJobsByQueues to backend implementations and fixed 2 minor bugs (#70) (7a22053)

1.4.3 (2025-08-11)

Bug Fixes

  • set schema name for migrations based on searchPath in PostgresBackend (#67) (686afa5)

1.4.2 (2025-08-08)

Bug Fixes

  • allow passing full configs on sql backends (#63) (9820992)

1.4.1 (2025-08-07)

Bug Fixes

  • fixes job enqueue inside CJS jobs (#60) (14c959c)

1.4.0 (2025-08-07)

Features

  • relative path on script resolution (#58) (65cf83a)

1.3.0 (2025-08-06)

Features

  • add pooling control for PG knex config (#53) (7db5d6b)

1.2.0 (2025-08-04)

Features

  • enhance job listing functionality with pattern matching for queue, jobClass, and state (#50) (4153dd8)

1.1.1 (2025-08-01)

Bug Fixes

  • improve LazyBackend initialization to ensure single instance creation (#47) (2a016d1)

1.1.0 (2025-08-01)

Features

  • add develop branch configuration for prerelease and channel settings (#46) (d0f0b57)

1.0.0 (2025-08-01)

Bug Fixes

Features

  • Sidequest.build from job (#20) (d7f5286)
  • add better logging and tests for createBackendFromDriver function (#142) (00942cb)
  • add comprehensive test suite for job and queue management (a775de8)
  • add job builder (#39) (5af07bb)
  • add JobData to job object. (#171) (c61df01)
  • add nullable timeout column to sidequest_jobs table (b2bacbd)
  • add timeout on executor start (5c0164d)
  • add updateJob method and related tests for job management (6f7a024)
  • added cli (442b031)
  • added dasy ui (59411e9)
  • added job view - work in progress (e274af6)
  • added mongodb backend (#155) (0149d82)
  • allow nested jobs (#55) (a8ff7f0)
  • allowing to set maxAttempts and availabeAt on enqueuing job. (#77) (c469da2)
  • basic auth on dashboard (#66) (add020b)
  • cancel job (8434c70)
  • cleanup job and coverage (#76) (f58f2d0)
  • dashboard config (e6741d2)
  • enhance queue management with defaults and force update options (#5) (40acbec)
  • Facades and better transitions (#161) (8066f5d)
  • implement backend initialization and configuration for dashboard (34737b9)
  • implement staleJobs method for job management across backends (a10959a)
  • improve DX (#71) (075b589)
  • job flow control (#42) (f7dd600)
  • job list (5208e7c)
  • job view (31f6112)
  • mock shared-runner for improved test isolation in main.test.ts (a1bfac2)
  • move magic numbers to Sidequest config (#147) (f701f1a)
  • moving args to run function (225bee3)
  • realising staled claimed and running jobs (#59) (148f64c)
  • recurring jobs (#12) (cd66663)
  • redis backend (#129) (f08e9b7)
  • refactor backend import paths and introduce setTestBackend function (f5439da)
  • refactor uniquiness (#67) (fbea055)
  • removed dev server (ffe153d)
  • rerun jobs and fixing small issues (6e2925c)
  • routines (6abf0d4)
  • run from dashboard (b65b058)
  • unlimited jobs (#21) (0055f4a)
  • Update branch triggers to include 'develop' for workflows (#1) (eef8a35)
  • Update job arguments type to array in SidequestDashboard (a920c27)

Reverts

1.0.0-next.22 (2025-07-31)

Bug Fixes

1.0.0-next.22 (2025-07-31)

Bug Fixes

1.0.0-next.21 (2025-07-31)

Bug Fixes

  • add engines field to specify required Node.js version (#42) (44c9523)

1.0.0-next.20 (2025-07-31)

Bug Fixes

  • show more and show less not saving state on page refresh (#41) (fcc99e7)

1.0.0-next.19 (2025-07-31)

Bug Fixes

  • remove unused delete button from job view (#36) (eedd15f)

1.0.0-next.18 (2025-07-31)

Bug Fixes

  • Future canceled jobs not running (#34) (85a5212)

1.0.0-next.17 (2025-07-30)

Bug Fixes

1.0.0-next.16 (2025-07-30)

Bug Fixes

  • update default concurrency value in documentation (dfc328d)

1.0.0-next.15 (2025-07-30)

Bug Fixes

Features

1.0.0-next.14 (2025-07-25)

Features

1.0.0-next.13 (2025-07-25)

Features

  • enhance queue management with defaults and force update options (#5) (40acbec)

1.0.0-next.12 (2025-07-24)

Bug Fixes

  • update jobDefaults handling and add engine tests (#4) (bbd8dde)

1.0.0-next.11 (2025-07-24)

Bug Fixes

  • including migrations on backends (a670e89)

1.0.0-next.10 (2025-07-24)

Bug Fixes

1.0.0-next.9 (2025-07-24)

Bug Fixes

1.0.0-next.9 (2025-07-24)

Bug Fixes

1.0.0-next.8 (2025-07-24)

Bug Fixes

1.0.0-next.7 (2025-07-24)

Bug Fixes

1.0.0-next.6 (2025-07-24)

Bug Fixes

1.0.0-next.5 (2025-07-24)

Bug Fixes

1.0.0-next.4 (2025-07-24)

Bug Fixes

1.0.0-next.3 (2025-07-24)

Bug Fixes

1.0.0-next.2 (2025-07-24)

Bug Fixes

1.0.0-next.1 (2025-07-24)

Bug Fixes

  • add close method to Engine class for backend cleanup (90ece50)
  • changed to patch and fixed job path call on table (6e2399e)
  • claim (b535e98)
  • deduplication (#58) (e0d6ae7)
  • default job state (626882e)
  • enqueue (a1cc0aa)
  • ensure consistent path formatting in buildPath function (55de875)
  • escape backslashes in file paths for consistency (36cc48c)
  • fix build of dashboard on windows (e92f15d)
  • Fix Dashboard stats and graph, and removes Redis (#154) (b3ab912)
  • fix second shutdown attempt (295f6b4)
  • fixed a few inconsistencies (54d338d)
  • fixed time range (fb19cac)
  • fixed yarn lock (#140) (68176ec)
  • format (c51ecf6)
  • improve job failure handling in RetryTransition (#143) (f448c35)
  • make config parameter optional in Engine.start method (2359040)
  • queue list (b09d103)
  • removing returning usage from sql backend (5d61c29)
  • sending config to sidequest main (44a314c)
  • serialize errors (#44) (683b7e1)
  • states (81be666)
  • update logger import to use @sidequest/core (d1f7825)
  • update staleJobs test to handle negative timeout values (514b330)
  • url (74651c2)

Features

  • add better logging and tests for createBackendFromDriver function (#142) (00942cb)
  • add comprehensive test suite for job and queue management (a775de8)
  • add job builder (#39) (5af07bb)
  • add JobData to job object. (#171) (c61df01)
  • add nullable timeout column to sidequest_jobs table (b2bacbd)
  • add timeout on executor start (5c0164d)
  • add updateJob method and related tests for job management (6f7a024)
  • added cli (442b031)
  • added dasy ui (59411e9)
  • added job view - work in progress (e274af6)
  • added mongodb backend (#155) (0149d82)
  • allow nested jobs (#55) (a8ff7f0)
  • allowing to set maxAttempts and availabeAt on enqueuing job. (#77) (c469da2)
  • basic auth on dashboard (#66) (add020b)
  • cancel job (8434c70)
  • cleanup job and coverage (#76) (f58f2d0)
  • dashboard config (e6741d2)
  • Facades and better transitions (#161) (8066f5d)
  • implement backend initialization and configuration for dashboard (34737b9)
  • implement staleJobs method for job management across backends (a10959a)
  • improve DX (#71) (075b589)
  • job flow control (#42) (f7dd600)
  • job list (5208e7c)
  • job view (31f6112)
  • mock shared-runner for improved test isolation in main.test.ts (a1bfac2)
  • move magic numbers to Sidequest config (#147) (f701f1a)
  • moving args to run function (225bee3)
  • realising staled claimed and running jobs (#59) (148f64c)
  • redis backend (#129) (f08e9b7)
  • refactor backend import paths and introduce setTestBackend function (f5439da)
  • refactor uniquiness (#67) (fbea055)
  • removed dev server (ffe153d)
  • rerun jobs and fixing small issues (6e2925c)
  • routines (6abf0d4)
  • run from dashboard (b65b058)
  • Update branch triggers to include 'develop' for workflows (#1) (eef8a35)
  • Update job arguments type to array in SidequestDashboard (a920c27)

Reverts