Commit Graph
88 Commits
Author SHA1 Message Date
seriouselly 9f9098b91b feat(mobile-nav): enhance responsive sidebar with user info and auth actions
- Remove userRole prop, read user directly from auth store
- Add user info section (avatar, name, email) when logged in
- Add Masuk/Daftar buttons at bottom when unauthenticated
- Add Keluar button with loading state when authenticated
- Add tagline under logo in sidebar header
- Add backdrop blur effect for better visual depth
- Use flex-col layout for consistent spacing at any height
2026-06-06 02:15:43 +07:00
seriouselly 5129bbe958 feat: harmonize page headers to match Scan Tanaman title style 2026-06-06 01:37:38 +07:00
seriouselly 1b31ea31a2 refactor(navbar): standardize scan navigation and cleanup logout
- Rename Scan to Scan Tanaman for Indonesian consistency
- Remove logout button from navbar (can be accessed elsewhere)
- Streamline navigation UI
2026-06-06 00:11:55 +07:00
seriouselly 80fa75130a feat(scan-page): unauthenticated upload with scanner area detection
- Implement responsive drag-and-drop upload interface
- Add dynamic scanner frame overlay with image dimensions
- Enable unauthenticated uploads via anonymous user system
- Show real-time scan area guidance with corner markers
- Maintain clean separation: select → preview → analyze
2026-06-06 00:06:36 +07:00
seriouselly 065b802344 fix(scan-page): implement upload button workflow
- Add conditional button behavior based on file selection state
- Before file selected: button opens file picker
- After file selected: button triggers file upload to API
- Show "Mengunggah..." text and disable button during upload
- Display error messages below button when upload fails

This fixes the issue where users could select files but had no way
to submit them for analysis.
2026-06-05 19:01:48 +07:00
seriouselly aa033c86a9 Merge branch 'main' of https://github.com/ATLAS-PJK-GM007/ZeaVis-Edu into selly/frontend 2026-06-04 19:58:40 +07:00
seriouselly 94d341705a refactor: improve Scan page layout and error messaging
- Reorganize sidebar: stack "Persyaratan Berkas" below "Panduan Pengambilan Foto"
- Add responsive grid layout for mobile devices
- Display service-specific error messages (uploader vs model service)
- Reduce padding and optimize spacing throughout
- Enhance error handling with source field detection
2026-06-04 19:33:42 +07:00
Asep Haryana Saputra b713b72d2d fix: RiskBadge overflow on long disease names in catalog cards
- Add flex-wrap and min-w-0 to prevent RiskBadge from overflowing
  the card boundary when commonName is long (e.g., Northern/Southern Leaf Blight)
- Fix both catalog-page.tsx and disease-card.tsx for consistency
2026-06-02 09:39:01 +00:00
Asep Haryana SaputraandClaude Opus 4.7 81d083a2b8 fix(frontend): wrap catalog, disease detail, and expert reviews with MainLayout
- Add MainLayout wrapper to /catalog, /catalog/:slug, and /expert/reviews
  routes in app.tsx so they share the same navbar and footer as dashboard
- Remove duplicate header/layout/spacing from CatalogPage,
  DiseaseDetailPage, and ExpertReviewsPage
- Update ExpertReviewsPage to use consistent space-y layout pattern
  matching other pages
- Update CatalogPage to remove outer main wrapper since MainLayout
  provides the container

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 07:47:59 +00:00
Asep Haryana SaputraandClaude Opus 4.7 4d6ca4912c fix(frontend): align catalog with dashboard, make disease cards clickable, fix stat cards
- Make dashboard disease quick-access cards clickable → link to /catalog/:slug
- Update catalog page to match dashboard styling (4-column grid, consistent
  card design with colored dot, risk badge, line-clamp summary)
- Add URL param support to catalog (?risk=high) so dashboard's
  "Risiko Tinggi" stat card link works
- Remove confusing "Total Penyakit" stat card (was counting catalog rows,
  always 4). Replace with "Total Diagnosa" linking to /diagnoses,
  "Gagal" stat, and rename "Risiko Tinggi" to "Kategori Risiko Tinggi"
  linking to /catalog?risk=high

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 07:22:28 +00:00
Asep Haryana SaputraandClaude Opus 4.7 ba24cf1a05 fix(frontend): align pages with DB schema, fix auth, and improve UX
- Fix auth system: remove redirect bugs in login/register pages, register
  routes, wrap protected routes with AuthGuard, add AuthInitializer
