a63f1923fb6a608535aab05e073f80bad55bf6d3
All checks were successful
Build and Push Docker Image to Gitea / build-and-push (push) Successful in 1m8s
Features added: - Visual analytics dashboard with interactive charts - Process state distribution pie chart - Process uptime bar chart (top 10 by uptime) - Group statistics stacked bar chart - Real-time data visualization using Recharts Implementation details: - Created chart components: - ProcessStateChart: Pie chart showing state distribution (Running, Stopped, Fatal, Starting, Stopping) - ProcessUptimeChart: Horizontal bar chart displaying top 10 processes by uptime in hours - GroupStatistics: Stacked bar chart showing process counts per group by state Dashboard enhancements: - Added "Analytics" section between statistics cards and quick actions - Charts display only when processes are loaded and available - Responsive grid layout (2 columns on large screens for state/group charts) - Full-width uptime chart for better readability Chart features: - Interactive tooltips with formatted data - Color-coded by state (success green, destructive red, muted gray) - Proper legends and labels - Uptime displayed in hours with minutes in tooltip - Process names truncated to 15 chars for display - Empty state messages when no data available Data visualization: - Pie chart: Percentage distribution of process states - Bar chart: Top 10 processes sorted by uptime (descending) - Stacked bar: Group overview with running/stopped/fatal breakdown Phase 5 complete (3-4 hours estimated)
Supervisor UI
A modern, sophisticated web interface for Supervisor process management built with Next.js 16 and Tailwind CSS 4.
Features
- Real-time Monitoring: Auto-refreshing process status and system information
- Process Control: Start, stop, and restart processes with a single click
- Modern Dashboard: Clean, responsive interface with dark/light mode
- Backend Proxy: Secure API proxy for Supervisor XML-RPC calls
- Docker Ready: Multi-stage Docker build for production deployment
- Type-Safe: Full TypeScript coverage with Zod validation
Tech Stack
- Framework: Next.js 16 (App Router)
- Styling: Tailwind CSS 4 with OKLCH color system
- State Management: TanStack Query (React Query) + Zustand
- API: XML-RPC client for Supervisor
- Type Safety: TypeScript + Zod schemas
- UI Components: Custom components with lucide-react icons
- Notifications: Sonner toast notifications
Prerequisites
- Node.js 20+ with pnpm 10+
- Supervisor instance running with XML-RPC interface enabled
Configuration
Supervisor Setup
Ensure your supervisord.conf has the inet HTTP server enabled:
[inet_http_server]
port = 127.0.0.1:9001
;username = user
;password = pass
Environment Variables
Create a .env.local file:
# Supervisor connection
SUPERVISOR_HOST=localhost
SUPERVISOR_PORT=9001
# Optional: Basic auth (if configured in supervisord.conf)
# SUPERVISOR_USERNAME=user
# SUPERVISOR_PASSWORD=pass
Development
# Install dependencies
pnpm install
# Run development server
pnpm dev
# Open http://localhost:3000
Production Build
# Build for production
pnpm build
# Start production server
pnpm start
Docker Deployment
Using Pre-built Image from Gitea Registry
The easiest way to deploy is using the pre-built image from the Gitea registry:
# Pull the latest image
docker pull dev.pivoine.art/valknar/supervisor-ui:latest
# Run container with custom Supervisor connection
docker run -d \
-p 3000:3000 \
-e SUPERVISOR_HOST=your-supervisor-host \
-e SUPERVISOR_PORT=9001 \
-e SUPERVISOR_USERNAME=user \
-e SUPERVISOR_PASSWORD=pass \
--name supervisor-ui \
dev.pivoine.art/valknar/supervisor-ui:latest
Build and Run Locally
# Build Docker image with custom defaults
docker build -t supervisor-ui \
--build-arg SUPERVISOR_HOST=localhost \
--build-arg SUPERVISOR_PORT=9001 \
.
# Run container (environment variables override build args)
docker run -d \
-p 3000:3000 \
-e SUPERVISOR_HOST=localhost \
-e SUPERVISOR_PORT=9001 \
--name supervisor-ui \
supervisor-ui
Using Docker Compose
Create a .env file for your configuration:
SUPERVISOR_HOST=localhost
SUPERVISOR_PORT=9001
SUPERVISOR_USERNAME=user
SUPERVISOR_PASSWORD=pass
Then use Docker Compose:
# Start with docker-compose
docker-compose up -d
# View logs
docker-compose logs -f supervisor-ui
# Stop
docker-compose down
To use the pre-built image, edit docker-compose.yml and uncomment the registry image line.
Arty Integration
This project supports Arty for container management:
# Start the service
arty up -d supervisor-ui
# View status
arty ps
# View logs
arty logs supervisor-ui
Container Registry
Docker images are automatically built and pushed to the Gitea registry on every commit to main:
- Registry:
dev.pivoine.art - Image:
valknar/supervisor-ui - Tags:
latest- Latest stable build from main branchdevelop- Latest development buildv*.*.*- Semantic version tagsmain-<sha>- Commit-specific builds
Available Tags
# Pull specific versions
docker pull dev.pivoine.art/valknar/supervisor-ui:latest
docker pull dev.pivoine.art/valknar/supervisor-ui:v1.0.0
docker pull dev.pivoine.art/valknar/supervisor-ui:develop
Project Structure
supervisor-ui/
├── app/ # Next.js App Router
│ ├── api/supervisor/ # API routes (Supervisor proxy)
│ ├── processes/ # Process management page
│ ├── logs/ # Logs viewer page
│ ├── config/ # Configuration page
│ └── page.tsx # Dashboard home
├── components/
│ ├── layout/ # Layout components (Navbar)
│ ├── process/ # Process-specific components
│ ├── providers/ # Context providers
│ └── ui/ # Reusable UI components
├── lib/
│ ├── hooks/ # React Query hooks
│ ├── supervisor/ # Supervisor client & types
│ └── utils/ # Utility functions
├── Dockerfile # Multi-stage production build
├── docker-compose.yml # Docker Compose configuration
└── package.json # Dependencies and scripts
API Routes
All Supervisor operations are proxied through Next.js API routes:
GET /api/health- Health check endpointGET /api/supervisor/system- System informationGET /api/supervisor/processes- All processesGET /api/supervisor/processes/[name]- Single process infoPOST /api/supervisor/processes/[name]/start- Start processPOST /api/supervisor/processes/[name]/stop- Stop processPOST /api/supervisor/processes/[name]/restart- Restart processGET /api/supervisor/processes/[name]/logs/stdout- Stdout logsGET /api/supervisor/processes/[name]/logs/stderr- Stderr logs
Features Roadmap
- Real-time process monitoring
- Process control (start/stop/restart)
- System status dashboard
- Dark/light mode theme
- Docker deployment
- Log viewer with real-time tailing
- Configuration management UI
- Process group operations
- Batch process actions
- Charts and metrics visualization
- Search and filtering
- Keyboard shortcuts
- WebSocket support for push updates
Development Scripts
# Development
pnpm dev # Start dev server with hot reload
pnpm dev:turbo # Start dev server with Turbopack
# Build
pnpm build # Production build
pnpm start # Start production server
# Code Quality
pnpm lint # Run ESLint
pnpm lint:fix # Fix ESLint issues
pnpm format # Format with Prettier
pnpm type-check # TypeScript type checking
License
MIT
Credits
Built with inspiration from modern UI patterns and the excellent pastel-ui project configuration.
Description
Languages
TypeScript
95.8%
CSS
3.3%
Dockerfile
0.9%