Skip to content

sidequestjs/sidequest

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

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.

✨ Features

  • πŸš€ High Performance - Worker threads for non-blocking job processing
  • πŸ—„οΈ Multiple Backends - SQLite, PostgreSQL, MySQL 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 >= 24
  • πŸ“Š 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
SQLite (default - not recommended for production)
npm install @sidequest/sqlite-backend
# or
yarn add @sidequest/sqlite-backend
MySQL
npm install @sidequest/mysql-backend
# or
yarn add @sidequest/mysql-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

About

Sidequest is a modern, scalable background job processor for Node.js applications.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published