Backend:
- routes/databases.rs: full CRUD for MariaDB databases + users
- mysql -u root via stdin pipe (unix socket auth, API runs as root)
- cPanel-style naming: username_dbname / username_dbuser
- Identifier validation (alphanumeric + underscore only)
- Password escaping for mysql string literals
- Safety guard: refuses to drop DBs without account prefix
- GET /api/databases (admin all), GET /api/databases/:username (per-account)
- POST /api/databases (create DB + user + GRANT ALL + nixpanel record)
- DELETE /api/databases/name/:db_name (drop DB + user + nixpanel record)
- routes/mod.rs: add databases module
- main.rs: register database routes
NixServer:
- DatabaseManager page: table across all accounts, create form with
account selector + live name preview, drop with confirmation modal
NixClient:
- MySQLDatabases page: per-account view, create form with password
confirm + connection-details card, drop with confirmation modal
- api.ts: listMyDatabases, createDatabase, deleteDatabase
CHANGELOG.md: v0.4.0-alpha entry
Cargo.toml: version bump 0.3.0-alpha -> 0.4.0-alpha
Cargo workspace with four crates:
- nixpanel-common: shared SectionRequest/SectionResponse types
- nixpanel-api: main Axum HTTP server (JWT auth, DB, routing)
- nixpanel-services: section binary for systemctl start/stop/restart
- nixpanel-sysinfo: section binary for CPU/RAM/disk/OS/version reads
nixpanel-api features:
- POST /api/auth/login — Argon2id verification, HS256 JWT
- GET /api/dashboard — real account counts + sysinfo + versions
- GET /api/services — live systemctl status via section binary
- POST /api/services/:name/:action — start/stop/restart
- GET /api/accounts — list from MariaDB
- POST /api/accounts — create account + system user
Section binaries are UPX-compressed after build.
DB schema auto-migrated on first start; admin user seeded from
/opt/nixpanel/.admin_user + .admin_pass files.
Frontend changes:
- nixserver/src/api.ts + App.tsx wired to real API (JWT stored in
localStorage, real data in dashboard/services/accounts)
- nixclient/src/api.ts added
- Both vite configs get /api proxy to localhost:4000 for dev
- install.sh updated to copy + compress all section binaries
NixServer now has a dark orange-accented WHM-style layout with
collapsible sidebar grouped by function, stat bar, service manager
table with actions, quick-action icon grid, server info bar, and
a branded split-panel login page.
NixClient now has a cPanel-style feature icon grid with category
sections, live search, account sidebar with usage bars, and a
blue-themed login page.
terser is not in package.json so vite fails at the minification step
after transforming all modules — the script exits non-zero, killing
the installer. esbuild is bundled with vite and requires no extra dep.
- nixserver/: React 18 + TypeScript + Vite + Tailwind
- Login page + placeholder admin dashboard with card grid
- Blue accent color (#3b82f6)
- Full Tailwind + PostCSS + TypeScript setup
- nixclient/: identical structure, user-facing panel
- Green accent color (#10b981)
- Same build tooling as NixServer
- install.sh: new 'Building NixServer & NixClient UIs' step
- npm install + npm run build for each
- Outputs to /opt/nixpanel/nixserver/dist and /opt/nixpanel/nixclient/dist
- Both panels immediately accessible via Apache on 2087 and 2083
- Skips gracefully if source not present (early dev)