@queuedash/ui 3.11.0 → 3.12.1

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.
package/README.md CHANGED
@@ -5,7 +5,7 @@
5
5
  </p>
6
6
 
7
7
  <p align="center">
8
- A stunning, sleek dashboard for Bull, BullMQ, and Bee-Queue.
8
+ A stunning, sleek dashboard for Bull, BullMQ, Bee-Queue, and GroupMQ.
9
9
  <p>
10
10
 
11
11
  <p align="center">
@@ -25,7 +25,9 @@
25
25
  - 📊&nbsp; Stats for job counts, job durations, and job wait times
26
26
  - ✨&nbsp; Top-level overview page of all queues
27
27
  - 🔋&nbsp; Integrates with Next.js, Express.js, and Fastify
28
- - ⚡️&nbsp; Compatible with Bull, BullMQ, and Bee-Queue
28
+ - ⚡️&nbsp; Compatible with Bull, BullMQ, Bee-Queue, and GroupMQ
29
+ - 📅&nbsp; Job scheduler support
30
+ - 📈&nbsp; Metrics for queue performance
29
31
 
30
32
  ## Getting Started
31
33
 
@@ -67,6 +69,56 @@ app.listen(3000, () => {
67
69
 
68
70
  `pnpm install @queuedash/api @queuedash/ui`
69
71
 
72
+ #### App Router
73
+ ```typescript jsx
74
+ // app/admin/queuedash/[[...slug]]/page.tsx
75
+ "use client";
76
+
77
+ import { QueueDashApp } from "@queuedash/ui";
78
+ import "@queuedash/ui/dist/styles.css";
79
+
80
+ function getBaseUrl() {
81
+ if (process.env.VERCEL_URL) {
82
+ return `https://${process.env.VERCEL_URL}/api/queuedash`;
83
+ }
84
+
85
+ return `http://localhost:${process.env.PORT ?? 3000}/api/queuedash`;
86
+ }
87
+
88
+ export default function QueueDashPages() {
89
+ return <QueueDashApp apiUrl={getBaseUrl()} basename="/admin/queuedash" />;
90
+ }
91
+ ```
92
+
93
+ ```typescript jsx
94
+ // app/api/queuedash/[...trpc]/route.ts
95
+ import { fetchRequestHandler } from "@trpc/server/adapters/fetch";
96
+ import { appRouter } from "@queuedash/api";
97
+
98
+ const reportQueue = new Bull("report-queue");
99
+
100
+ function handler(req: Request) {
101
+ return fetchRequestHandler({
102
+ endpoint: "/api/queuedash",
103
+ req,
104
+ router: appRouter,
105
+ allowBatching: true,
106
+ createContext: () => ({
107
+ queues: [
108
+ {
109
+ queue: reportQueue,
110
+ displayName: "Reports",
111
+ type: "bull" as const,
112
+ },
113
+ ],
114
+ });
115
+ }
116
+
117
+ export { handler as GET, handler as POST };
118
+ ```
119
+
120
+ #### Pages Router
121
+
70
122
  ```typescript jsx
71
123
  // pages/admin/queuedash/[[...slug]].tsx
72
124
  import { QueueDashApp } from "@queuedash/ui";
@@ -84,7 +136,9 @@ const QueueDashPages = () => {
84
136
  };
85
137
 
86
138
  export default QueueDashPages;
139
+ ```
87
140
 
141
+ ```typescript jsx
88
142
  // pages/api/queuedash/[trpc].ts
89
143
  import * as trpcNext from "@trpc/server/adapters/next";
90
144
  import { appRouter } from "@queuedash/api";
@@ -108,6 +162,45 @@ export default trpcNext.createNextApiHandler({
108
162
  });
109
163
  ```
110
164
 
165
+ ### Docker
166
+
167
+ The fastest way to get started is using the official Docker image:
168
+
169
+ ```bash
170
+ docker run -p 3000:3000 \
171
+ -e QUEUES_CONFIG_JSON='{"queues":[{"name":"my-queue","displayName":"My Queue","type":"bullmq","connectionUrl":"redis://localhost:6379"}]}' \
172
+ ghcr.io/alexbudure/queuedash:latest
173
+ ```
174
+
175
+ Then visit http://localhost:3000
176
+
177
+ #### Environment Variables
178
+
179
+ - `QUEUES_CONFIG_JSON` - **Required**. JSON string containing queue configuration
180
+
181
+ Example configuration:
182
+ ```json
183
+ {
184
+ "queues": [
185
+ {
186
+ "name": "cancellation-follow-ups",
187
+ "displayName": "Cancellation follow-ups",
188
+ "type": "bullmq",
189
+ "connectionUrl": "redis://localhost:6379"
190
+ },
191
+ {
192
+ "name": "email-queue",
193
+ "displayName": "Email Queue",
194
+ "type": "bull",
195
+ "connectionUrl": "redis://localhost:6379"
196
+ }
197
+ ]
198
+ }
199
+ ```
200
+
201
+ Supported queue types: `bull`, `bullmq`, `bee`, `groupmq`
202
+
203
+
111
204
  See the [./examples](./examples) folder for more.
112
205
 
113
206
  ---
@@ -130,7 +223,7 @@ type QueueDashContext = {
130
223
  type QueueDashQueue = {
131
224
  queue: Bull.Queue | BullMQ.Queue | BeeQueue; // Queue instance
132
225
  displayName: string; // Display name for the queue
133
- type: "bull" | "bullmq" | "bee"; // Queue type
226
+ type: "bull" | "bullmq" | "bee" | "groupmq"; // Queue type
134
227
  };
135
228
  ```
136
229
 
@@ -143,25 +236,15 @@ type QueueDashAppProps = {
143
236
  };
144
237
  ```
145
238
 
146
- ## Roadmap
147
-
148
- - Supports Celery and other queueing systems
149
- - Command+K bar and shortcuts
150
- - Ability to whitelabel the UI
239
+ ## Need more?
151
240
 
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:
241
+ If you need more capabilities, check out [queuedash.com](https://www.queuedash.com):
157
242
 
158
243
  - Alerts and notifications
159
244
  - Quick search and filtering
160
245
  - Queue trends and analytics
161
246
  - Invite team members
162
247
 
163
- If you're interested in this version, please let me know!
164
-
165
248
  ## Acknowledgements
166
249
 
167
250
  QueueDash was inspired by some great open source projects. Here's a few of them: