Skip to content

Commit 2d5fc9d

Browse files
committed
feat: mqBase v0.12.0 - Stats tab, guest user, password sync fix
Major changes: - Add Stats/Metrics tab with real-time broker statistics and charts - Add guest user (guest:guest) with guest/# topic access - Add 404 error page for admin UI - Update Mosquitto broker to 2.1.0 - Fix MQTT password sync to dynsec.json on container start - Fix null byte handling in password hash generation - Update README with default credentials table - Remove multi-tenancy components (moved to mqbase-auth-proxy repo) Admin UI improvements: - Real-time message rate charts with history persistence - Broker connection status indicator - Enhanced keyboard shortcuts - Improved error handling Testing: - All 52 integration tests passing - Added mosquitto-test.conf for test configuration - Stress test script improvements
1 parent 98f0c53 commit 2d5fc9d

25 files changed

Lines changed: 3911 additions & 581 deletions

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
**/*.log
77
**/.idea
88

9+
DEPLOYMENT.md
910
.env
1011
.vscode/settings.json
11-
*.secrets
12+
*.secrets

README.md

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,13 @@ favicon=admin/logo.png
140140
| `logo` | Path to logo image displayed in the header (optional, no logo if empty) |
141141
| `favicon` | Path to favicon displayed in the browser tab (optional, no icon if empty) |
142142

143-
The `dynsec.json` file defines the Mosquitto dynamic security configuration with two users:
144-
- `admin:admin` — Full access to all topics (for admin UI)
145-
- `test:test` — Restricted access to `+/test/#` topics (for testing)
143+
The `dynsec.json` file defines the Mosquitto dynamic security configuration with default users:
144+
145+
| Username | Password | Access |
146+
|----------|----------|--------|
147+
| `admin` | `admin` | Full access to all topics (`#`, `$CONTROL/#`, `$SYS/#`) |
148+
| `test` | `test` | Restricted to `test/#` topics (for integration testing) |
149+
| `guest` | `guest` | Restricted to `guest/#` topics (for demos) |
146150

147151
To enable TLS termination inside the Mosquitto broker, mount your TLS certificate and key to `/mosquitto/security/` (e.g., `server.crt` and `server.key`) and uncomment the `certfile`/`keyfile` lines in [`mosquitto/config/mosquitto.conf`](mosquitto/config/mosquitto.conf). For mutual TLS (mTLS) with client certificates, also configure the `cafile` and `require_certificate` options.
148152

@@ -230,5 +234,7 @@ The web admin interface supports the following keyboard shortcuts for improved p
230234

231235
This project uses the following open source libraries:
232236

237+
- [MQTT.js](https://github.com/mqttjs/MQTT.js) - MQTT client library written in JavaScript for node.js and the browser
238+
- [Chart.js](https://github.com/chartjs/Chart.js) - Simple yet flexible JavaScript charting for designers & developers
233239
- [Catppuccin](https://github.com/catppuccin/catppuccin) — Soothing pastel color scheme for the admin UI
234240
- [ulid-c](https://github.com/skeeto/ulid-c) — C implementation of ULID (Universally Unique Lexicographically Sortable Identifier)

admin/404.html

Lines changed: 109 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,109 @@
1+
<!DOCTYPE html>
2+
<html lang="en">
3+
<head>
4+
<meta charset="UTF-8">
5+
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6+
<title>Page Not Found - mqBase</title>
7+
<style>
8+
/* Catppuccin Mocha Color Palette */
9+
:root {
10+
--ctp-base: #1e1e2e;
11+
--ctp-mantle: #181825;
12+
--ctp-surface0: #313244;
13+
--ctp-surface1: #45475a;
14+
--ctp-text: #cdd6f4;
15+
--ctp-subtext1: #bac2de;
16+
--ctp-subtext0: #a6adc8;
17+
--ctp-overlay0: #6c7086;
18+
--ctp-mauve: #cba6f7;
19+
--ctp-red: #f38ba8;
20+
}
21+
22+
* {
23+
margin: 0;
24+
padding: 0;
25+
box-sizing: border-box;
26+
}
27+
28+
body {
29+
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
30+
background-color: var(--ctp-base);
31+
color: var(--ctp-text);
32+
min-height: 100vh;
33+
display: flex;
34+
flex-direction: column;
35+
align-items: center;
36+
justify-content: center;
37+
text-align: center;
38+
padding: 20px;
39+
}
40+
41+
.container {
42+
max-width: 400px;
43+
}
44+
45+
.logo {
46+
width: 120px;
47+
height: auto;
48+
margin-bottom: 32px;
49+
}
50+
51+
.error-code {
52+
font-size: 72px;
53+
font-weight: 700;
54+
color: var(--ctp-mauve);
55+
line-height: 1;
56+
margin-bottom: 16px;
57+
}
58+
59+
h1 {
60+
font-size: 24px;
61+
font-weight: 600;
62+
color: var(--ctp-text);
63+
margin-bottom: 12px;
64+
}
65+
66+
p {
67+
font-size: 16px;
68+
color: var(--ctp-subtext0);
69+
line-height: 1.5;
70+
margin-bottom: 32px;
71+
}
72+
73+
.home-link {
74+
display: inline-block;
75+
padding: 12px 28px;
76+
background-color: var(--ctp-mauve);
77+
color: var(--ctp-base);
78+
text-decoration: none;
79+
font-weight: 600;
80+
font-size: 14px;
81+
border-radius: 6px;
82+
transition: opacity 0.2s ease;
83+
}
84+
85+
.home-link:hover {
86+
opacity: 0.9;
87+
}
88+
89+
.footer {
90+
position: absolute;
91+
bottom: 24px;
92+
font-size: 12px;
93+
color: var(--ctp-overlay0);
94+
}
95+
</style>
96+
</head>
97+
<body>
98+
<div class="container">
99+
<img src="/admin/logo-mid.png" alt="mqBase" class="logo">
100+
<div class="error-code">404</div>
101+
<h1>Page Not Found</h1>
102+
<p>The page you're looking for doesn't exist or has been moved.</p>
103+
<a href="/" class="home-link">Go to Dashboard</a>
104+
</div>
105+
<div class="footer">
106+
© 2026 mqBase
107+
</div>
108+
</body>
109+
</html>

0 commit comments

Comments
 (0)