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>
- Rewrote README.md with current feature set (accounting, auth, checkout)
- Lists all major features: design tool, cart, customer accounts, dark mode
- Financial system overview: reports, bank reconciliation, audit trail
- Quick start for local development in 5 steps
- Configuration reference table
- Created SETUP_AND_BUILD.md with complete deployment guide:
- Local development setup (prerequisites, environment, database)
- Configuration reference for all .env variables
- Database management (push, seed, backup, reset)
- Feature setup (Stripe, email, CAPTCHA)
- Production build process
- Deployment options (self-hosted, Vercel, Docker)
- Post-deployment checklist
- Troubleshooting common issues
- Maintenance tasks and security hardening
Helps new developers get running quickly and provides clear deployment path.
Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>