Homepage was rendering 71MB of HTML because every uploaded image (gallery, products, proofs, custom requests, design previews, invoices, receipts) was stored as base64 in Postgres and double-embedded via RSC hydration payloads. Adds src/lib/storage.ts (sharp-based compression, disk storage under public/uploads/) and a new /api/design-uploads endpoint for images added inside the design tool, migrates existing rows, and drops the now-unused base64 columns and the dead ProductImage table. Also fixes a systemic bug from the Next.js 16 upgrade where dynamic pages across the app still destructured params/searchParams synchronously instead of awaiting them as Promises, which was silently breaking filters/params and crashing /products/[slug] outright. Updates README.md and SETUP_AND_BUILD.md to reflect Postgres + Next.js 16 and document the new image storage architecture and backup requirements. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
48 lines
1.1 KiB
JSON
48 lines
1.1 KiB
JSON
{
|
|
"name": "personalize-studio",
|
|
"version": "1.0.0",
|
|
"private": true,
|
|
"scripts": {
|
|
"dev": "next dev",
|
|
"build": "prisma generate && next build",
|
|
"start": "next start -p 3000",
|
|
"postinstall": "prisma generate",
|
|
"db:push": "prisma db push",
|
|
"db:seed": "tsx prisma/seed.ts",
|
|
"db:studio": "prisma studio"
|
|
},
|
|
"dependencies": {
|
|
"@prisma/client": "5.16.1",
|
|
"bcryptjs": "^3.0.3",
|
|
"fabric": "^7.4.0",
|
|
"idb-keyval": "6.2.1",
|
|
"jose": "^6.2.3",
|
|
"konva": "9.3.14",
|
|
"next": "^16.2.11",
|
|
"nodemailer": "6.9.14",
|
|
"pdf-parse": "^2.4.5",
|
|
"react": "18.3.1",
|
|
"react-dom": "18.3.1",
|
|
"react-konva": "18.2.10",
|
|
"sharp": "^0.35.3",
|
|
"stripe": "16.2.0",
|
|
"tesseract.js": "^7.0.0",
|
|
"uuid": "9.0.1",
|
|
"zustand": "4.5.4"
|
|
},
|
|
"devDependencies": {
|
|
"@types/bcryptjs": "^2.4.6",
|
|
"@types/node": "20.14.9",
|
|
"@types/nodemailer": "6.4.15",
|
|
"@types/react": "18.3.3",
|
|
"@types/react-dom": "18.3.0",
|
|
"@types/uuid": "9.0.8",
|
|
"autoprefixer": "10.4.19",
|
|
"postcss": "8.4.39",
|
|
"prisma": "5.16.1",
|
|
"tailwindcss": "3.4.4",
|
|
"tsx": "4.16.2",
|
|
"typescript": "5.5.3"
|
|
}
|
|
}
|