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.
This commit is contained in:
1 parent
ec2d46e583
commit
443d908909
12 files changed
+798
-20
No files matched your search
@@ -0,0 +1,12 @@
|
||||
import type { NextConfig } from "next";
|
||||
|
||||
const nextConfig: NextConfig = {
|
||||
// This app lives inside the Laravel repo tree (which has its own lockfiles);
|
||||
// pin the Turbopack root so Next doesn't infer a parent directory.
|
||||
turbopack: { root: import.meta.dirname },
|
||||
// Prisma + the MariaDB driver adapter are native/server-only — keep them out
|
||||
// of the bundle (same approach as the habbo-next reference).
|
||||
serverExternalPackages: ["@prisma/adapter-mariadb", "mariadb", "@prisma/client"],
|
||||
};
|
||||
|
||||
export default nextConfig;
|
||||
Reference in new issue
Block a user