A modern, responsive web interface for managing and monitoring RustMQ clusters built with Vue.js 3 and TypeScript.
-
📊 Dashboard: Real-time cluster overview with health metrics
- Cluster health status and Raft term information
- Broker statistics (online/offline counts)
- Topic statistics (total topics, partitions, replication factor)
- Recent topics list
- Broker health monitoring with auto-refresh
-
📝 Topics Management: Full CRUD operations for topics
- List all topics with partition and replication details
- Create new topics with configurable settings
- Delete existing topics
- View detailed topic information including partition assignments
- Configure retention, compression, and segment settings
-
🖥️ Brokers Monitoring: Real-time broker health tracking
- Broker status overview (online/offline)
- Health percentage calculation
- Individual broker health cards
- Auto-refresh broker status every 5 seconds
-
🔒 ACL Viewer: Placeholder for future ACL management
- Security status overview
- Best practices documentation
- Coming soon: Full ACL management interface
-
⚙️ Configuration: View cluster and system configuration
- Cluster configuration (leader, term, broker count)
- Storage configuration (WAL, object storage, cache)
- Network configuration (QUIC, gRPC, Admin API ports)
- Performance features showcase
- System information (version, uptime, health)
- Framework: Vue.js 3 (Composition API with
<script setup>) - Language: TypeScript
- Build Tool: Vite
- HTTP Client: Axios
- Routing: Vue Router 4
- Styling: Custom CSS with dark theme
- Node.js 18+ and npm (or yarn/pnpm)
- RustMQ admin server running on port 8080 (configurable)
- Install dependencies:
cd web
npm installRun the development server with hot-reload:
npm run devThe WebUI will be available at http://localhost:3000 with API proxy to localhost:8080.
Build the application for production deployment:
npm run buildThis creates an optimized build in the dist/ directory.
Test the production build locally:
npm run previewweb/
├── src/
│ ├── api/ # API client and types
│ │ ├── client.ts # Axios-based API client
│ │ └── types.ts # TypeScript interfaces for API
│ ├── views/ # Vue components for each page
│ │ ├── Dashboard.vue # Cluster overview
│ │ ├── Topics.vue # Topic management
│ │ ├── Brokers.vue # Broker monitoring
│ │ ├── ACL.vue # ACL viewer (placeholder)
│ │ └── Config.vue # Configuration viewer
│ ├── App.vue # Root component with navigation
│ ├── router.ts # Vue Router configuration
│ ├── main.ts # Application entry point
│ └── style.css # Global styles
├── public/ # Static assets
├── dist/ # Production build output (generated)
├── index.html # HTML template
├── package.json # Dependencies and scripts
├── vite.config.ts # Vite configuration
├── tsconfig.json # TypeScript configuration
└── README.md # This file
The WebUI communicates with the RustMQ admin server REST API:
| Endpoint | Method | Description |
|---|---|---|
/health |
GET | Health check and uptime |
/api/v1/cluster |
GET | Cluster status and metadata |
/api/v1/topics |
GET | List all topics |
/api/v1/topics |
POST | Create a new topic |
/api/v1/topics/{name} |
GET | Get topic details |
/api/v1/topics/{name} |
DELETE | Delete a topic |
/api/v1/brokers |
GET | List all brokers |
All API responses are fully typed using TypeScript interfaces defined in src/api/types.ts. This provides:
- Compile-time type checking
- IntelliSense/autocomplete in editors
- Runtime validation with error handling
Example:
interface ClusterStatus {
brokers: BrokerStatus[]
topics: TopicSummary[]
leader: string | null
term: number
healthy: boolean
}The dev server proxies API requests to avoid CORS issues. Configure in vite.config.ts:
server: {
proxy: {
'/api': {
target: 'http://localhost:8080', // Change if admin server runs elsewhere
changeOrigin: true,
},
},
}For production, the WebUI is served directly by the RustMQ admin server (no separate web server needed):
-
Build the WebUI:
cd web npm run build -
Start the admin server:
cargo run --bin admin_server
-
Access the WebUI at:
http://localhost:8080
The admin server automatically serves static files from web/dist/ directory.
- Auto-refresh: Cluster status updates every 5 seconds
- Metrics Cards:
- Cluster health (healthy/unhealthy indicator)
- Leader node and Raft term
- Broker statistics (total/online/offline)
- Topic statistics (total topics, partitions, avg replication)
- Recent Topics: Shows the 5 most recently created topics
- Broker List: Full table of all brokers with status
-
Create Topic Form:
- Topic name validation (alphanumeric, hyphens, underscores)
- Configurable partitions and replication factor
- Optional retention period (in hours)
- Compression type selection (none, gzip, lz4, snappy, zstd)
-
Topic Details Modal:
- Partition assignments (leader, replicas, in-sync replicas)
- Configuration details
- Created timestamp
-
Delete Confirmation: Prevents accidental deletion
-
Health Overview:
- Total broker count
- Online/offline breakdown
- Overall health percentage
-
Broker Cards:
- Visual health status (green/red border)
- Endpoint information
- Current status
-
Auto-refresh: Updates every 5 seconds
- Cluster Info: Leader, term, broker count
- Storage Details: WAL backend, object storage type, cache strategy
- Network Ports: QUIC, gRPC, Admin API, Controller
- Performance Features: Showcases RustMQ optimizations
- SmallVec (90% allocation reduction)
- Buffer pooling (30-40% overhead reduction)
- Moka cache (lock-free TinyLFU)
- FuturesUnordered (85% latency improvement)
- Fast ACL (547ns checks)
- Miri validation (memory safety)
- Chrome/Edge 90+
- Firefox 88+
- Safari 14+
Run TypeScript type checker without building:
npm run type-checkVite provides instant HMR during development. Changes to Vue components and TypeScript files are reflected immediately without full page reloads.
- Open browser DevTools
- Vue DevTools extension recommended for component debugging
- Network tab shows all API requests/responses
- Define TypeScript types in
src/api/types.ts - Add API methods in
src/api/client.ts - Create/update Vue component in
src/views/ - Add route in
src/router.tsif needed - Update navigation in
src/App.vueif needed
- Uses custom CSS with CSS variables for theming
- Dark theme by default (light theme can be added)
- Responsive design with mobile breakpoints
- Consistent spacing and typography
- Status indicators: green (online), red (offline), yellow (warning)
- Primary:
#646cff(blue) - Success:
#4ade80(green) - Error:
#ef4444(red) - Warning:
#fbbf24(yellow) - Background:
#242424 - Card background:
#1a1a1a - Border:
#3f3f3f
For production deployments:
- Enable mTLS on the admin server
- Configure firewall rules to restrict access
- Use reverse proxy with authentication (nginx, Caddy, etc.)
- Monitor access logs
Future versions will include:
- Built-in authentication
- Role-based access control (RBAC)
- Session management
- Audit logging
Issue: Cannot find module 'vue'
# Solution: Reinstall dependencies
rm -rf node_modules package-lock.json
npm installIssue: TypeScript errors during build
# Solution: Run type checker first
npm run type-checkIssue: API requests fail (CORS or connection refused)
# Solution: Ensure admin server is running
cargo run --bin admin_server
# Check server is accessible
curl http://localhost:8080/healthIssue: Page shows "Loading..." forever
- Check browser console for errors
- Verify API endpoints are responding
- Check network tab in DevTools
Issue: Port 3000 already in use
# Solution: Change port in vite.config.ts
server: {
port: 3001, // Use different port
}- Bundle Size: ~150KB gzipped (production build)
- Initial Load: < 2s on fast 3G
- Time to Interactive: < 3s
- Auto-refresh: 5s interval for dashboard and brokers
- Real-time WebSocket updates instead of polling
- Full ACL management interface
- Producer/Consumer monitoring and metrics
- Partition rebalancing controls
- Cluster configuration updates
- Grafana dashboard embedding
- Dark/Light theme toggle
- Advanced filtering and search
- Export data (CSV, JSON)
- Multi-cluster management
- Alert configuration
- Cost analytics dashboard
To contribute to the WebUI:
- Follow Vue.js 3 Composition API patterns
- Use TypeScript for all new code
- Add types to
src/api/types.tsfor new API endpoints - Test in both development and production builds
- Ensure responsive design works on mobile
- Update this README for new features
Copyright 2025 RustMQ Project
Licensed under the Apache License, Version 2.0. See the LICENSE file in the project root for details.
- Documentation: Project README
- Issues: GitHub Issues
- Discussions: GitHub Discussions
Built with ❤️ using Vue.js, TypeScript, and Vite