import { FormEvent, useState } from "react"; import { CheckCircle2, Moon, Server, ShieldCheck, Sparkles, Sun } from "lucide-react"; import { publicApi } from "../api/client"; import { buttonClass, Field, inputClass, secondaryButtonClass, selectClass } from "../components/FormControls"; import { useTheme } from "../stores/theme"; export function SetupWizard() { const [step, setStep] = useState(0); const [error, setError] = useState(""); const { dark, toggle } = useTheme(); const [form, setForm] = useState({ admin_email: "admin@nexafabric.local", admin_name: "NexaFabric Administrator", admin_password: "ChangeMe_UseEnvInstead", cluster_name: "Production Proxmox", cluster_api_url: "https://pve.example.local:8006", cluster_api_token: "", cluster_provider: "proxmox", cluster_mode: "read_only", verify_tls: true, }); async function complete(event: FormEvent) { event.preventDefault(); setError(""); try { await publicApi("/setup/complete", { method: "POST", body: JSON.stringify(form) }); window.location.href = "/login"; } catch (err) { setError(err instanceof Error ? err.message : "Setup failed"); } } return (
A guided setup will create your administrator, connect Proxmox, and start safely in read-only mode.
Create your first administrator and connect your first provider.