d4641e27aa
- /setup Server Component + SetupClient form + createFirstAdmin Server Action: zero-users guard (TOCTOU-safe), argon2 hash, ADMIN user creation, redirects to /auth/signin after setup - scripts/setup-admin.mjs: CLI alternative for headless/container setups - docs/installation.md: 7-section install guide (clone → configure → run → verify) Co-Authored-By: claude-flow <ruv@ruv.net>
12 lines
302 B
TypeScript
12 lines
302 B
TypeScript
import { redirect } from "next/navigation";
|
|
import { prisma } from "@capakraken/db";
|
|
import { SetupClient } from "./SetupClient.js";
|
|
|
|
export default async function SetupPage() {
|
|
const count = await prisma.user.count();
|
|
if (count > 0) {
|
|
redirect("/auth/signin");
|
|
}
|
|
return <SetupClient />;
|
|
}
|