Files
Epicnabbo-Catalogus-Updated…/src/app/page.tsx
T
simoleo89 443d908909 Scaffold Next.js 16 app + wire NextAuth Credentials to auth core
Minimal but real App Router app that builds (next build exit 0):
- src/lib/auth.ts: NextAuth v5 Credentials provider calling checkLogin()
  (argon2id/bcrypt + md5->argon2id upgrade gated by CONVERT_PASSWORDS), JWT
  session, /api/auth/[...nextauth] route handler.
- src/app: root layout, home (force-dynamic, reads hotel_name via siteSettings),
  /login client form (signIn).
- next.config.ts: pinned turbopack.root, serverExternalPackages for the Prisma
  MariaDB adapter; tsconfig set up for Next.

Routes: / (dynamic), /login, /api/auth. Verified: next build exit 0, 28 tests.
Still needs DB+APP_KEY to run auth end-to-end. i18n/middleware/pages to follow.
2026-06-27 16:11:52 +02:00

18 lines
615 B
TypeScript

import Link from "next/link";
import { siteSettings } from "@/lib/services/site-settings";
// Reads settings from the DB at request time — never at build.
export const dynamic = "force-dynamic";
export default async function HomePage() {
const hotelName = (await siteSettings.get("hotel_name", "Atom")) ?? "Atom";
return (
<main style={{ fontFamily: "system-ui", padding: "2rem", maxWidth: 640 }}>
<h1>Welcome to {hotelName}</h1>
<p>AtomCMS → Next.js conversion. Foundation, full Prisma schema and auth core are in place.</p>
<Link href="/login">Login →</Link>
</main>
);
}