ZMB Webui: Complete Project – Rebrand & Initial Clean Commit

ARCHITECTURE
============
Backend: FastAPI + uvicorn (port 8000)
  - JWT authentication with PAM system users
  - ZFS CLI wrapper with caching (30-60s TTL)
  - WebSocket pool status broadcaster (30s interval)
  - Services: auth, zfs_runner, file_manager, shares, identities, system_info
  - Routers: pools, datasets, snapshots, shares, identities, navigator, system

Frontend: Next.js 15 + TypeScript (static export)
  - Incremental Static Regeneration (ISR) for weak hardware
  - Type-safe API client (lib/api.ts)
  - Dark mode + custom Tailwind theme
  - Pages: Dashboard, Login, Snapshots, Datasets, Shares, etc.

DEPLOYMENT
==========
Test Target: 192.168.1.179:8090 (Debian LXC)
Production: 10.66.120.3:9090 (Raspberry Pi 4GB ARM64)
Updater: Automated Gitea-based deployment (update-test.sh, update-pi.sh)

FEATURES COMPLETED
==================
Phase 3a: Dashboard Quick Stats (System, CPU, Memory, Storage)
  - Real-time stats with color-coded progress bars
  - Responsive grid layout (mobile: 1, tablet: 2, desktop: 4 columns)
  - ISR-optimized for fast loads on weak hardware

REBRANDING
==========
Renamed throughout:
  - Project: 'ZFS Manager' → 'ZMB Webui'
  - Services: 'zfs-manager' → 'zmb-webui'
  - Systemd units: zfs-manager-backend → zmb-webui-backend
  - Configuration files and documentation

Co-Authored-By: Patrick <patrick@perlbach24.de>
This commit is contained in:
Claude Code
2026-04-22 00:26:23 +02:00
committed by Patrick
commit 92bed208e0
108 changed files with 29925 additions and 0 deletions
+51
View File
@@ -0,0 +1,51 @@
#!/bin/bash
# ZMB Webui Updater für 192.168.1.179
# Buildet Frontend neu und deployt alles
set -e
CONTAINER="192.168.1.179"
BACKEND_PATH="/opt/zmb-webui/backend"
FRONTEND_PATH="/opt/zmb-webui/frontend"
echo "🔄 ZMB Webui Update für $CONTAINER"
echo ""
# 1. Backend Files
echo "📦 Backend updaten..."
scp backend/services/shares.py root@$CONTAINER:$BACKEND_PATH/services/ > /dev/null 2>&1
scp backend/routers/navigator.py root@$CONTAINER:$BACKEND_PATH/routers/ > /dev/null 2>&1
scp backend/routers/shares.py root@$CONTAINER:$BACKEND_PATH/routers/ > /dev/null 2>&1
scp backend/main.py root@$CONTAINER:$BACKEND_PATH/ > /dev/null 2>&1
echo " ✓ Backend files"
# 2. Frontend bauen
echo "📦 Frontend bauen..."
cd frontend
rm -rf out .next 2>/dev/null || true
npm run build > /dev/null 2>&1
echo " ✓ Frontend gebaut"
# 3. Frontend deployen
echo "📦 Frontend deployen..."
scp -r out/* root@$CONTAINER:$FRONTEND_PATH/ > /dev/null 2>&1
echo " ✓ Frontend hochgeladen"
cd ..
# 4. Services restarren
echo "🔄 Services neustarten..."
ssh root@$CONTAINER "systemctl restart zmb-webui-backend" > /dev/null 2>&1
sleep 2
ssh root@$CONTAINER "systemctl restart nginx" > /dev/null 2>&1
echo " ✓ Backend restarted"
echo " ✓ Nginx restarted"
# 5. Status prüfen
echo ""
echo "✅ Update complete!"
echo ""
ssh root@$CONTAINER "systemctl status zmb-webui-backend nginx | grep -E 'Active:|running'" | while read line; do echo " $line"; done
echo ""
echo "🌐 Zugang: http://$CONTAINER:8090"
echo ""