pediatric-ai-scribe-v3/package.json
Daniel 2f7233f317 perf: store real image previews in MinIO, generated at creation and on demand
Gallery tiles are 56px but were downloading the full ~280kB original. Previews
are now rendered with sharp and stored beside the originals in the same MinIO
bucket under a thumbs/ prefix, so nothing about credentials, lifecycle or backup
changes. Measured on live assets: 216-294kB originals become 13-19kB at 256px,
about 16x smaller; 640px is about 4x.

Both paths, as asked:
- Rendered when a job completes, so the first viewer never waits for a resize.
  A preview failure never unmakes a finished job.
- Rendered on demand for anything that has none — the existing 26 images work
  immediately with no backfill required, and the result is stored for next time.

Boundaries that matter more than the speed:
- Only 256 and 640 are honoured. An open width parameter would let a caller
  drive arbitrary resizes.
- Permission is checked against the ORIGINAL before a preview is served, so a
  preview can never widen who can see an image.
- Previews carry their own SHA-256 and owner headers, because the client
  verifies both on every asset; sending the original's checksum would be
  rejected as tampering, which is that check working correctly.
- Still private, no-store. The client asset pattern was widened to exactly
  ?w=256 and ?w=640 and nothing else.

Client-side downscaling stays as the fallback when a preview cannot be produced.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018e1PLqrKgAM9jQhFKRnbLd
2026-09-10 06:39:30 +02:00

83 lines
2.5 KiB
JSON

{
"name": "pediatric-ai-scribe",
"version": "7.14.16",
"description": "AI-powered pediatric clinical documentation platform",
"main": "server.js",
"scripts": {
"start": "node server.js",
"test": "node --test test/*.test.js",
"e2e": "./scripts/e2e.sh",
"maint:check": "node scripts/maintenance.js check",
"maint:reindex": "node scripts/maintenance.js reindex",
"migrate": "node-pg-migrate",
"migrate:up": "node-pg-migrate up",
"migrate:down": "node-pg-migrate down 1",
"migrate:status": "node -e \"const{Pool}=require('pg');const p=new Pool({connectionString:process.env.DATABASE_URL});p.query('SELECT id,name,run_on FROM pgmigrations ORDER BY id').then(r=>{console.table(r.rows);p.end();}).catch(e=>{console.error(e.message);process.exit(1);})\"",
"migrate:new": "node-pg-migrate create"
},
"dependencies": {
"@marp-team/marp-core": "^4.3.0",
"@tiptap/core": "^3.20.4",
"@tiptap/extension-color": "^3.20.4",
"@tiptap/extension-link": "^3.20.4",
"@tiptap/extension-text-align": "^3.20.4",
"@tiptap/extension-text-style": "^3.20.4",
"@tiptap/extension-underline": "^3.20.4",
"@tiptap/starter-kit": "^3.20.4",
"argon2": "^0.41.1",
"axios": "^1.7.7",
"bcryptjs": "^2.4.3",
"cookie-parser": "^1.4.7",
"cors": "^2.8.5",
"dompurify": "^3.4.1",
"dotenv": "^16.4.5",
"express": "^4.21.0",
"express-rate-limit": "^7.4.0",
"helmet": "^8.0.0",
"jsonwebtoken": "^9.0.2",
"mammoth": "^1.8.0",
"markdown-it": "^14.1.1",
"marked": "^18.0.2",
"multer": "^1.4.5-lts.1",
"node-pg-migrate": "^7.7.0",
"nodemailer": "9.0.1",
"openai": "^4.73.0",
"openid-client": "^6.8.2",
"pdf-parse": "^1.1.1",
"pg": "^8.13.0",
"pptxgenjs": "^4.0.1",
"prom-client": "^15.1.3",
"qrcode": "^1.5.4",
"redis": "^4.7.1",
"sharp": "^0.35.4",
"speakeasy": "^2.0.0"
},
"optionalDependencies": {
"@aws-sdk/client-bedrock": "^3.700.0",
"@aws-sdk/client-bedrock-runtime": "^3.700.0",
"@aws-sdk/client-s3": "^3.700.0",
"@aws-sdk/client-transcribe-streaming": "^3.1017.0",
"@aws-sdk/s3-request-presigner": "^3.700.0",
"@google-cloud/vertexai": "^1.9.0"
},
"devDependencies": {
"jsdom": "^29.0.2"
},
"overrides": {
"node-pg-migrate": {
"glob": "11.1.0"
},
"express": {
"qs": "6.16.0"
},
"body-parser": {
"qs": "6.16.0"
},
"speech-rule-engine": {
"@xmldom/xmldom": "0.9.12"
}
},
"engines": {
"node": "24.x"
}
}