- Add environment-aware CORS and secure cookie support:
* Add secureCookies config to env.ts based on SECURE_COOKIES env var or https detection
* Integrate @elysiajs/cors with credentials and origin configuration
* Update cookie helpers to use SameSite=None; Secure in production
- Wrap expert review update and insert in database transaction for atomicity:
* Ensures diagnosis status update and review insert succeed together
* Rolls back both operations if either fails
* Preserves behavior: only update if status is needs_review, return badRequest if no row updated
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
- Extend shared types for image classification, including PredictionProbability, UploaderMetadata, and ImageClassificationRecord.
- Create image_classifications table in the database with necessary fields and foreign key constraints.
- Implement disease mappers to convert database rows to shared disease records.
- Develop uploader client to handle image uploads to external service.
- Create image model service to load and classify images using TensorFlow.js.
- Add API routes for image classification, including GET for history and POST for new classifications.
- Implement frontend components for image classification form and display results.
- Update dashboard to integrate image classification functionality and display results.
- Document implementation plan for backend image classification.
- Install bun dependencies and generate bun.lock
- Add @types/bun to API dev dependencies for Bun type support
- Add @types/react and @types/react-dom to web dev dependencies
- Fix web tsconfig.node.json composite project emit configuration
- Verify all packages typecheck and build successfully
- Verify API health and status endpoints respond correctly
All verification steps passed:
- bun install: 354 packages installed
- packages/shared typecheck: OK
- packages/shared build: OK (dist generated)
- apps/api typecheck: OK
- apps/api build: OK (0.76 MB bundle)
- apps/web typecheck: OK
- apps/web build: OK (dist generated)
- API /health endpoint: {"status":"ok"}
- API /api/v1/status endpoint: {"name":"ZeaVis Edu","status":"ok","version":"0.1.0"}