### Install Framework and Queue Adapters Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/index.mdx Install the necessary packages for your chosen framework and queue adapter. The example shows installation for Express and BullMQ. ```bash pnpm add @bullstudio/express @bullstudio/bullmq-adapter bullmq ioredis ``` ```bash pnpm add @bullstudio/bull-adapter bull ``` -------------------------------- ### Run Embedded Examples Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Start embedded examples for framework adapters or embedded-mode behavior. Ensure Redis is running before executing these commands. ```bash pnpm --filter @bullstudio/example-hono-bullmq-embedded dev pnpm --filter @bullstudio/example-express-bullmq-embedded dev pnpm --filter @bullstudio/example-fastify-bullmq-embedded dev pnpm --filter @bullstudio/example-next-bullmq-embedded dev ``` -------------------------------- ### Install and Run Bullstudio Globally Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Install Bullstudio globally using npm and then run the command to start the dashboard. This is an alternative to using npx. ```bash npm install -g bullstudio bullstudio ``` -------------------------------- ### Start Next.js App Source: https://github.com/emirce/bullstudio/blob/main/examples/next-bullmq-embedded/README.md Command to start the Next.js application using pnpm, filtering for the specific example package. ```bash pnpm --filter @bullstudio/example-next-bullmq-embedded dev ``` -------------------------------- ### Install Fastify Adapter Source: https://github.com/emirce/bullstudio/blob/main/packages/fastify-adapter/README.md Install the Fastify adapter package using pnpm. ```bash pnpm add @bullstudio/fastify ``` -------------------------------- ### Start Redis Server (Docker) Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Instructions to start a Redis server instance using Docker. ```bash # Start Redis (Docker) docker run -d -p 6379:6379 redis ``` -------------------------------- ### Install Express Adapter Source: https://github.com/emirce/bullstudio/blob/main/packages/express-adapter/README.md Install the @bullstudio/express package using pnpm. ```bash pnpm add @bullstudio/express ``` -------------------------------- ### Configure BullstudioModule with forRoot Source: https://github.com/emirce/bullstudio/blob/main/packages/nestjs-adapter/README.md Use `forRoot` when queue adapters can be created directly. This example demonstrates basic authentication setup. ```ts import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { BullstudioModule } from "@bullstudio/nestjs"; import { Module } from "@nestjs/common"; import { Queue } from "bullmq"; const emailQueue = new Queue("email"); @Module({ imports: [ BullstudioModule.forRoot({ mountPath: "/ops/bullstudio", queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "basic", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD ?? "change-me", }, }), ], }) export class AppModule {} ``` -------------------------------- ### Install Hono Adapter Source: https://github.com/emirce/bullstudio/blob/main/packages/hono-adapter/README.md Install the Hono adapter package using pnpm. Remember to also install a queue adapter package like `@bullstudio/bullmq-adapter` or `@bullstudio/bull-adapter`. ```bash pnpm add @bullstudio/hono ``` -------------------------------- ### Install BullMQ Adapter Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/queue-adapters.mdx Install the BullMQ adapter and BullMQ library using pnpm. ```bash pnpm add @bullstudio/bullmq-adapter bullmq ``` -------------------------------- ### Install @bullstudio/next Package Source: https://github.com/emirce/bullstudio/blob/main/packages/next-adapter/README.md Install the core Next.js adapter package using pnpm. ```bash pnpm add @bullstudio/next ``` -------------------------------- ### Install Bull v4 Adapter Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/queue-adapters.mdx Install the Bull v4 adapter and Bull library using pnpm. ```bash pnpm add @bullstudio/bull-adapter bull ``` -------------------------------- ### Run Docs Development Server Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Start the development server for the documentation site located in `apps/website-with-docs`. ```bash pnpm --filter website-with-docs dev ``` -------------------------------- ### Install Dependencies Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/hono.mdx Install the necessary Bullstudio packages and their Hono/BullMQ dependencies using pnpm. ```bash pnpm add @bullstudio/hono @bullstudio/bullmq-adapter bullmq ioredis hono @hono/node-server ``` -------------------------------- ### Run Development Server Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/README.md Use these commands to start the development server for the application. Choose the command that matches your package manager. ```bash npm run dev ``` ```bash pnpm dev ``` ```bash yarn dev ``` -------------------------------- ### Framework Adapter Examples Source: https://github.com/emirce/bullstudio/blob/main/README.md Integration snippets for various web frameworks. ```ts // Express import { bullstudio } from "@bullstudio/express"; app.use("/ops/bullstudio", bullstudio({ queues })); ``` ```ts // Fastify import { bullstudio } from "@bullstudio/fastify"; await app.register(bullstudio({ queues }), { prefix: "/ops/bullstudio", }); ``` ```ts // app/ops/bullstudio/[[...bullstudio]]/route.ts import { bullstudio } from "@bullstudio/next"; export const runtime = "nodejs"; export const dynamic = "force-dynamic"; export const { GET, HEAD, POST } = bullstudio({ mountPath: "/ops/bullstudio", queues, }); ``` -------------------------------- ### Start Fastify Application Source: https://github.com/emirce/bullstudio/blob/main/examples/fastify-bullmq-embedded/README.md Run the Fastify application with the embedded Bullstudio using PNPM. ```bash pnpm --filter @bullstudio/example-fastify-bullmq-embedded dev ``` -------------------------------- ### Start Redis Server (macOS Homebrew) Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Instructions to start the Redis server on macOS using Homebrew services. ```bash # Start Redis (macOS with Homebrew) brew services start redis ``` -------------------------------- ### Install Embedded Core Package Source: https://github.com/emirce/bullstudio/blob/main/packages/embedded-core/README.md Install the @bullstudio/embedded-core package using pnpm. ```bash pnpm add @bullstudio/embedded-core ``` -------------------------------- ### Install and Verify Node.js and pnpm Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Ensure you have Node.js 20+ and pnpm 10.4.1 installed. This snippet verifies the Node.js version and installs the specified pnpm version. ```bash node --version corepack enable corepack prepare pnpm@10.4.1 --activate pnpm --version ``` -------------------------------- ### Minimal BullMQ Setup with Adapter Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/index.mdx Configure a BullMQ queue and create an adapter for it using `@bullstudio/bullmq-adapter`. This adapter is then passed to Bullstudio. ```typescript import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { Queue } from "bullmq"; import IORedis from "ioredis"; const connection = new IORedis(process.env.REDIS_URL!, { maxRetriesPerRequest: null, }); const emailQueue = new Queue("email", { connection }); export const bullstudioQueues = [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ]; ``` -------------------------------- ### Clone Repository and Install Dependencies Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Clone the Bullstudio repository and install all project dependencies using pnpm. ```bash git clone https://github.com/emirce/bullstudio.git cd bullstudio pnpm install ``` -------------------------------- ### Run NestJS Example with Fastify Source: https://github.com/emirce/bullstudio/blob/main/examples/nestjs-bullmq-embedded/README.md Execute the embedded NestJS BullMQ example using the Fastify platform adapter. Ensure Redis and dashboard credentials are configured. ```sh pnpm --filter @bullstudio/example-nestjs-bullmq-embedded dev:fastify ``` -------------------------------- ### Install NestJS Platform Adapter (Fastify) Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/nestjs.mdx Install the Fastify platform adapter if your NestJS application uses it. ```bash pnpm add @nestjs/common @nestjs/core @nestjs/platform-fastify ``` -------------------------------- ### Start Express App with pnpm Source: https://github.com/emirce/bullstudio/blob/main/examples/express-bullmq-embedded/README.md Runs the Express application using pnpm, which is used to manage the project's dependencies and scripts. This command starts the development server for the embedded example. ```bash pnpm --filter @bullstudio/example-express-bullmq-embedded dev ``` -------------------------------- ### Start Redis with Docker Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/troubleshooting.mdx Run a Redis instance using Docker if you don't have one locally. ```bash docker run --rm -p 6379:6379 redis:7-alpine ``` -------------------------------- ### Install Bull Adapter Source: https://github.com/emirce/bullstudio/blob/main/packages/bull-adapter/README.md Install the Bull adapter package using pnpm. Note that `bull` is a peer dependency. ```bash pnpm add @bullstudio/bull-adapter ``` -------------------------------- ### Integrate Bullstudio with Hono Source: https://github.com/emirce/bullstudio/blob/main/README.md Installation and setup for embedding Bullstudio into a Hono application. ```bash pnpm add @bullstudio/hono @bullstudio/bullmq-adapter ``` ```ts import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { bullstudio } from "@bullstudio/hono"; import { Queue } from "bullmq"; import { Hono } from "hono"; import IORedis from "ioredis"; const connection = new IORedis( process.env.REDIS_URL ?? "redis://localhost:6379", { maxRetriesPerRequest: null, }, ); const emailQueue = new Queue("email", { connection }); const app = new Hono(); app.route( "/ops/bullstudio", bullstudio({ queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "basic", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD ?? "change-me", }, }), ); ``` -------------------------------- ### Install Bullstudio Dependencies Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/next.mdx Install the necessary Bullstudio packages and their dependencies for Next.js. ```bash pnpm add @bullstudio/next @bullstudio/bullmq-adapter bullmq ioredis ``` -------------------------------- ### Start Local Redis with Docker Compose Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Use Docker Compose to start a Redis service for dashboard and integration workflows. This command starts only the Redis container. ```bash docker compose -f docker-compose.test.yml up -d redis ``` -------------------------------- ### Install Embedded Mode Packages Source: https://github.com/emirce/bullstudio/blob/main/docs/embedded-mode.md Install the necessary packages for Hono and BullMQ integration with Bullstudio. ```bash pnpm add @bullstudio/hono @bullstudio/bullmq-adapter hono bullmq ioredis ``` -------------------------------- ### Install Bullstudio Fastify Dependencies Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/fastify.mdx Install the necessary packages for Bullstudio Fastify integration and BullMQ adapter. ```bash pnpm add @bullstudio/fastify @bullstudio/bullmq-adapter bullmq ioredis fastify ``` -------------------------------- ### Install BullMQ Adapter Source: https://github.com/emirce/bullstudio/blob/main/packages/bullmq-adapter/README.md Install the BullMQ adapter package using pnpm. Note that 'bullmq' is a peer dependency. ```bash pnpm add @bullstudio/bullmq-adapter ``` -------------------------------- ### Install Bullstudio NestJS Module Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/nestjs.mdx Install the necessary Bullstudio packages and the BullMQ adapter for NestJS applications. ```bash pnpm add @bullstudio/nestjs @bullstudio/bullmq-adapter bullmq ioredis ``` -------------------------------- ### Run Bullstudio via CLI Source: https://github.com/emirce/bullstudio/blob/main/README.md Commands for starting the standalone dashboard process with various configuration options. ```bash npx bullstudio -r redis://localhost:6379 ``` ```bash bullstudio --help bullstudio -r redis://:password@redis.example.com:6379 -p 8080 --no-open bullstudio --prefix stage,stage2 bullstudio --username operator --password change-me ``` -------------------------------- ### Install Bullstudio Express Dependencies Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/express.mdx Install the necessary packages for Bullstudio's Express integration and BullMQ adapter. ```bash pnpm add @bullstudio/express @bullstudio/bullmq-adapter bullmq ioredis express ``` -------------------------------- ### Install NestJS Platform Adapter (Express) Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/nestjs.mdx Install the Express platform adapter if your NestJS application uses it. ```bash pnpm add @nestjs/common @nestjs/core @nestjs/platform-express ``` -------------------------------- ### Run NestJS Example with Express Source: https://github.com/emirce/bullstudio/blob/main/examples/nestjs-bullmq-embedded/README.md Execute the embedded NestJS BullMQ example using the Express platform adapter. Ensure Redis and dashboard credentials are configured. ```sh pnpm --filter @bullstudio/example-nestjs-bullmq-embedded dev:express ``` -------------------------------- ### Run Frontend Development Server Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Start the frontend development server for UI work. This command runs the frontend package and mounts a standalone dashboard API. ```bash pnpm --filter @bullstudio/frontend dev ``` -------------------------------- ### Mount Bullstudio Dashboard in Hono Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/hono.mdx Set up a Hono application and mount the Bullstudio dashboard. This example includes basic queue configuration and session-based protection. ```typescript import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { bullstudio } from "@bullstudio/hono"; import { serve } from "@hono/node-server"; import { Queue } from "bullmq"; import { Hono } from "hono"; import IORedis from "ioredis"; const connection = new IORedis(process.env.REDIS_URL!, { maxRetriesPerRequest: null, }); const emailQueue = new Queue("email", { connection }); const app = new Hono(); app.route( "/ops/bullstudio", bullstudio({ queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "session", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, }, }), ); serve({ fetch: app.fetch, port: 3000, }); ``` -------------------------------- ### Start Docker Compose Services Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Command to start all services defined in your `docker-compose.yml` file in detached mode. ```bash docker compose up -d ``` -------------------------------- ### Configure BullStudio with Environment Variables Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Set environment variables to configure the Redis connection, port, and authentication for BullStudio. The command then starts the BullStudio server. ```bash export REDIS_URL=redis://localhost:6379 export PORT=4000 export BULLSTUDIO_USERNAME=bullstudio export BULLSTUDIO_PASSWORD=secret123 bullstudio ``` -------------------------------- ### Complete Bullstudio Configuration Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/configuration.mdx This is a comprehensive example of how to configure Bullstudio, including queue adapters, read-only mode, session protection, dashboard and document identity, and polling settings. ```typescript bullstudio({ queues: [emailQueueAdapter], readOnly: true, protection: { type: "session", username: "operator", password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, tokenTtlSeconds: 60 * 60 * 8, cookieName: "queue_ops_session", }, dashboardIdentity: { title: "Production Queues", logo: { src: "/assets/queue-logo.svg", alt: "Queue Ops", }, }, documentIdentity: { title: "Queue Ops", favicon: "/favicon.ico", }, polling: { enabled: true, interval: 5000, minInterval: 2000, allowUserOverride: true, }, }); ``` -------------------------------- ### Redis Connection URL Formats Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/standalone.mdx Examples of connection strings for local, authenticated, and TLS-encrypted Redis instances. ```bash # local bullstudio -r redis://localhost:6379 # password bullstudio -r redis://:password@redis.example.com:6379 # username and password bullstudio -r redis://username:password@redis.example.com:6379 # TLS bullstudio -r rediss://username:password@redis.example.com:6380 ``` -------------------------------- ### Docker Authentication Setup Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Run BullStudio in a Docker container and configure authentication by passing the password via the BULLSTUDIO_PASSWORD environment variable. Ensure the correct port is mapped. ```bash docker run -e BULLSTUDIO_PASSWORD=secret123 -p 4000:4000 emirce/bullstudio ``` -------------------------------- ### Connect BullStudio to Redis via Docker Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Examples for connecting BullStudio to different Redis instances. Use `host.docker.internal` for local Docker, or specify your remote Redis URL. ```bash # Local Redis (Docker for Mac/Windows) docker run -d -p 4000:4000 -e REDIS_URL=redis://host.docker.internal:6379 emirce/bullstudio # Remote Redis docker run -d -p 4000:4000 -e REDIS_URL=redis://myhost.com:6379 emirce/bullstudio # Redis with authentication docker run -d -p 4000:4000 -e REDIS_URL=redis://:yourpassword@myhost.com:6379 emirce/bullstudio ``` -------------------------------- ### Run Bullstudio Directly with npx Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md This command installs and runs Bullstudio without requiring a specific Redis URL upfront. The dashboard will be accessible at http://localhost:4000. ```bash npx bullstudio ``` -------------------------------- ### Deploy BullStudio with Docker Compose Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Example Docker Compose configuration for running BullStudio and its Redis dependency. Ensure Redis is accessible via the `redis` service name. ```yaml services: bullstudio: image: emirce/bullstudio ports: - "4000:4000" environment: - REDIS_URL=redis://redis:6379 depends_on: - redis redis: image: redis:7-alpine ports: - "6379:6379" ``` -------------------------------- ### Mount Bullstudio Directly (forRoot) Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/nestjs.mdx Configure Bullstudio using `forRoot` when queue adapters can be created directly without NestJS dependency injection. This example sets up a Redis connection and an email queue instance. ```typescript import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { BullstudioModule } from "@bullstudio/nestjs"; import { Module } from "@nestjs/common"; import { Queue } from "bullmq"; import IORedis from "ioredis"; const connection = new IORedis(process.env.REDIS_URL!, { maxRetriesPerRequest: null, }); const emailQueue = new Queue("email", { connection }); @Module({ imports: [ BullstudioModule.forRoot({ mountPath: "/ops/bullstudio", queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "session", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, }, }), ], }) export class AppModule {} ``` -------------------------------- ### Set Username and Password via CLI Flags Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Configure both a custom username and password for authentication using CLI flags. This is useful for specific administrative setups. ```bash bullstudio --username bullstudio_admin --password secret123 ``` -------------------------------- ### Create Next.js Route Handler for Bullstudio Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/next.mdx Create a catch-all route handler in Next.js App Router to mount Bullstudio. This example includes session-based protection and requires environment variables for username, password, and session secret. ```typescript // app/ops/bullstudio/[[...bullstudio]]/route.ts import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { bullstudio } from "@bullstudio/next"; import { emailQueue } from "@/lib/queue"; export const runtime = "nodejs"; export const dynamic = "force-dynamic"; export const { GET, HEAD, POST } = bullstudio({ mountPath: "/ops/bullstudio", queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "session", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, }, }); ``` -------------------------------- ### Run Docs Type Checks and Build Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Perform type checking and build the documentation site. These commands are useful before changing documentation structure or MDX components. ```bash pnpm --filter website-with-docs types:check pnpm --filter website-with-docs build ``` -------------------------------- ### Configure Bullstudio with environment variables Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/standalone.mdx Set configuration parameters via environment variables before launching the bullstudio process. ```bash REDIS_URL=redis://localhost:6379 \ PORT=4000 \ REDIS_PREFIX=bull,stage \ BULLSTUDIO_USERNAME=operator \ BULLSTUDIO_PASSWORD=secret \ bullstudio ``` -------------------------------- ### Run BullStudio with Authentication Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Secure your BullStudio instance using HTTP Basic Authentication by setting `BULLSTUDIO_PASSWORD`. ```bash docker run -d \ -p 4000:4000 \ -e REDIS_URL=redis://host.docker.internal:6379 \ -e BULLSTUDIO_PASSWORD=secret123 \ emirce/bullstudio ``` -------------------------------- ### GET /health Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/standalone.mdx Checks the health status of the service, including Redis connectivity. ```APIDOC ## GET /health ### Description Returns the current status of the application and its connection to Redis. ### Method GET ### Endpoint /health ### Response #### Success Response (200) - **status** (string) - The operational status of the service. - **timestamp** (string) - The current server time in ISO 8601 format. - **redis** (string) - The configuration status of the Redis connection. #### Response Example { "status": "ok", "timestamp": "2026-06-01T10:00:00.000Z", "redis": "configured" } ``` -------------------------------- ### Basic BullStudio CLI Usage Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Run the BullStudio CLI with default options. Connects to local Redis on the default port. ```bash bullstudio ``` -------------------------------- ### Check Redis Service Status Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Verify that the Redis service started successfully using Docker Compose. ```bash docker compose -f docker-compose.test.yml ps ``` -------------------------------- ### Combine Multiple CLI Options Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Demonstrates combining several command-line options for a specific configuration, including remote Redis, custom port, and disabling auto-open browser. ```bash bullstudio -r redis://:secret@production.redis.io:6379 -p 8080 --no-open ``` -------------------------------- ### Configure Polling Intervals Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/standalone.mdx Adjust the polling frequency or disable it entirely using environment variables when starting the Bullstudio process. ```bash # Poll every 10s instead of the 2s default BULLSTUDIO_POLL_INTERVAL=10000 bullstudio -r redis://localhost:6379 # Disable polling; operators refresh each view manually BULLSTUDIO_POLL_ENABLED=false bullstudio -r redis://localhost:6379 ``` -------------------------------- ### Run Without Opening Browser Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Prevent the browser from opening automatically after starting the dashboard using the --no-open option. ```bash bullstudio --no-open ``` -------------------------------- ### Run Frontend Dev Server with Custom Redis URL Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/development.mdx Configure the frontend development server to use a specific Redis instance by setting the REDIS_URL environment variable. ```bash REDIS_URL=redis://localhost:6379 pnpm --filter @bullstudio/frontend dev ``` -------------------------------- ### Create BullMQ Worker Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/troubleshooting.mdx Ensure a BullMQ worker is running to process jobs added to the queue. This example shows setting up a worker for the 'email' queue. ```typescript import { Worker } from "bullmq"; const worker = new Worker( "email", async (job) => { await sendEmail(job.data); }, { connection }, ); ``` -------------------------------- ### Configure Bullstudio with CLI options Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/standalone.mdx Run the Bullstudio command with various flags to customize port, Redis prefixes, and authentication credentials. ```bash bullstudio \ --redis redis://localhost:6379 \ --port 4000 \ --prefix bull,stage \ --username operator \ --password secret \ --no-open ``` -------------------------------- ### Arena Queue Configuration Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/comparisons/bullstudio-vs-arena.mdx Example JSON configuration for Arena to define queues and Redis connections. This is used when you want a curated, persistent view of your queues. ```json { "queues": [ { "type": "bullmq", "name": "emails", "hostId": "Local Redis", "redis": { "host": "localhost", "port": 6379 } } ] } ``` -------------------------------- ### Run Bullstudio with Redis URL Source: https://github.com/emirce/bullstudio/blob/main/packages/cli/README.md Use this command to run Bullstudio and automatically open the dashboard. Replace with your Redis connection string. No code integration is required. ```bash npx bullstudio -r ``` -------------------------------- ### Run Bullstudio Standalone Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/comparisons/bullstudio-vs-bull-board.mdx Launch Bullstudio as a standalone dashboard by running a single command and pointing it to your Redis instance. ```bash npx bullstudio -r redis://localhost:6379 ``` -------------------------------- ### Mount Bullstudio Dashboard in Express Source: https://github.com/emirce/bullstudio/blob/main/packages/express-adapter/README.md Integrate the Bullstudio dashboard into an Express application by using the express adapter. This example demonstrates setting up basic authentication and exposing a single queue. ```typescript import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { bullstudio } from "@bullstudio/express"; import { Queue } from "bullmq"; import express from "express"; const emailQueue = new Queue("email", { connection }); const app = express(); app.use( "/ops/bullstudio", bullstudio({ queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "basic", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD ?? "change-me", }, }), ); app.listen(3000); ``` -------------------------------- ### Configure BullMQ Queue Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/next.mdx Set up a BullMQ queue with an IORedis connection. Ensure your REDIS_URL environment variable is set. ```typescript // lib/queue.ts import { Queue } from "bullmq"; import IORedis from "ioredis"; export const connection = new IORedis(process.env.REDIS_URL!, { maxRetriesPerRequest: null, }); export const emailQueue = new Queue("email", { connection }); ``` -------------------------------- ### Mount Bullstudio Dashboard in Express Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/express.mdx Mount the Bullstudio middleware in your Express app. Ensure Redis connection and queue instances are properly configured. This example includes session-based protection. ```typescript import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { bullstudio } from "@bullstudio/express"; import { Queue } from "bullmq"; import express from "express"; import IORedis from "ioredis"; const connection = new IORedis(process.env.REDIS_URL!, { maxRetriesPerRequest: null, }); const emailQueue = new Queue("email", { connection }); const app = express(); app.use( "/ops/bullstudio", bullstudio({ queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "session", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, }, }), ); const server = app.listen(3000); ``` -------------------------------- ### Create Bull Queue Adapter Source: https://github.com/emirce/bullstudio/blob/main/packages/bull-adapter/README.md Create a Bull queue adapter by passing your existing Bull `Queue` instance and optional configuration like `key` and `label`. The adapter will then be passed to the Bullstudio dashboard factory. ```typescript import { createBullQueueAdapter } from "@bullstudio/bull-adapter"; import Bull from "bull"; const emailQueue = new Bull("email", { redis: process.env.REDIS_URL, }); const emailQueueAdapter = createBullQueueAdapter(emailQueue, { key: "email", label: "Email", }); ``` ```typescript const dashboard = bullstudio({ queues: [emailQueueAdapter], }); ``` -------------------------------- ### Mount Bullstudio with Dependency Injection (forRootAsync) Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/nestjs.mdx Configure Bullstudio using `forRootAsync` when queues are managed by NestJS dependency injection. This example demonstrates setting up a Redis connection and an email queue. ```typescript import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { BullstudioModule } from "@bullstudio/nestjs"; import { Module } from "@nestjs/common"; import { Queue } from "bullmq"; import IORedis from "ioredis"; export const REDIS_CONNECTION = Symbol("REDIS_CONNECTION"); export const EMAIL_QUEUE = Symbol("EMAIL_QUEUE"); @Module({ providers: [ { provide: REDIS_CONNECTION, useFactory: () => new IORedis(process.env.REDIS_URL!, { maxRetriesPerRequest: null, }), }, { provide: EMAIL_QUEUE, inject: [REDIS_CONNECTION], useFactory: (connection: IORedis) => new Queue("email", { connection }), }, ], exports: [REDIS_CONNECTION, EMAIL_QUEUE], }) export class QueueModule {} @Module({ imports: [ QueueModule, BullstudioModule.forRootAsync({ imports: [QueueModule], inject: [EMAIL_QUEUE], useFactory: (emailQueue: Queue) => ({ mountPath: "/ops/bullstudio", queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], protection: { type: "session", username: process.env.BULLSTUDIO_USERNAME ?? "operator", password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, }, }), }), ], }) export class AppModule {} ``` -------------------------------- ### Queue Adapter Configuration Source: https://github.com/emirce/bullstudio/blob/main/README.md Wrappers for BullMQ and legacy Bull queues. ```ts import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; const queue = createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }); ``` ```ts import { createBullQueueAdapter } from "@bullstudio/bull-adapter"; const queue = createBullQueueAdapter(emailQueue, { key: "email", label: "Email", }); ``` -------------------------------- ### Production Baseline Configuration Source: https://github.com/emirce/bullstudio/blob/main/apps/website-with-docs/content/docs/embedded/index.mdx Configure Bullstudio for production with a stable mount path, read-only mode if mutations are not needed, and explicit credentials for security. This setup also customizes the dashboard and document identities. ```typescript bullstudio({ queues: bullstudioQueues, readOnly: true, protection: { type: "session", username: process.env.BULLSTUDIO_USERNAME!, password: process.env.BULLSTUDIO_PASSWORD!, sessionSecret: process.env.BULLSTUDIO_SESSION_SECRET!, }, dashboardIdentity: { title: "Production Queues", }, documentIdentity: { title: "Queue Ops", favicon: "/favicon.ico", }, }); ``` -------------------------------- ### Mount Bullstudio Dashboard in Hono Source: https://github.com/emirce/bullstudio/blob/main/docs/embedded-mode.md Create a BullMQ queue, wrap it with an adapter, and mount the Bullstudio dashboard within a Hono application. The dashboard will be accessible at the specified mount path. ```typescript import { serve } from "@hono/node-server"; import { createBullMqQueueAdapter } from "@bullstudio/bullmq-adapter"; import { bullstudio } from "@bullstudio/hono"; import { Queue } from "bullmq"; import { Hono } from "hono"; import IORedis from "ioredis"; const connection = new IORedis(process.env.REDIS_URL ?? "redis://localhost:6379", { maxRetriesPerRequest: null, }); const emailQueue = new Queue("email", { connection }); const host = new Hono(); const dashboard = bullstudio({ queues: [ createBullMqQueueAdapter(emailQueue, { key: "email", label: "Email", }), ], }); host.route("/ops/bullstudio", dashboard); serve({ fetch: host.fetch, port: 3000, }); ```