9 Commits
Author SHA1 Message Date
NixReaper 2ac1adcdbb feat: v0.4.0-alpha — MySQL/MariaDB database manager
Security Audit / Rust Security Audit (push) Canceled after 0s
Security Audit / ShellCheck (push) Canceled after 0s
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
2026-04-26 06:01:23 -05:00
NixReaper 079170b43a feat: v0.3.0-alpha — DNS management, email accounts, suspend/terminate, password change
Backend:
- routes/dns.rs: GET/POST/DELETE /api/dns/:domain (pdnsutil CRUD, SOA hidden, auto-rectify)
- routes/email.rs: GET/POST/DELETE email accounts with Maildir provisioning
- routes/me.rs: POST /api/me/password (verify current, hash new, update users+accounts)
- routes/accounts.rs: GET /api/accounts/:username, suspend, unsuspend, terminate (deprovision+userdel)
- main.rs: register all new routes; import axum::routing::delete
- Cargo.toml: version bump 0.2.0-alpha -> 0.3.0-alpha

NixServer:
- Zone Manager page: lists all PowerDNS zones, click -> DNS editor
- DNS Records page: add/delete records, colour-coded type badges, zone switcher
- Service Manager page: dedicated page with refresh + running/stopped pills
- List Accounts: Suspend/Unsuspend/Terminate buttons with confirmation modal
- Domain cell links to live site

NixClient:
- Domains page: primary domain info, document root, quota, bandwidth
- Email Accounts page: create/list/delete mailboxes with quota display
- Change Password page: Argon2id verify + update server-side
- AccountSidebar: fetches real account data (domain, package, quota)
- api.ts: listMyEmailAccounts, createEmailAccount, deleteEmailAccount, changePassword, getMyAccount(username)

CHANGELOG.md: v0.3.0-alpha entry
2026-04-26 05:23:55 -05:00
NixReaper cb6be7c634 fix: move FormField outside CreateAccount to prevent input focus loss on keystroke 2026-04-25 21:21:45 -05:00
NixReaper 7724c86572 chore: bump version to 0.2.0-alpha, update CHANGELOG 2026-04-25 16:58:27 -05:00
NixReaper 5247c77132 feat: add Rust backend — workspace with section executables
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
2026-04-25 16:41:57 -05:00
NixReaper a257b5571c feat: redesign NixServer (WHM) and NixClient (cPanel) UIs
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.
2026-04-25 15:51:47 -05:00
NixReaper 0f28e879f0 fix: change login field from email to username type
Browser validates type=email and rejects plain usernames like 'admin'.
Changed to type=text with Username label to match the generated credentials.
2026-04-25 15:27:28 -05:00
NixReaper 2735b9c8f4 fix: switch vite minifier from terser to esbuild
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.
2026-04-25 09:45:13 -05:00
NixReaper e58769a4bd feat: add NixServer and NixClient React UIs, wire into installer
- 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)
2026-04-25 09:22:12 -05:00