Commit Graph
37 Commits
Author SHA1 Message Date
Asep Haryana Saputra 1b5c16b135 feat: migrate dashboard to diagnosis workflow 2026-05-22 17:03:26 +00:00
Asep Haryana Saputra cf44a58486 feat: add diagnosis detail UI 2026-05-22 16:58:23 +00:00
Asep Haryana SaputraandClaude Opus 4.7 fd6f60f4f4 fix: clear auth form errors
- Clear error state before submitting credentials in login page
- Clear error state before submitting registration in register page
- Add optional onFieldChange callback to AuthForm to clear parent errors when fields change
- Add role="alert" to error paragraph for accessibility

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:55:47 +00:00
Asep Haryana Saputra 84fb808b53 feat: add frontend authentication flow 2026-05-22 16:51:01 +00:00
Asep Haryana SaputraandClaude Opus 4.7 9250696f54 fix: simplify diagnosis API aliases
Extract toImageClassificationRecord helper function to eliminate duplicated
transformation code between getImageClassifications and createImageClassification.
Replace hardcoded fake disease object with explicit error when diagnosis.disease
is null, ensuring data integrity. Remove unnecessary type casts now that the
helper is properly typed.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:46:43 +00:00
Asep Haryana Saputra 16a8935958 feat: add frontend production API client 2026-05-22 16:43:25 +00:00
Asep Haryana Saputra e9d6aabcdc fix: tighten dashboard summary types 2026-05-22 16:39:38 +00:00
Asep Haryana Saputra 02b002b021 feat: update dashboard for diagnosis workflow 2026-05-22 16:36:53 +00:00
Asep Haryana SaputraandClaude Opus 4.7 7712a5c6a1 fix: prevent duplicate expert reviews
In POST /reviews/:diagnosisId, perform the conditional diagnoses update
first with .returning() to determine whether a row was updated. The update
WHERE includes both id and status 'needs_review'. If no row is returned,
return badRequest and do not insert an expert review. Only after a
successful update insert expertReviews. This prevents concurrent reviewers
from both inserting review rows when only one update should win.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:34:02 +00:00
Asep Haryana SaputraandClaude Opus 4.7 d72eaffb6b fix: guard expert review state
- Reject diagnoses not in needs_review status with badRequest
- Make update conditional on both id and status needs_review using and()
- Simplify isDiagnosisRecordOrNull type guard with type alias

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:30:17 +00:00
Asep Haryana Saputra 59204b0fde feat: add expert diagnosis review workflow 2026-05-22 16:23:40 +00:00
Asep Haryana SaputraandClaude Opus 4.7 afa2e4999b fix: type diagnosis record mapping
- Replace `function toReview(row: any)` with typed ReviewRow interface
- Reconstruct DiseaseCatalogItem explicitly from selected fields instead of casting
- Replace `.filter(Boolean)` with typed isDiagnosisRecord predicate
- Add proper type narrowing for verdict and correctedDiseaseSlug in toReview

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:19:10 +00:00
Asep Haryana SaputraandClaude Opus 4.7 2e692a4b8c fix: tighten diagnosis route typing
Replace unsafe `as any` casts with proper type guards using `isDiseaseSlug()`
and explicit type casting to `DiagnosisStatus` and `DiseaseCatalogItem`.
Replace non-null assertions with explicit null checks that return
`serviceUnavailable()` errors when database operations fail.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:15:45 +00:00
Asep Haryana SaputraandClaude Opus 4.7 1a36ae5cbc feat: persist authenticated diagnoses
Implement diagnosis persistence routes with image upload, classification,
and prediction storage. Add missing HTTP error helpers (unauthorized,
forbidden) and update uploader client to use configurable base URL.

- Create POST /api/v1/diagnoses to upload images and store classifications
- Create GET /api/v1/diagnoses to list user's diagnoses (30 most recent)
- Create GET /api/v1/diagnoses/:id to retrieve diagnosis with predictions
- Add loadDiagnosisRecord helper for consistent diagnosis data loading
- Update uploader-client.ts to use env.uploaderBaseUrl
- Add unauthorized and forbidden error helpers to http-errors.ts
- Register diagnosisRoutes in main app

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 16:08:18 +00:00
Asep Haryana Saputra 5eb195cbeb feat: add session auth routes 2026-05-22 16:00:47 +00:00
Asep Haryana Saputra 794abfdb35 feat: add production auth and diagnosis schema 2026-05-22 15:53:48 +00:00
Asep Haryana Saputra b347ed4fd1 feat: define production diagnosis DTOs 2026-05-22 15:47:25 +00:00
Asep Haryana Saputra 15c6be9e84 feat: implement backend image classification with TensorFlow.js model
- 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.
2026-05-22 15:13:22 +00:00
Asep Haryana SaputraandClaude Opus 4.7 229db82a08 Document backend image classification design
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 14:31:56 +00:00
Asep Haryana Saputra 84c1f46841 Implement fullstack education catalog with disease detail pages, API routes, and shared types
- Add disease detail page component with data fetching and error handling
- Create shared types for diseases and classifications
- Implement API routes for diseases, classifications, and dashboard summary
- Develop reusable components for risk badge and disease card
- Build catalog page with search and filter functionality
- Update dashboard page with data-backed summary and manual classification form
- Register new routes in the web application
- Ensure type safety and consistency across shared modules
2026-05-22 14:26:13 +00:00
Asep Haryana SaputraandClaude Opus 4.7 d0c17d67b2 Document education catalog app design
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 13:50:10 +00:00
Asep Haryana Saputra 22e9f5d536 Normalize root package metadata 2026-05-22 13:06:43 +00:00
Asep Haryana Saputra 99285d1663 Finalize scaffold lockfile and implementation plan 2026-05-22 13:05:59 +00:00
Asep Haryana Saputra 1712108382 Document fullstack app commands and fix Moon config 2026-05-22 13:04:43 +00:00
Asep Haryana Saputra da18375c92 Verify fullstack scaffold builds
- 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"}
2026-05-22 12:53:15 +00:00
Asep Haryana Saputra 40c4424a1f Fix web project reference config 2026-05-22 12:46:24 +00:00
Asep Haryana Saputra 62f45ed454 Add React web scaffold 2026-05-22 12:41:55 +00:00
Asep Haryana Saputra 393779f81d Include shared outputs in API typecheck inputs 2026-05-22 12:36:05 +00:00
Asep Haryana Saputra 33ada3f1a7 Include shared outputs in API build inputs 2026-05-22 12:33:20 +00:00
Asep Haryana Saputra 2e64e67156 Link API tasks to shared package build 2026-05-22 12:28:54 +00:00
Asep Haryana Saputra 5e38c9276a Add Elysia API scaffold 2026-05-22 12:25:41 +00:00
Asep Haryana Saputra e543226209 Build shared package outputs 2026-05-22 12:19:33 +00:00
Asep Haryana Saputra c3eed82262 Add shared TypeScript package 2026-05-22 12:17:13 +00:00
Asep Haryana Saputra 4413133bf3 Add Bun and Moon workspace configuration 2026-05-22 12:14:27 +00:00
Asep Haryana SaputraandClaude Opus 4.7 81bce711b6 Document fullstack monorepo scaffold design.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 12:08:28 +00:00
Asep Haryana Saputra 23284ff288 Add CLAUDE.md for project guidance and common commands 2026-05-22 11:48:39 +00:00
elytra7 b2659dcd4e bebas 2026-05-22 14:23:45 +08:00