initial push

This commit is contained in:
Sone
2026-05-19 18:43:08 +02:00
parent 95ee5fe076
commit 56e020a89f
5 changed files with 1560 additions and 318 deletions
+9 -5
View File
@@ -1,12 +1,16 @@
import { PrismaClient } from "@prisma/client"; import { PrismaClient } from "@prisma/client";
import { PrismaPg } from "@prisma/adapter-pg";
import { Pool } from "pg";
const globalForPrisma = globalThis as unknown as { prisma?: PrismaClient }; const globalForPrisma = globalThis as unknown as { prisma?: PrismaClient };
export const prisma = function createPrismaClient() {
globalForPrisma.prisma ?? const pool = new Pool({ connectionString: process.env.DATABASE_URL });
new PrismaClient({ const adapter = new PrismaPg(pool);
log: ["error", "warn"], return new PrismaClient({ adapter, log: ["error", "warn"] });
}); }
export const prisma = globalForPrisma.prisma ?? createPrismaClient();
if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma; if (process.env.NODE_ENV !== "production") globalForPrisma.prisma = prisma;
+1529 -300
View File
File diff suppressed because it is too large Load Diff
+14 -12
View File
@@ -14,23 +14,25 @@
}, },
"dependencies": { "dependencies": {
"@hookform/resolvers": "^5.2.2", "@hookform/resolvers": "^5.2.2",
"@prisma/client": "^5.22.0", "@prisma/adapter-pg": "^7.8.0",
"lucide-react": "^0.545.0", "@prisma/client": "^7.8.0",
"next": "^16.0.7", "lucide-react": "^1.16.0",
"react": "^19.2.3", "next": "^16.2.6",
"react-dom": "^19.2.3", "pg": "^8.20.0",
"react-hook-form": "^7.65.0", "react": "^19.2.6",
"react-toastify": "^11.0.5", "react-dom": "^19.2.6",
"zod": "^4.1.12" "react-hook-form": "^7.76.0",
"react-toastify": "^11.1.0",
"zod": "^4.4.3"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "2.2.0", "@biomejs/biome": "2.4.15",
"@tailwindcss/postcss": "^4", "@tailwindcss/postcss": "^4",
"@types/node": "^20", "@types/node": "^25",
"@types/react": "^19", "@types/react": "^19",
"@types/react-dom": "^19", "@types/react-dom": "^19",
"prisma": "^5.22.0", "prisma": "^7.8.0",
"tailwindcss": "^4", "tailwindcss": "^4",
"typescript": "^5" "typescript": "^6"
} }
} }
+8
View File
@@ -0,0 +1,8 @@
import { defineConfig, env } from "prisma/config";
export default defineConfig({
schema: "prisma/schema.prisma",
datasource: {
url: env("DATABASE_URL"),
},
});
-1
View File
@@ -4,7 +4,6 @@ generator client {
datasource db { datasource db {
provider = "postgresql" provider = "postgresql"
url = env("DATABASE_URL")
} }
model Contact { model Contact {