- Schema: bio (160), bio_detail (2000) en avatar_data (bytea) op User - POST /api/profile/avatar: validatie MIME-type + max 12 MB vóór verwerking, Sharp resize naar max 700x700 (fit inside), output WebP q85, opgeslagen als bytea in Neon - GET /api/profile/avatar: serveert avatar met Cache-Control private 1u - updateProfileAction: slaat bio en bio_detail op via Server Action + Zod - ProfileEditor client component: avatar preview, upload met client-side validatie, bio-velden met tekenlimieten - Settings page: profiel-sectie bovenaan, uitgeschakeld voor demo-gebruiker - next.config: sharp als serverExternalPackage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
12 lines
282 B
TypeScript
12 lines
282 B
TypeScript
import type { NextConfig } from "next"
|
|
import pkg from "./package.json"
|
|
|
|
const nextConfig: NextConfig = {
|
|
serverExternalPackages: ['sharp'],
|
|
env: {
|
|
NEXT_PUBLIC_APP_VERSION: pkg.version,
|
|
NEXT_PUBLIC_BUILD_DATE: new Date().toISOString(),
|
|
},
|
|
}
|
|
|
|
export default nextConfig
|