- Add missing navbar links (Diagnosa, Pustaka, expert Review)
- Fix DiagnosesPage status filter to match DB DiagnosisStatus enum,
  support URL params (?status=, ?risk=) from dashboard links
- Replace hardcoded disease data on Dashboard with API-driven data,
  fix layout bugs (invalid gap-57 class, empty Button)
- Rewrite LibraryPage to use API instead of mock-diseases.ts
- Indonesian-ize Expert Reviews page labels and text
- Wrap DiagnosisDetailPage with MainLayout for consistent layout
- Improve ScanPage UX: image preview before upload, lucide icons,
  proper disease names in result modal, file size validation
- Delete dead code: mock-diseases.ts, unused form components,
  tailwind.config.ts (Tailwind v4 does not read v3 config)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-06-02 07:12:49 +00:00
seriouselly 891a59d9da fix: improve link formatting for better consistency in DashboardPage 2026-06-02 09:53:28 +07:00
seriouselly 2547c954a4 fix: adjust link text size and styling in DashboardPage for better readability 2026-06-02 09:52:41 +07:00
seriouselly 383cd8ee25 feat: add Diagnoses page and update routing; enhance Scan page with recent diagnoses list 2026-06-02 03:24:40 +07:00
seriouselly 0745dd903d feat: update landing page and add new library and scan pages
- Refactor landing page content and links for better user experience.
- Introduce a new library page to display disease information with filtering and modal details.
- Add a scan page for users to upload images for diagnosis with a preview modal.
- Enhance login and registration pages with automatic navigation to the dashboard.
- Integrate vite-tsconfig-paths for improved path resolution in Vite configuration.
2026-06-02 02:42:07 +07:00
Asep Haryana Saputra 73772f5f56 fix: update Rust and Debian base images in Dockerfile 2026-05-23 13:31:04 +00:00
Asep Haryana Saputra e848d20276 fix: update Rust version and improve Dockerfile build process 2026-05-23 13:27:06 +00:00
Asep Haryana Saputra 8d04a17d84 feat: add Python setup and ONNX model generation to CI workflow 2026-05-23 13:16:08 +00:00
Asep Haryana Saputra 5b4f8d29df fix: update .gitignore to include target directory 2026-05-23 12:32:52 +00:00
Asep Haryana SaputraandClaude Opus 4.7 e03c8a60fe fix: align Rust ML service with verified cargo build
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 12:21:33 +00:00
Asep Haryana SaputraandClaude Opus 4.7 e2e3addd66 fix: align Rust ML service verification
Corrected API response format documentation in README:
- Health endpoint: removed non-existent model_path field
- Metadata endpoint: fixed field names (service_name, service_version instead of service, version) and label order
- Prediction endpoint: corrected response structure to match implementation (single prediction object with probabilities map, not array)

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 11:09:16 +00:00
Asep Haryana Saputra 86371a6e31 docs: clarify ML service command context 2026-05-23 11:05:49 +00:00
Asep Haryana Saputra ea35ae4322 docs: clarify ML service port defaults 2026-05-23 11:01:41 +00:00
Asep Haryana SaputraandClaude Opus 4.7 abff278f49 docs: document Rust ONNX ML service
Update documentation to reflect migration from FastAPI/Uvicorn to Rust/Axum with ONNX Runtime:

- Root README: Update ML service description, tech stack, prerequisites, and run instructions to use Rust/Cargo instead of Python/Uvicorn
- Root README: Update model path references from best_model.keras to model.onnx
- Root README: Add model.onnx to artifact lists and generated files
- Root README: Update troubleshooting section with Rust-specific guidance
- Machine_Learning/README: Add table of contents entry for ONNX conversion
- Machine_Learning/README: Add Tahap 5 section documenting ONNX conversion with convert_onnx.py and validate_onnx_parity.py
- Machine_Learning/README: Update output table to include model.onnx with Rust ONNX Runtime usage
- apps/ml-service/README: Create comprehensive documentation for Rust Axum ONNX service including setup, endpoints, environment variables, testing, and troubleshooting

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 10:51:59 +00:00
Asep Haryana SaputraandClaude Code ba33bc1f23 fix: make Rust ML Docker build include ONNX runtime assets
- Add 'download-binaries' feature to ort crate in Cargo.toml to ensure ONNX Runtime binaries are downloaded during build
- Update .dockerignore to allow Machine_Learning/model/model.onnx through build context while still excluding other generated model artifacts (saved_model, tfjs_model, tflite)
- Dockerfile can now successfully copy model.onnx at runtime

