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:
@@ -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 />} />
|
||||
|
||||
Reference in New Issue
Block a user