@mufazmi/rediscover 1.0.0 → 1.0.2
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 +124 -117
- package/backend/dist/middleware/auth.d.ts +0 -2
- package/backend/dist/middleware/auth.d.ts.map +1 -1
- package/backend/dist/middleware/auth.js +0 -2
- package/backend/dist/middleware/auth.js.map +1 -1
- package/backend/dist/middleware/errorHandler.d.ts.map +1 -1
- package/backend/dist/middleware/errorHandler.js +0 -2
- package/backend/dist/middleware/errorHandler.js.map +1 -1
- package/backend/dist/routes/redis/diagnostics.d.ts.map +1 -1
- package/backend/dist/routes/redis/diagnostics.js +0 -7
- package/backend/dist/routes/redis/diagnostics.js.map +1 -1
- package/backend/dist/routes/redis/search.d.ts.map +1 -1
- package/backend/dist/routes/redis/search.js +1 -7
- package/backend/dist/routes/redis/search.js.map +1 -1
- package/backend/node_modules/.package-lock.json +1 -1
- package/backend/package.json +1 -1
- package/dist/assets/{index-Bx4KpvAq.js → index-B93e6qw6.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +3 -2
package/README.md
CHANGED
|
@@ -2,27 +2,27 @@
|
|
|
2
2
|
|
|
3
3
|
<img src="public/rediscover_banner.png" alt="Rediscover Banner" width="100%">
|
|
4
4
|
|
|
5
|
-
<br/>
|
|
6
5
|
<br/>
|
|
7
6
|
|
|
8
7
|
# Rediscover
|
|
9
8
|
|
|
10
|
-
|
|
9
|
+
### A Self-Hosted Redis Management Tool with a Modern Web Interface
|
|
10
|
+
|
|
11
|
+
<br/>
|
|
11
12
|
|
|
12
13
|
[](https://opensource.org/licenses/MIT)
|
|
13
14
|
[](https://nodejs.org)
|
|
14
15
|
[](https://hub.docker.com/r/mufazmi/rediscover)
|
|
15
16
|
[](https://redis.io)
|
|
16
|
-
[](https://www.npmjs.com/package/@mufazmi/rediscover)
|
|
17
18
|
|
|
18
19
|
<br/>
|
|
19
20
|
|
|
20
|
-
|
|
21
|
-
key management, and advanced operations — all from a clean, responsive web interface.
|
|
21
|
+
Rediscover is a production-ready, self-hosted Redis management platform built for developers and teams who need real-time visibility, intuitive key management, and multi-instance control — all from a clean, responsive web interface.
|
|
22
22
|
|
|
23
23
|
<br/>
|
|
24
24
|
|
|
25
|
-
[
|
|
25
|
+
[**Live Demo**](#-live-demo) · [**Quick Start**](#-quick-start) · [**Installation**](#-installation) · [**Configuration**](#️-configuration) · [**Troubleshooting**](#-troubleshooting)
|
|
26
26
|
|
|
27
27
|
<br/>
|
|
28
28
|
|
|
@@ -30,36 +30,56 @@ key management, and advanced operations — all from a clean, responsive web int
|
|
|
30
30
|
|
|
31
31
|
---
|
|
32
32
|
|
|
33
|
+
## 🌐 Live Demo
|
|
34
|
+
|
|
35
|
+
Experience Rediscover before installing — two live instances are available for you to explore:
|
|
36
|
+
|
|
37
|
+
| Instance | URL |
|
|
38
|
+
|---|---|
|
|
39
|
+
| 🟢 Demo Server 1 | [rediscover.umairfarooqui.com](https://rediscover.umairfarooqui.com) |
|
|
40
|
+
| 🟢 Demo Server 2 | [rediscover1.umairfarooqui.com](https://rediscover1.umairfarooqui.com) |
|
|
41
|
+
|
|
42
|
+
**Demo Credentials** *(same for both instances)*
|
|
43
|
+
|
|
44
|
+
```
|
|
45
|
+
Username : admin
|
|
46
|
+
Password : admin@123
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
> These demo environments are shared and reset periodically. Please do not store sensitive data.
|
|
50
|
+
|
|
51
|
+
---
|
|
52
|
+
|
|
33
53
|
## ✨ Features
|
|
34
54
|
|
|
35
|
-
|
|
|
36
|
-
|
|
37
|
-
| 📊
|
|
38
|
-
| 🗝️
|
|
39
|
-
| 🔐
|
|
40
|
-
| 🌐
|
|
41
|
-
| 📱
|
|
42
|
-
| ⚡
|
|
43
|
-
| 🎨
|
|
44
|
-
| 🔧
|
|
55
|
+
| Feature | Description |
|
|
56
|
+
|---|---|
|
|
57
|
+
| 📊 **Real-time Monitoring** | Live stats, memory usage, and performance metrics streamed via WebSocket |
|
|
58
|
+
| 🗝️ **Key Management** | Browse, search, create, edit, and delete keys across all Redis data types |
|
|
59
|
+
| 🔐 **Secure Authentication** | JWT-based auth with role-based access control |
|
|
60
|
+
| 🌐 **Multi-Connection** | Manage multiple Redis instances simultaneously from a single interface |
|
|
61
|
+
| 📱 **Responsive Design** | Fully functional on desktop, tablet, and mobile — built with Tailwind CSS + Radix UI |
|
|
62
|
+
| ⚡ **High Performance** | Optimized loading and caching for large-scale Redis deployments |
|
|
63
|
+
| 🎨 **Modern UI** | Clean, distraction-free interface with thoughtful UX |
|
|
64
|
+
| 🔧 **Flexible Configuration** | Configure via environment variables or directly through the built-in UI |
|
|
45
65
|
|
|
46
66
|
---
|
|
47
67
|
|
|
48
68
|
## ⚡ Quick Start
|
|
49
69
|
|
|
50
|
-
Get
|
|
70
|
+
Get up and running in under a minute:
|
|
51
71
|
|
|
52
|
-
**NPM**
|
|
72
|
+
**Via NPM**
|
|
53
73
|
```bash
|
|
54
|
-
npm install -g rediscover && rediscover
|
|
74
|
+
npm install -g @mufazmi/rediscover && rediscover
|
|
55
75
|
```
|
|
56
76
|
|
|
57
|
-
**Docker**
|
|
77
|
+
**Via Docker**
|
|
58
78
|
```bash
|
|
59
79
|
docker run -d -p 3000:3000 -p 3001:3001 mufazmi/rediscover:latest
|
|
60
80
|
```
|
|
61
81
|
|
|
62
|
-
|
|
82
|
+
Open **http://localhost:3000** in your browser. ✅
|
|
63
83
|
|
|
64
84
|
---
|
|
65
85
|
|
|
@@ -70,8 +90,8 @@ Then open **http://localhost:3000** in your browser. ✅
|
|
|
70
90
|
<table>
|
|
71
91
|
<tr>
|
|
72
92
|
<th>Method</th>
|
|
73
|
-
<th>
|
|
74
|
-
<th>Version</th>
|
|
93
|
+
<th>Dependency</th>
|
|
94
|
+
<th>Minimum Version</th>
|
|
75
95
|
</tr>
|
|
76
96
|
<tr>
|
|
77
97
|
<td rowspan="2"><b>NPM</b></td>
|
|
@@ -84,7 +104,7 @@ Then open **http://localhost:3000** in your browser. ✅
|
|
|
84
104
|
</tr>
|
|
85
105
|
<tr>
|
|
86
106
|
<td rowspan="2"><b>Docker</b></td>
|
|
87
|
-
<td>Docker</td>
|
|
107
|
+
<td>Docker Engine</td>
|
|
88
108
|
<td>≥ 20.10.0</td>
|
|
89
109
|
</tr>
|
|
90
110
|
<tr>
|
|
@@ -104,28 +124,32 @@ Then open **http://localhost:3000** in your browser. ✅
|
|
|
104
124
|
|
|
105
125
|
---
|
|
106
126
|
|
|
107
|
-
###
|
|
127
|
+
### Option 1 — NPM *(Recommended)*
|
|
108
128
|
|
|
109
129
|
```bash
|
|
110
|
-
#
|
|
111
|
-
npm install -g rediscover
|
|
130
|
+
# Install globally
|
|
131
|
+
npm install -g @mufazmi/rediscover
|
|
112
132
|
|
|
113
|
-
#
|
|
133
|
+
# Verify installation
|
|
114
134
|
rediscover --version
|
|
115
135
|
|
|
116
|
-
#
|
|
136
|
+
# Launch the application
|
|
117
137
|
rediscover
|
|
118
138
|
```
|
|
119
139
|
|
|
120
|
-
|
|
140
|
+
Then visit **http://localhost:3000**.
|
|
121
141
|
|
|
122
|
-
> **
|
|
142
|
+
> **Tip:** If you encounter a permission error, run:
|
|
143
|
+
> ```bash
|
|
144
|
+
> npm config set prefix '~/.npm-global'
|
|
145
|
+
> ```
|
|
146
|
+
> Then add `~/.npm-global/bin` to your `PATH` and re-install.
|
|
123
147
|
|
|
124
148
|
---
|
|
125
149
|
|
|
126
|
-
###
|
|
150
|
+
### Option 2 — Docker
|
|
127
151
|
|
|
128
|
-
**Basic
|
|
152
|
+
**Basic usage:**
|
|
129
153
|
```bash
|
|
130
154
|
docker run -d \
|
|
131
155
|
--name rediscover \
|
|
@@ -134,7 +158,7 @@ docker run -d \
|
|
|
134
158
|
mufazmi/rediscover:latest
|
|
135
159
|
```
|
|
136
160
|
|
|
137
|
-
**With environment variables:**
|
|
161
|
+
**With custom environment variables:**
|
|
138
162
|
```bash
|
|
139
163
|
docker run -d \
|
|
140
164
|
--name rediscover \
|
|
@@ -146,11 +170,12 @@ docker run -d \
|
|
|
146
170
|
mufazmi/rediscover:latest
|
|
147
171
|
```
|
|
148
172
|
|
|
149
|
-
**Docker Compose** *(recommended for production)*:
|
|
173
|
+
**Docker Compose** *(recommended for production deployments)*:
|
|
150
174
|
|
|
151
175
|
```yaml
|
|
152
176
|
# docker-compose.yml
|
|
153
177
|
version: '3.8'
|
|
178
|
+
|
|
154
179
|
services:
|
|
155
180
|
rediscover:
|
|
156
181
|
image: mufazmi/rediscover:latest
|
|
@@ -175,49 +200,29 @@ docker-compose up -d
|
|
|
175
200
|
|
|
176
201
|
---
|
|
177
202
|
|
|
178
|
-
### Method 3 — Binary
|
|
179
|
-
|
|
180
|
-
Download a pre-compiled binary from the [**Releases page**](https://github.com/mufazmi/rediscover/releases):
|
|
181
|
-
|
|
182
|
-
| Platform | Binary |
|
|
183
|
-
|---|---|
|
|
184
|
-
| 🪟 Windows | `rediscover-windows-x64.exe` |
|
|
185
|
-
| 🍎 macOS (Intel) | `rediscover-macos-x64` |
|
|
186
|
-
| 🍎 macOS (Apple Silicon) | `rediscover-macos-arm64` |
|
|
187
|
-
| 🐧 Linux | `rediscover-linux-x64` |
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
# macOS / Linux — make executable and run
|
|
191
|
-
chmod +x rediscover-linux-x64
|
|
192
|
-
sudo mv rediscover-linux-x64 /usr/local/bin/rediscover
|
|
193
|
-
rediscover
|
|
194
|
-
```
|
|
195
|
-
|
|
196
|
-
---
|
|
197
|
-
|
|
198
203
|
## ⚙️ Configuration
|
|
199
204
|
|
|
200
|
-
Create a `.env` file in your working directory:
|
|
205
|
+
Create a `.env` file in your working directory to customize Rediscover:
|
|
201
206
|
|
|
202
207
|
```env
|
|
203
|
-
# ── Server
|
|
208
|
+
# ── Server ─────────────────────────────────────────────────
|
|
204
209
|
PORT=3000
|
|
205
210
|
BACKEND_PORT=3001
|
|
206
211
|
NODE_ENV=production
|
|
207
212
|
HOST=0.0.0.0
|
|
208
213
|
|
|
209
|
-
# ── Security
|
|
210
|
-
JWT_SECRET=your-very-secure-secret-key
|
|
214
|
+
# ── Security ────────────────────────────────────────────────
|
|
215
|
+
JWT_SECRET=your-very-secure-secret-key # Required in production
|
|
211
216
|
JWT_EXPIRATION=24h
|
|
212
217
|
|
|
213
|
-
# ── Redis Connection
|
|
218
|
+
# ── Redis Connection ─────────────────────────────────────────
|
|
214
219
|
REDIS_HOST=localhost
|
|
215
220
|
REDIS_PORT=6379
|
|
216
221
|
REDIS_PASSWORD=your-redis-password
|
|
217
222
|
REDIS_TIMEOUT=5000
|
|
218
223
|
REDIS_TLS=false
|
|
219
224
|
|
|
220
|
-
# ── Application
|
|
225
|
+
# ── Application ──────────────────────────────────────────────
|
|
221
226
|
MAX_CONNECTIONS=10
|
|
222
227
|
SESSION_TIMEOUT=30
|
|
223
228
|
REFRESH_INTERVAL=5
|
|
@@ -230,20 +235,20 @@ DEBUG=false
|
|
|
230
235
|
|---|---|---|
|
|
231
236
|
| `PORT` | `3000` | Web UI server port |
|
|
232
237
|
| `BACKEND_PORT` | `3001` | Backend API server port |
|
|
233
|
-
| `NODE_ENV` | `development` | `production` or `development` |
|
|
234
|
-
| `HOST` | `localhost` | Bind address
|
|
235
|
-
| `JWT_SECRET` | — | **Required in production.** JWT
|
|
238
|
+
| `NODE_ENV` | `development` | Runtime environment: `production` or `development` |
|
|
239
|
+
| `HOST` | `localhost` | Bind address — use `0.0.0.0` to expose on all interfaces |
|
|
240
|
+
| `JWT_SECRET` | — | **Required in production.** Secret key used to sign JWT tokens |
|
|
236
241
|
| `JWT_EXPIRATION` | `24h` | Token lifetime (e.g. `1h`, `7d`, `24h`) |
|
|
237
|
-
| `REDIS_HOST` | `localhost` | Default Redis hostname or IP |
|
|
242
|
+
| `REDIS_HOST` | `localhost` | Default Redis hostname or IP address |
|
|
238
243
|
| `REDIS_PORT` | `6379` | Default Redis port |
|
|
239
|
-
| `REDIS_PASSWORD` | — | Redis AUTH password (if set) |
|
|
244
|
+
| `REDIS_PASSWORD` | — | Redis AUTH password (leave blank if not set) |
|
|
240
245
|
| `REDIS_TIMEOUT` | `5000` | Connection timeout in milliseconds |
|
|
241
|
-
| `MAX_CONNECTIONS` | `10` |
|
|
242
|
-
| `REFRESH_INTERVAL` | `5` | Dashboard refresh
|
|
243
|
-
| `SESSION_TIMEOUT` | `30` |
|
|
246
|
+
| `MAX_CONNECTIONS` | `10` | Maximum simultaneous Redis connections |
|
|
247
|
+
| `REFRESH_INTERVAL` | `5` | Dashboard auto-refresh interval in seconds |
|
|
248
|
+
| `SESSION_TIMEOUT` | `30` | Idle session timeout in minutes |
|
|
244
249
|
| `DEBUG` | `false` | Enable verbose debug logging |
|
|
245
250
|
|
|
246
|
-
> **
|
|
251
|
+
> **Note:** You can also add and manage Redis connections directly from the web UI by clicking **Add Connection** and entering your server details.
|
|
247
252
|
|
|
248
253
|
---
|
|
249
254
|
|
|
@@ -253,7 +258,7 @@ DEBUG=false
|
|
|
253
258
|
<summary><b>❌ "npm: command not found" or "node: command not found"</b></summary>
|
|
254
259
|
<br>
|
|
255
260
|
|
|
256
|
-
Node.js is not installed. Install it
|
|
261
|
+
Node.js is not installed on your system. Install it using one of the methods below:
|
|
257
262
|
|
|
258
263
|
```bash
|
|
259
264
|
# macOS
|
|
@@ -266,12 +271,12 @@ sudo apt install nodejs npm
|
|
|
266
271
|
sudo yum install nodejs npm
|
|
267
272
|
```
|
|
268
273
|
|
|
269
|
-
Or download
|
|
274
|
+
Or download the official installer at [nodejs.org](https://nodejs.org).
|
|
270
275
|
|
|
271
276
|
</details>
|
|
272
277
|
|
|
273
278
|
<details>
|
|
274
|
-
<summary><b>❌ "Permission denied" during npm install</b></summary>
|
|
279
|
+
<summary><b>❌ "Permission denied" during npm global install</b></summary>
|
|
275
280
|
<br>
|
|
276
281
|
|
|
277
282
|
```bash
|
|
@@ -279,21 +284,24 @@ mkdir ~/.npm-global
|
|
|
279
284
|
npm config set prefix '~/.npm-global'
|
|
280
285
|
echo 'export PATH=~/.npm-global/bin:$PATH' >> ~/.bashrc
|
|
281
286
|
source ~/.bashrc
|
|
282
|
-
npm install -g rediscover
|
|
287
|
+
npm install -g @mufazmi/rediscover
|
|
283
288
|
```
|
|
284
289
|
|
|
285
290
|
</details>
|
|
286
291
|
|
|
287
292
|
<details>
|
|
288
|
-
<summary><b>❌ Port 3000 already in use</b></summary>
|
|
293
|
+
<summary><b>❌ Port 3000 is already in use</b></summary>
|
|
289
294
|
<br>
|
|
290
295
|
|
|
291
296
|
```bash
|
|
292
|
-
#
|
|
293
|
-
sudo lsof -ti:3000 | xargs kill -9
|
|
294
|
-
|
|
297
|
+
# macOS / Linux — kill the process using the port
|
|
298
|
+
sudo lsof -ti:3000 | xargs kill -9
|
|
299
|
+
|
|
300
|
+
# Windows — find and kill the process
|
|
301
|
+
netstat -ano | findstr :3000
|
|
302
|
+
# Then: taskkill /PID <PID> /F
|
|
295
303
|
|
|
296
|
-
#
|
|
304
|
+
# Alternatively, run on a different port
|
|
297
305
|
PORT=3005 rediscover
|
|
298
306
|
```
|
|
299
307
|
|
|
@@ -304,28 +312,28 @@ PORT=3005 rediscover
|
|
|
304
312
|
<br>
|
|
305
313
|
|
|
306
314
|
```bash
|
|
307
|
-
#
|
|
308
|
-
redis-cli ping
|
|
315
|
+
# Verify Redis is running
|
|
316
|
+
redis-cli ping # Expected response: PONG
|
|
309
317
|
|
|
310
|
-
# Install Redis if
|
|
311
|
-
sudo apt install redis-server
|
|
318
|
+
# Install Redis if not present
|
|
319
|
+
sudo apt install redis-server # Ubuntu / Debian
|
|
312
320
|
brew install redis && brew services start redis # macOS
|
|
313
|
-
sudo yum install redis
|
|
321
|
+
sudo yum install redis # CentOS / RHEL
|
|
314
322
|
```
|
|
315
323
|
|
|
316
|
-
Also
|
|
317
|
-
-
|
|
318
|
-
- `bind`
|
|
324
|
+
Also verify:
|
|
325
|
+
- Port `6379` is open in your firewall rules
|
|
326
|
+
- The `bind` directive in `redis.conf` permits connections from your host
|
|
319
327
|
|
|
320
328
|
</details>
|
|
321
329
|
|
|
322
330
|
<details>
|
|
323
|
-
<summary><b>❌ "Authentication failed" to Redis</b></summary>
|
|
331
|
+
<summary><b>❌ "Authentication failed" when connecting to Redis</b></summary>
|
|
324
332
|
<br>
|
|
325
333
|
|
|
326
|
-
-
|
|
327
|
-
- Ensure `REDIS_PASSWORD` in your `.env` matches
|
|
328
|
-
- Test
|
|
334
|
+
- Check the `requirepass` directive in your `redis.conf`
|
|
335
|
+
- Ensure `REDIS_PASSWORD` in your `.env` matches exactly
|
|
336
|
+
- Test manually: `redis-cli -a your-password ping`
|
|
329
337
|
|
|
330
338
|
</details>
|
|
331
339
|
|
|
@@ -335,20 +343,20 @@ Also check:
|
|
|
335
343
|
|
|
336
344
|
```bash
|
|
337
345
|
sudo usermod -aG docker $USER
|
|
338
|
-
newgrp docker # Apply without logging out
|
|
346
|
+
newgrp docker # Apply group change without logging out
|
|
339
347
|
```
|
|
340
348
|
|
|
341
349
|
</details>
|
|
342
350
|
|
|
343
351
|
<details>
|
|
344
|
-
<summary><b>❌ Container exits immediately</b></summary>
|
|
352
|
+
<summary><b>❌ Container exits immediately after starting</b></summary>
|
|
345
353
|
<br>
|
|
346
354
|
|
|
347
355
|
```bash
|
|
348
|
-
# Inspect
|
|
356
|
+
# Inspect startup logs
|
|
349
357
|
docker logs rediscover
|
|
350
358
|
|
|
351
|
-
# Run interactively
|
|
359
|
+
# Run interactively to debug
|
|
352
360
|
docker run -it --rm -p 3000:3000 -p 3001:3001 mufazmi/rediscover:latest
|
|
353
361
|
```
|
|
354
362
|
|
|
@@ -360,10 +368,9 @@ docker run -it --rm -p 3000:3000 -p 3001:3001 mufazmi/rediscover:latest
|
|
|
360
368
|
|
|
361
369
|
```bash
|
|
362
370
|
# Export inline
|
|
363
|
-
export JWT_SECRET="your-secure-key"
|
|
364
|
-
rediscover
|
|
371
|
+
export JWT_SECRET="your-secure-key" && rediscover
|
|
365
372
|
|
|
366
|
-
# Or
|
|
373
|
+
# Or persist in .env
|
|
367
374
|
echo 'JWT_SECRET=your-secure-key' >> .env
|
|
368
375
|
```
|
|
369
376
|
|
|
@@ -373,36 +380,36 @@ echo 'JWT_SECRET=your-secure-key' >> .env
|
|
|
373
380
|
<summary><b>❌ Blank page or UI not loading</b></summary>
|
|
374
381
|
<br>
|
|
375
382
|
|
|
376
|
-
-
|
|
377
|
-
- Temporarily disable ad blockers
|
|
383
|
+
- Confirm JavaScript is enabled in your browser
|
|
384
|
+
- Temporarily disable browser extensions or ad blockers
|
|
378
385
|
- Use a modern browser: Chrome 90+, Firefox 88+, Safari 14+
|
|
379
|
-
- Open DevTools → Console
|
|
386
|
+
- Open **DevTools → Console** and look for JavaScript errors
|
|
380
387
|
|
|
381
388
|
</details>
|
|
382
389
|
|
|
383
|
-
**Enable debug mode** for detailed logs:
|
|
390
|
+
**Enable debug mode** for detailed diagnostic logs:
|
|
384
391
|
```bash
|
|
385
392
|
DEBUG=true rediscover
|
|
386
393
|
```
|
|
387
394
|
|
|
388
|
-
Still stuck? [Open a GitHub Issue](https://github.com/mufazmi/rediscover/issues) with your OS, Node.js version, install method, and
|
|
395
|
+
Still stuck? [Open a GitHub Issue](https://github.com/mufazmi/rediscover/issues) with your OS, Node.js version, install method, and full error output.
|
|
389
396
|
|
|
390
397
|
---
|
|
391
398
|
|
|
392
|
-
## 🛠️ Development
|
|
399
|
+
## 🛠️ Local Development
|
|
393
400
|
|
|
394
401
|
```bash
|
|
395
|
-
# Clone the
|
|
402
|
+
# Clone the repository
|
|
396
403
|
git clone https://github.com/mufazmi/rediscover.git
|
|
397
404
|
cd rediscover
|
|
398
405
|
|
|
399
406
|
# Install dependencies
|
|
400
407
|
npm install
|
|
401
408
|
|
|
402
|
-
# Start
|
|
409
|
+
# Start the development server
|
|
403
410
|
npm run dev
|
|
404
411
|
|
|
405
|
-
# Run
|
|
412
|
+
# Run the test suite
|
|
406
413
|
npm test
|
|
407
414
|
|
|
408
415
|
# Build for production
|
|
@@ -413,15 +420,15 @@ npm run build
|
|
|
413
420
|
|
|
414
421
|
## 🤝 Contributing
|
|
415
422
|
|
|
416
|
-
Contributions are welcome — bug
|
|
423
|
+
Contributions are welcome and appreciated — whether it's a bug fix, new feature, documentation improvement, or a question.
|
|
417
424
|
|
|
418
425
|
1. Fork the repository
|
|
419
|
-
2. Create
|
|
420
|
-
3. Commit your changes: `git commit -m 'Add your feature'`
|
|
421
|
-
4. Push: `git push origin feature/your-feature`
|
|
426
|
+
2. Create a feature branch: `git checkout -b feature/your-feature-name`
|
|
427
|
+
3. Commit your changes: `git commit -m 'Add: your feature description'`
|
|
428
|
+
4. Push to the branch: `git push origin feature/your-feature-name`
|
|
422
429
|
5. Open a Pull Request
|
|
423
430
|
|
|
424
|
-
Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting.
|
|
431
|
+
Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting changes.
|
|
425
432
|
|
|
426
433
|
---
|
|
427
434
|
|
|
@@ -438,15 +445,15 @@ Please read [CONTRIBUTING.md](CONTRIBUTING.md) before submitting.
|
|
|
438
445
|
|
|
439
446
|
### 🏆 Security Recognition
|
|
440
447
|
|
|
441
|
-
Recognized for responsible disclosure
|
|
448
|
+
Recognized by leading global organizations for responsible vulnerability disclosure:
|
|
442
449
|
|
|
443
|
-
`NASA` · `Dell Technologies` · `Nokia` · `Lenovo` · `Zoom` · `LG` · `ABN AMRO Bank` · `Accenture` · `Paytm` · `U.S.
|
|
450
|
+
`NASA` · `Dell Technologies` · `Nokia` · `Lenovo` · `Zoom` · `LG` · `ABN AMRO Bank` · `Accenture` · `Paytm` · `U.S. Department of Homeland Security` · `WHO` · `United Airlines` · `Drexel University` · `Radboud University`
|
|
444
451
|
|
|
445
452
|
---
|
|
446
453
|
|
|
447
454
|
## 📄 License
|
|
448
455
|
|
|
449
|
-
Released under the [MIT License](LICENSE). Free to use, modify, and distribute.
|
|
456
|
+
Released under the [MIT License](LICENSE). Free to use, modify, and distribute — attribution appreciated.
|
|
450
457
|
|
|
451
458
|
---
|
|
452
459
|
|
|
@@ -454,6 +461,6 @@ Released under the [MIT License](LICENSE). Free to use, modify, and distribute.
|
|
|
454
461
|
|
|
455
462
|
**Made with ❤️ by [Umair Farooqui](https://github.com/mufazmi)**
|
|
456
463
|
|
|
457
|
-
*If Rediscover saves you time,
|
|
464
|
+
*If Rediscover saves you time, a ⭐ on GitHub goes a long way — thank you!*
|
|
458
465
|
|
|
459
|
-
</div
|
|
466
|
+
</div>
|
|
@@ -16,8 +16,6 @@ export interface AuthRequest extends Request {
|
|
|
16
16
|
*
|
|
17
17
|
* Extracts JWT from Authorization header, verifies it, and attaches user to request.
|
|
18
18
|
* Returns 401 if token is missing or invalid.
|
|
19
|
-
*
|
|
20
|
-
* Requirement 4.11: Authentication middleware
|
|
21
19
|
*/
|
|
22
20
|
export declare function authenticate(req: AuthRequest, res: Response, next: NextFunction): void;
|
|
23
21
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/middleware/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAe,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED
|
|
1
|
+
{"version":3,"file":"auth.d.ts","sourceRoot":"","sources":["../../src/middleware/auth.ts"],"names":[],"mappings":"AAAA;;;;GAIG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAC1D,OAAO,EAAe,UAAU,EAAE,MAAM,0BAA0B,CAAC;AAEnE;;GAEG;AACH,MAAM,WAAW,WAAY,SAAQ,OAAO;IAC1C,IAAI,CAAC,EAAE,UAAU,CAAC;CACnB;AAED;;;;;GAKG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,WAAW,EAChB,GAAG,EAAE,QAAQ,EACb,IAAI,EAAE,YAAY,GACjB,IAAI,CAuCN;AAED;;;;;;;;GAQG;AACH,wBAAgB,WAAW,CAAC,IAAI,EAAE,OAAO,GAAG,UAAU,IAC5C,KAAK,WAAW,EAAE,KAAK,QAAQ,EAAE,MAAM,YAAY,KAAG,IAAI,CA4BnE"}
|
|
@@ -13,8 +13,6 @@ const auth_service_1 = require("../services/auth.service");
|
|
|
13
13
|
*
|
|
14
14
|
* Extracts JWT from Authorization header, verifies it, and attaches user to request.
|
|
15
15
|
* Returns 401 if token is missing or invalid.
|
|
16
|
-
*
|
|
17
|
-
* Requirement 4.11: Authentication middleware
|
|
18
16
|
*/
|
|
19
17
|
function authenticate(req, res, next) {
|
|
20
18
|
try {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/middleware/auth.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;
|
|
1
|
+
{"version":3,"file":"auth.js","sourceRoot":"","sources":["../../src/middleware/auth.ts"],"names":[],"mappings":";AAAA;;;;GAIG;;AAkBH,oCA2CC;AAWD,kCA6BC;AAlGD,2DAAmE;AASnE;;;;;GAKG;AACH,SAAgB,YAAY,CAC1B,GAAgB,EAChB,GAAa,EACb,IAAkB;IAElB,IAAI,CAAC;QACH,0CAA0C;QAC1C,MAAM,UAAU,GAAG,GAAG,CAAC,OAAO,CAAC,aAAa,CAAC;QAE7C,IAAI,CAAC,UAAU,EAAE,CAAC;YAChB,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;gBACnB,OAAO,EAAE,KAAK;gBACd,KAAK,EAAE,8BAA8B;aACtC,CAAC,CAAC;YACH,OAAO;QACT,CAAC;QAED,sBAAsB;QACtB,MAAM,KAAK,GAAG,UAAU,CAAC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ED,kCAAkC;QAClC,IAAI,GAAG,CAAC,IAAI,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;YAC3B,IAAI,EAAE,CAAC;YACP,OAAO;QACT,CAAC;QAED,kCAAkC;QAClC,GAAG,CAAC,MAAM,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC;YACnB,OAAO,EAAE,KAAK;YACd,KAAK,EAAE,iCAAiC,IAAI,EAAE;SAC/C,CAAC,CAAC;IACL,CAAC,CAAC;AACJ,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,KAAK,EACV,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,YAAY,GAClB,IAAI,
|
|
1
|
+
{"version":3,"file":"errorHandler.d.ts","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,MAAM,SAAS,CAAC;AAG1D;;GAEG;AAEH,qBAAa,eAAgB,SAAQ,KAAK;gBAC5B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,mBAAoB,SAAQ,KAAK;gBAChC,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,kBAAmB,SAAQ,KAAK;gBAC/B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,aAAc,SAAQ,KAAK;gBAC1B,OAAO,EAAE,MAAM;CAI5B;AAED,qBAAa,oBAAqB,SAAQ,KAAK;gBACjC,OAAO,EAAE,MAAM;CAI5B;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,YAAY,CAC1B,GAAG,EAAE,KAAK,EACV,GAAG,EAAE,OAAO,EACZ,GAAG,EAAE,QAAQ,EACb,KAAK,EAAE,YAAY,GAClB,IAAI,CAuCN"}
|
|
@@ -60,7 +60,6 @@ exports.RedisConnectionError = RedisConnectionError;
|
|
|
60
60
|
*/
|
|
61
61
|
function errorHandler(err, req, res, _next) {
|
|
62
62
|
// Log error message and stack trace to console
|
|
63
|
-
// Requirement 34.3: Log error message and stack trace
|
|
64
63
|
console.error('Error occurred:', {
|
|
65
64
|
message: err.message,
|
|
66
65
|
stack: err.stack,
|
|
@@ -70,7 +69,6 @@ function errorHandler(err, req, res, _next) {
|
|
|
70
69
|
// Map error types to HTTP status codes
|
|
71
70
|
let statusCode = 500;
|
|
72
71
|
let errorMessage = err.message || 'Internal server error';
|
|
73
|
-
// Requirement 34.5-34.9: Map error types to status codes
|
|
74
72
|
if (err instanceof zod_1.ZodError) {
|
|
75
73
|
// Zod validation errors → 400
|
|
76
74
|
statusCode = 400;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuDH,
|
|
1
|
+
{"version":3,"file":"errorHandler.js","sourceRoot":"","sources":["../../src/middleware/errorHandler.ts"],"names":[],"mappings":";AAAA;;;;;GAKG;;;AAuDH,oCA4CC;AAhGD,6BAA+B;AAE/B;;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IAAI,GAAG,YAAY,cAAQ,EAAE,CAAC;QAC5B,8BAA8B;QAC9B,UAAU,GAAG,GAAG,CAAC;QACjB,YAAY,GAAG,mBAAmB,CAAC;IACrC,CAAC;SAAM,IAAI,GAAG,YAAY,eAAe,EAAE,CAAC;QAC1C,iCAAiC;QACjC,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;SAAM,IAAI,GAAG,YAAY,mBAAmB,EAAE,CAAC;QAC9C,8BAA8B;QAC9B,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;SAAM,IAAI,GAAG,YAAY,kBAAkB,EAAE,CAAC;QAC7C,6BAA6B;QAC7B,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;SAAM,IAAI,GAAG,YAAY,aAAa,EAAE,CAAC;QACxC,yBAAyB;QACzB,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;SAAM,IAAI,GAAG,YAAY,oBAAoB,EAAE,CAAC;QAC/C,gCAAgC;QAChC,UAAU,GAAG,GAAG,CAAC;IACnB,CAAC;IAED,0CAA0C;IAC1C,GAAG,CAAC,MAAM,CAAC,UAAU,CAAC,CAAC,IAAI,CAAC;QAC1B,OAAO,EAAE,KAAK;QACd,KAAK,EAAE,YAAY;KACpB,CAAC,CAAC;AACL,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/routes/redis/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,QAAA,MAAM,MAAM,4CAAW,CAAC;
|
|
1
|
+
{"version":3,"file":"diagnostics.d.ts","sourceRoot":"","sources":["../../../src/routes/redis/diagnostics.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAQH,QAAA,MAAM,MAAM,4CAAW,CAAC;AAkgBxB,eAAe,MAAM,CAAC"}
|
|
@@ -49,7 +49,6 @@ function parseInfoResponse(infoString) {
|
|
|
49
49
|
}
|
|
50
50
|
/**
|
|
51
51
|
* Analyze memory health
|
|
52
|
-
* Requirement 1.8: Flag warning when used_memory > 80% of maxmemory
|
|
53
52
|
*/
|
|
54
53
|
function analyzeMemory(info) {
|
|
55
54
|
const memory = info.memory || {};
|
|
@@ -91,7 +90,6 @@ function analyzeMemory(info) {
|
|
|
91
90
|
}
|
|
92
91
|
/**
|
|
93
92
|
* Analyze persistence health
|
|
94
|
-
* Requirement 1.9: Flag warning when both RDB and AOF are disabled
|
|
95
93
|
*/
|
|
96
94
|
function analyzePersistence(info) {
|
|
97
95
|
const persistence = info.persistence || {};
|
|
@@ -142,7 +140,6 @@ function analyzePersistence(info) {
|
|
|
142
140
|
}
|
|
143
141
|
/**
|
|
144
142
|
* Analyze performance health
|
|
145
|
-
* Requirement 1.10: Flag warning when ops_per_sec high or hit rate < 80%
|
|
146
143
|
*/
|
|
147
144
|
function analyzePerformance(info) {
|
|
148
145
|
const stats = info.stats || {};
|
|
@@ -178,7 +175,6 @@ function analyzePerformance(info) {
|
|
|
178
175
|
}
|
|
179
176
|
/**
|
|
180
177
|
* Analyze connections health
|
|
181
|
-
* Requirement 1.11: Flag warning when connected_clients approaches maxclients
|
|
182
178
|
*/
|
|
183
179
|
function analyzeConnections(info) {
|
|
184
180
|
const clients = info.clients || {};
|
|
@@ -211,7 +207,6 @@ function analyzeConnections(info) {
|
|
|
211
207
|
}
|
|
212
208
|
/**
|
|
213
209
|
* Analyze replication health
|
|
214
|
-
* Requirement 1.12: Flag warning when lag > 1000ms
|
|
215
210
|
*/
|
|
216
211
|
function analyzeReplication(info) {
|
|
217
212
|
const replication = info.replication || {};
|
|
@@ -284,7 +279,6 @@ function analyzeReplication(info) {
|
|
|
284
279
|
}
|
|
285
280
|
/**
|
|
286
281
|
* Analyze security health
|
|
287
|
-
* Requirement 1.13: Flag warning when requirepass not set or protected-mode disabled
|
|
288
282
|
*/
|
|
289
283
|
async function analyzeSecurity(client) {
|
|
290
284
|
try {
|
|
@@ -342,7 +336,6 @@ async function analyzeSecurity(client) {
|
|
|
342
336
|
}
|
|
343
337
|
/**
|
|
344
338
|
* Analyze keyspace health
|
|
345
|
-
* Requirement 1.14: Flag warning for keys without TTL or expired keys accumulation
|
|
346
339
|
*/
|
|
347
340
|
async function analyzeKeyspace(info) {
|
|
348
341
|
try {
|