Upgrade packages: React 19, Next.js 16, Prisma 7, Express 5

- Frontend: React 18→19, Next.js 15→16, major package updates
- Backend: Prisma 5→7 with adapter pattern, Express 4→5
- Added Prisma 7 config (prisma.config.ts) and PostgreSQL adapter
- Updated Next.js config for Turbopack compatibility
- All builds passing successfully
This commit is contained in:
TheMaddax 2025-12-14 16:40:28 -07:00
parent 1d37b1fdae
commit 6c9faf7df0
8 changed files with 5046 additions and 3658 deletions

View file

@ -17,40 +17,42 @@
"lint:fix": "eslint src --ext .ts --fix" "lint:fix": "eslint src --ext .ts --fix"
}, },
"dependencies": { "dependencies": {
"@prisma/client": "^5.0.0", "@prisma/adapter-pg": "^7.1.0",
"prisma": "^5.0.0", "@prisma/client": "^7.1.0",
"express": "^4.21.2", "bcryptjs": "^3.0.3",
"compression": "^1.8.1",
"cors": "^2.8.5", "cors": "^2.8.5",
"helmet": "^7.0.0", "dotenv": "^17.2.3",
"express-rate-limit": "^7.0.0", "express": "^5.2.1",
"jsonwebtoken": "^9.0.0", "express-rate-limit": "^8.2.1",
"bcryptjs": "^2.4.3", "helmet": "^8.1.0",
"multer": "^1.4.5-lts.1", "joi": "^18.0.2",
"joi": "^17.9.0", "jsonwebtoken": "^9.0.3",
"nodemailer": "^6.9.0", "multer": "^2.0.2",
"redis": "^4.6.0", "nodemailer": "^7.0.11",
"winston": "^3.10.0", "pg": "^8.16.3",
"uuid": "^9.0.0", "prisma": "^7.1.0",
"dotenv": "^16.3.0", "redis": "^5.10.0",
"compression": "^1.7.4" "uuid": "^13.0.0",
"winston": "^3.19.0"
}, },
"devDependencies": { "devDependencies": {
"@types/node": "^22.0.0", "@types/bcryptjs": "^3.0.0",
"@types/express": "^4.17.17", "@types/compression": "^1.8.1",
"@types/cors": "^2.8.13", "@types/cors": "^2.8.19",
"@types/jsonwebtoken": "^9.0.2", "@types/express": "^5.0.6",
"@types/bcryptjs": "^2.4.2", "@types/jest": "^30.0.0",
"@types/multer": "^1.4.7", "@types/jsonwebtoken": "^9.0.10",
"@types/nodemailer": "^6.4.8", "@types/multer": "^2.0.0",
"@types/uuid": "^9.0.2", "@types/node": "^25.0.2",
"@types/compression": "^1.7.2", "@types/nodemailer": "^7.0.4",
"@types/jest": "^29.5.3", "@types/uuid": "^11.0.0",
"@typescript-eslint/eslint-plugin": "^6.2.0", "@typescript-eslint/eslint-plugin": "^8.49.0",
"@typescript-eslint/parser": "^6.2.0", "@typescript-eslint/parser": "^8.49.0",
"eslint": "^8.45.0", "eslint": "^9.39.2",
"jest": "^29.6.1", "jest": "^30.2.0",
"tsx": "^4.0.0", "tsx": "^4.21.0",
"typescript": "^5.8.3" "typescript": "^5.9.3"
}, },
"engines": { "engines": {
"node": ">=22.0.0" "node": ">=22.0.0"

5401
backend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff

12
backend/prisma.config.ts Normal file
View file

@ -0,0 +1,12 @@
import "dotenv/config";
import { defineConfig, env } from "prisma/config";
export default defineConfig({
schema: "prisma/schema.prisma",
migrations: {
path: "prisma/migrations",
},
datasource: {
url: env("DATABASE_URL"),
},
});

View file

@ -7,7 +7,6 @@ generator client {
datasource db { datasource db {
provider = "postgresql" provider = "postgresql"
url = env("DATABASE_URL")
} }
model DocketEntry { model DocketEntry {

View file

@ -5,6 +5,8 @@ import compression from 'compression';
import rateLimit from 'express-rate-limit'; import rateLimit from 'express-rate-limit';
import dotenv from 'dotenv'; import dotenv from 'dotenv';
import { PrismaClient } from '@prisma/client'; import { PrismaClient } from '@prisma/client';
import { PrismaPg } from '@prisma/adapter-pg';
import pg from 'pg';
import { createClient } from 'redis'; import { createClient } from 'redis';
import { logger } from './utils/logger'; import { logger } from './utils/logger';
import { errorHandler } from './middleware/errorHandler'; import { errorHandler } from './middleware/errorHandler';
@ -27,8 +29,13 @@ const PORT = process.env.PORT || 3001;
// Trust proxy when behind reverse proxy (Caddy) // Trust proxy when behind reverse proxy (Caddy)
app.set('trust proxy', true); app.set('trust proxy', true);
// Initialize Prisma client // Initialize Prisma client with PostgreSQL adapter
const connectionString = process.env.DATABASE_URL;
const pool = new pg.Pool({ connectionString });
const adapter = new PrismaPg(pool);
export const prisma = new PrismaClient({ export const prisma = new PrismaClient({
adapter,
log: ['query', 'info', 'warn', 'error'], log: ['query', 'info', 'warn', 'error'],
}); });

View file

@ -1,6 +1,9 @@
/** @type {import('next').NextConfig} */ /** @type {import('next').NextConfig} */
const nextConfig = { const nextConfig = {
reactStrictMode: true, reactStrictMode: true,
// Empty turbopack config to silence Next.js 16 warning
turbopack: {},
// Keep webpack config for backward compatibility
webpack: (config) => { webpack: (config) => {
// Handle PDF.js worker // Handle PDF.js worker
config.resolve.alias.canvas = false; config.resolve.alias.canvas = false;

View file

@ -12,33 +12,33 @@
"type-check": "tsc --noEmit" "type-check": "tsc --noEmit"
}, },
"dependencies": { "dependencies": {
"@hookform/resolvers": "^3.1.0", "@hookform/resolvers": "^5.2.2",
"axios": "^1.4.0", "axios": "^1.13.2",
"clsx": "^2.0.0", "clsx": "^2.1.1",
"joi": "^17.9.0", "joi": "^18.0.2",
"lucide-react": "^0.263.0", "lucide-react": "^0.561.0",
"next": "^15.3.4", "next": "^16.0.10",
"react": "^18.3.0", "react": "^19.2.3",
"react-dom": "^18.3.0", "react-dom": "^19.2.3",
"react-hook-form": "^7.45.0", "react-hook-form": "^7.68.0",
"react-pdf": "^7.3.0", "react-pdf": "^10.2.0",
"tailwind-merge": "^1.14.0", "tailwind-merge": "^3.4.0",
"zustand": "^4.4.0" "zustand": "^5.0.9"
}, },
"devDependencies": { "devDependencies": {
"@tailwindcss/forms": "^0.5.10", "@tailwindcss/forms": "^0.5.10",
"@tailwindcss/typography": "^0.5.16", "@tailwindcss/typography": "^0.5.19",
"@types/node": "^22.0.0", "@types/node": "^25.0.2",
"@types/react": "^18.3.0", "@types/react": "^19.2.7",
"@types/react-dom": "^18.3.0", "@types/react-dom": "^19.2.3",
"@typescript-eslint/eslint-plugin": "^6.2.0", "@typescript-eslint/eslint-plugin": "^8.49.0",
"@typescript-eslint/parser": "^6.2.0", "@typescript-eslint/parser": "^8.49.0",
"autoprefixer": "^10.4.0", "autoprefixer": "^10.4.23",
"eslint": "^8.45.0", "eslint": "^9.39.2",
"eslint-config-next": "^15.3.4", "eslint-config-next": "^16.0.10",
"postcss": "^8.4.0", "postcss": "^8.5.6",
"tailwindcss": "^3.3.0", "tailwindcss": "^4.1.18",
"typescript": "^5.8.3" "typescript": "^5.9.3"
}, },
"engines": { "engines": {
"node": ">=22.0.0" "node": ">=22.0.0"

3166
frontend/pnpm-lock.yaml generated

File diff suppressed because it is too large Load diff