feat: zero-config first run — in-browser admin bootstrap + auto-generated secrets

Fresh installs need nothing in .env. See PR description for the full feature.
This commit is contained in:
Luca
2026-07-01 14:49:18 +02:00
parent b8b33ae6d6
commit 415bffa04c
17 changed files with 869 additions and 22 deletions
+9
View File
@@ -79,6 +79,8 @@ import { MaintenanceWrapper } from './components/MaintenanceWrapper';
import { GlobalThemeProvider } from './components/GlobalThemeProvider';
import { ConfirmDialogProvider } from './components/common';
import { usePublicSettings } from './hooks/usePublicSettings';
import { SetupPage } from './pages/SetupPage';
import { AdminAuthProvider } from './contexts';
// Create a client
const queryClient = new QueryClient({
@@ -214,6 +216,13 @@ function App() {
</GalleryAuthProvider>
} />
{/* First-run setup — public, self-closes once an admin exists */}
<Route path="/setup" element={
<AdminAuthProvider>
<SetupPage />
</AdminAuthProvider>
} />
{/* Admin routes - wrap with AdminAuthProvider */}
<Route path="/admin" element={<AdminAuthWrapper />}>
<Route path="login" element={<AdminLoginPage />} />