@queuedash/client 1.0.0 → 1.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (4) hide show
  1. package/README.md +57 -13
  2. package/dist/main.js +21 -21
  3. package/dist/main.mjs +1393 -1390
  4. package/package.json +3 -2
package/README.md CHANGED
@@ -1,5 +1,3 @@
1
- > **WIP** - This is a work in progress. Please check back later.
2
-
3
1
  <p align="center">
4
2
  <a href="https://www.queuedash.com" target="_blank" rel="noopener">
5
3
  <img src="https://res.cloudinary.com/driverseat/image/upload/v1677406730/queuedash/queuedash-social.png" alt="QueueDash">
@@ -7,7 +5,7 @@
7
5
  </p>
8
6
 
9
7
  <p align="center">
10
- A stunning, sleek dashboard for Bull, BullMQ, and Bee-Queue
8
+ A stunning, sleek dashboard for Bull, BullMQ, and Bee-Queue.
11
9
  <p>
12
10
 
13
11
  <p align="center">
@@ -22,14 +20,14 @@
22
20
  ## Features
23
21
 
24
22
  - 😍&nbsp; Simple, clean, and compact UI
25
- - 🧙&nbsp; Add jobs to queue with ease
26
- - 🪄&nbsp; Retry, remove, and more actions for jobs
23
+ - 🧙&nbsp; Add jobs to your queue with ease
24
+ - 🪄&nbsp; Retry, remove, and more convenient actions for your jobs
27
25
  - 📊&nbsp; Stats for job counts, job durations, and job wait times
28
26
  - ✨&nbsp; Top-level overview page of all queues
29
- - 🔋&nbsp; Next.js, Express.js, and Fastify adapters
27
+ - 🔋&nbsp; Integrates with Next.js, Express.js, and Fastify
30
28
  - ⚡️&nbsp; Compatible with Bull, BullMQ, and Bee-Queue
31
29
 
32
- ## Use
30
+ ## Getting Started
33
31
 
34
32
  ### Express
35
33
 
@@ -42,13 +40,15 @@ import { createQueueDashExpressMiddleware } from "@queuedash/api";
42
40
 
43
41
  const app = express();
44
42
 
43
+ const reportQueue = new Bull("report-queue");
44
+
45
45
  createQueueDashExpressMiddleware({
46
46
  app,
47
47
  baseUrl: "/queuedash",
48
48
  ctx: {
49
49
  queues: [
50
50
  {
51
- queue: new Bull("report-queue"),
51
+ queue: reportQueue,
52
52
  displayName: "Reports",
53
53
  type: "bull" as const,
54
54
  },
@@ -88,6 +88,8 @@ export default QueueDashPages;
88
88
  import * as trpcNext from "@trpc/server/adapters/next";
89
89
  import { appRouter } from "@queuedash/api";
90
90
 
91
+ const reportQueue = new Bull("report-queue");
92
+
91
93
  export default trpcNext.createNextApiHandler({
92
94
  router: appRouter,
93
95
  batching: {
@@ -96,7 +98,7 @@ export default trpcNext.createNextApiHandler({
96
98
  createContext: () => ({
97
99
  queues: [
98
100
  {
99
- queue: new Bull("report-queue"),
101
+ queue: reportQueue,
100
102
  displayName: "Reports",
101
103
  type: "bull" as const,
102
104
  },
@@ -111,6 +113,26 @@ See the [./examples](./examples) folder for more.
111
113
 
112
114
  ## API Reference
113
115
 
116
+ ### `createQueueDash<*>Middleware`
117
+
118
+ ```typescript
119
+ type QueueDashMiddlewareOptions = {
120
+ app: express.Application | FastifyInstance; // Express or Fastify app
121
+ baseUrl: string; // Base path for the API and UI
122
+ ctx: QueueDashContext; // Context for the UI
123
+ };
124
+
125
+ type QueueDashContext = {
126
+ queues: QueueDashQueue[]; // Array of queues to display
127
+ };
128
+
129
+ type QueueDashQueue = {
130
+ queue: Bull.Queue | BullMQ.Queue | BeeQueue; // Queue instance
131
+ displayName: string; // Display name for the queue
132
+ type: "bull" | "bullmq" | "bee"; // Queue type
133
+ };
134
+ ```
135
+
114
136
  ### `<QueueDashApp />`
115
137
 
116
138
  ```typescript jsx
@@ -120,8 +142,30 @@ type QueueDashAppProps = {
120
142
  };
121
143
  ```
122
144
 
123
- ### `Context`
145
+ ## Roadmap
146
+
147
+ - Supports Celery and other queueing systems
148
+ - Command+K bar and shortcuts
149
+ - Display Redis information
150
+ - Ability to whitelabel the UI
151
+
152
+ ## Pro Version
153
+
154
+ Right now, QueueDash simply taps into your Redis instance, making it very easy to set up, but also limited in functionality.
155
+
156
+ I'm thinking about building a free-to-host version on top of this which will require external services (db, auth, etc.), but it will make the following features possible:
157
+
158
+ - Alerts and notifications
159
+ - Quick search and filtering
160
+ - Queue trends and analytics
161
+ - Invite team members
162
+
163
+ If you're interested in this version, please let me know!
164
+
165
+ ## Acknowledgements
166
+
167
+ QueueDash was inspired by some great open source projects. Here's a few of them:
124
168
 
125
- - `queues` - Array of queues to display
126
- - `queue` - Queue instance
127
- - `displayName` - Display name for the queue
169
+ - [bull-board](https://github.com/vcapretz/bull-board)
170
+ - [bull-monitor](https://github.com/s-r-x/bull-monitor)
171
+ - [bull-arena](https://github.com/bee-queue/arena)