Commit Graph
101 Commits
Author SHA1 Message Date
MythEclipse 4589766f27 build(web): switch to alpine-based nginx runner for sub_filter support
Migrate the web runner stage from the official nginx alpine image to a
standard alpine image with the nginx package installed. This ensures
the presence of the `http_sub_module` required for path rewriting in
the telemetry proxy configuration.

- Replace `nginx:1.27-alpine` with `alpine:3.20` and `apk add nginx`
- Update Nginx configuration file path to `/etc/nginx/http.d/default.conf`
- Update web asset root directory to `/var/lib/nginx/html`
- Add `X-Forwarded-For` and `X-Forwarded-Proto` headers to proxy locations
2026-06-08 00:00:33 +07:00
MythEclipse 4dde9d8408 refactor(web): implement nginx reverse proxy for telemetry dashboard
Transition telemetry dashboard integration from an external URL approach to a local reverse proxy via Nginx. This simplifies client-side connectivity by routing all telemetry requests through the existing web server's domain.

- Configure Nginx to proxy `/telemetry/` sub-paths to the internal telemetry service
- Implement `sub_filter` in Nginx to rewrite root-relative paths for the SPA
- Remove `VITE_TELEMETRY_URL` build arguments and environment variable dependencies
- Simplify `TelemetryPage` to use a relative `/telemetry` base path
- Clean up deployment workflows and Dockerfile by removing unused telemetry build args
2026-06-07 23:44:57 +07:00
MythEclipse 9602a64e18 feat(web): externalize telemetry URL via environment variables
Replace the hardcoded Nginx proxy configuration with a dynamic environment variable approach. This allows the telemetry dashboard to be loaded via a public URL instead of relying on a local Tailscale proxy.

- Add `VITE_TELEMETRY_URL` build argument to Dockerfile
- Pass `VITE_TELEMETRY_URL` through GitHub Actions deployment workflow
- Remove `/telemetry/` location block from nginx.conf
- Update `TelemetryPage` to use the new environment variable and improve iframe loading state management
2026-06-07 23:31:15 +07:00
MythEclipse cd93d1a06d feat(web): add telemetry dashboard page with nginx proxy and nav integration 2026-06-07 23:21:40 +07:00
Asep Haryana SaputraandGitHub 1106cbf62f Merge branch 'ATLAS-PJK-GM007:main' into main 2026-06-07 21:43:28 +07:00
MythEclipse 64567986e1 feat: update ML service Dockerfile to archlinux base and add port bindings for api/ml metrics 2026-06-07 21:40:09 +07:00
MythEclipse 2c41b80f97 feat: expose /metrics endpoint and add telemetry ClickHouse credentials 2026-06-07 20:57:45 +07:00
seriouselly 9a05c380cc feat(ui): add review menu to mobile nav and update card styling
- mobile-nav: add 'review' path to NAV_ITEMS array to ensure the menu is accessible on mobile screens.
- scan-page: update background color and border radius of the guidelines card in the right sidebar.
2026-06-07 18:22:14 +07:00
MythEclipse 5a47b0c658 feat(web): add client-side telemetry with Web Vitals and dev metrics endpoint 2026-06-07 18:13:11 +07:00
MythEclipse eefb16ad1d feat(ml-service): add Prometheus metrics and request telemetry instrumentation 2026-06-07 18:12:32 +07:00
MythEclipse ede1c480be feat(api): add Prometheus metrics and OpenTelemetry instrumentation for HTTP, auth, classifications, and diagnoses 2026-06-07 18:12:32 +07:00
seriouselly 68258074a6 fix(build): resolve missing module error for App component
- Update import path and filename for the App component to fix case sensitivity build issues on Linux environments.
2026-06-06 03:10:37 +07:00
seriouselly 450b2f9d97 refactor(ui): fix layout issues and temporarily disable auth features
- app & navbar: comment out login, register, and logout features.
- scan-page: align info cards vertically and reduce upload area padding.
- mobile-nav: implement React Portal to fix overlapping menu issue.
2026-06-06 03:01:07 +07:00
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