Co-Authored-By: Claude Code <noreply@anthropic.com>
2026-05-23 10:44:32 +00:00
Asep Haryana Saputra d33f334dc1 build: containerize Rust ML service 2026-05-23 10:38:58 +00:00
Asep Haryana Saputra 3d3f1d14fa refactor: replace Python ML service runtime with Rust 2026-05-23 09:50:39 +00:00
Asep Haryana Saputra b4975819eb feat: serve ML inference endpoints with Axum 2026-05-23 09:48:54 +00:00
Asep Haryana SaputraandClaude Opus 4.7 36e4a49ca7 fix: harden ONNX model wrapper
- Store ONNX Session in Option<Mutex<Session>> for thread-safe concurrent access
- Lock session before run() in predict(), map lock poisoning to PredictionFailed
- Preserve ModelUnavailable when session is None
- Reject non-finite values (NaN, +inf, -inf) in prediction_from_probabilities
- Add unit tests for NaN, positive infinity, and negative infinity rejection
- Keep all existing tests passing

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 09:44:25 +00:00
Asep Haryana Saputra fc34e52911 feat: add ONNX model inference wrapper 2026-05-23 09:41:30 +00:00
Asep Haryana Saputra ad4c897c41 feat: preprocess uploaded images in Rust 2026-05-23 09:38:10 +00:00
Asep Haryana Saputra ee872c644f fix: align ML service response schemas 2026-05-23 09:36:20 +00:00
Asep Haryana Saputra dce4d4f21c feat: define ML service API responses 2026-05-23 09:33:15 +00:00
Asep Haryana Saputra 96c38df124 feat: load ML service config from environment 2026-05-23 09:30:51 +00:00
Asep Haryana SaputraandClaude Opus 4.7 10e890cc42 feat: scaffold Rust ML service crate
Create Rust crate skeleton with Cargo.toml, main.rs, and config.rs.
Includes package metadata, dependencies (anyhow, axum, image, ndarray,
ort, serde, tokio, tower, tracing), and config module with LABELS
constants, SERVICE_NAME, SERVICE_VERSION, DEFAULT_INPUT_SIZE, and
resolve_model_path function. Config tests verify label order, relative
path resolution, and absolute path preservation.

Also includes approved spec and implementation plan documents.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-23 09:23:38 +00:00
Asep Haryana Saputra 4453758180 fix: update API proxy configuration to use internal service endpoint 2026-05-22 22:06:21 +00:00
Asep Haryana Saputra 1d421ee948 feat: update deployment configuration and enhance VITE_API_BASE_URL handling 2026-05-22 21:53:01 +00:00
Asep Haryana Saputra 64d63587c7 feat: validate deployment secrets and update SSH action version 2026-05-22 21:33:32 +00:00
Asep Haryana SaputraandClaude Opus 4.7 1978597bcf feat: add Docker deployment workflow
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 21:20:56 +00:00
Asep Haryana SaputraandClaude Opus 4.7 e84be0d42f fix: handle malformed ML service responses
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 20:00:01 +00:00
Asep Haryana SaputraandClaude Opus 4.7 b81fecaa3f chore: remove API local model dependencies
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:54:31 +00:00
Asep Haryana SaputraandClaude Opus 4.7 1689f3f44e feat: call ML service for image classification
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:53:10 +00:00
Asep Haryana SaputraandClaude Opus 4.7 9a642a8581 feat: add ML service URL config
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:50:25 +00:00
Asep Haryana SaputraandClaude Opus 4.7 ed8cecc3f5 fix: align ML service labels with training order
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:40:41 +00:00
Asep Haryana Saputra 59877bc17f chore: add __pycache__ to .gitignore 2026-05-22 19:35:44 +00:00
Asep Haryana SaputraandClaude Opus 4.7 f08ba6753d chore: ignore ML service virtualenv
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:34:03 +00:00
Asep Haryana SaputraandClaude Opus 4.7 3b0416b946 docs: add ML service usage guide
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:30:05 +00:00
Asep Haryana SaputraandClaude Opus 4.7 a30071d8e8 feat: add ML service API routes
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:29:44 +00:00
Asep Haryana SaputraandClaude Opus 4.7 f3d2b8d72e feat: add ML model prediction service
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:29:13 +00:00
Asep Haryana SaputraandClaude Opus 4.7 ca9cbb12bf feat: add ML service response schemas
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-22 19:28:43 +00:00